commit | 698840c12b270fb2bb4cb07a50104c87b9ff02a5 | [log] [tgz] |
---|---|---|
author | Neel Mehta <mneel@google.com> | Fri May 17 11:43:41 2019 -0700 |
committer | Neel Mehta <mneel@google.com> | Mon May 20 15:41:14 2019 -0700 |
tree | b05cef0b71d37f9964a0d3cc2c5a0a3f6a25f8a0 | |
parent | f71ab22823d8b4f567089800a5a68e9951ad00b3 [diff] |
Parse some common options in Coordinator We will soon be adding the linter which will use some of the same options that hidl-gen is using. To reduce code duplication, these options were moved to Coordinator, which hidl-lint will also use. This way the logic for those options is only written once. Bug: 132905850 Test: source test/run_all_host_tests.sh Change-Id: Ia029816f7a962db544c136e46eb90879f9362ea7
Full documentation can be found here: https://source.android.com/devices/architecture/hidl/
hidl-gen is a compiler for the HIDL (HAL Interface Design Language) which generates C++ and Java endpoints for RPC mechanisms. The main userspace libraries which this compiler uses can be found at system/libhidl.
m hidl-gen
Note that options for hidl-gen expected to be invoked by the build system are marked with 'internal' in the help menu.
hidl-gen -h hidl-gen -o output -L c++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
Some defaults for package roots are also provided
hidl-gen -o output -L c++-impl android.hardware.nfc@1.0 hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -L hash android.hardware.nfc@1.0
Example command for vendor project
hidl-gen -L c++-impl -r vendor.foo:vendor/foo/interfaces vendor.foo.nfc@1.0
See update-makefiles-helper.sh and update-all-google-makefiles.sh for examples of how to generate HIDL makefiles (using the -Landroidbp option).
This is a helper tool to convert C headers to valid .hal files.
m c2hal && c2hal -h
This tool generates html documentation for hal interfaces.
m hidl-doc && hidl-doc -h