Fix HIDL output errata. am: 23cc5fa023
am: 2ff5d88a57

Change-Id: Ib819290201ea0ae570d1100d9672ea5e818aca71
tree: 21aa2a7097c1bea9fa23b432243f323e1ce1bfac
  1. build/
  2. c2hal/
  3. docs/
  4. include_hash/
  5. scripts/
  6. test/
  7. utils/
  8. .clang-format
  9. Android.bp
  10. Annotation.cpp
  11. Annotation.h
  12. ArrayType.cpp
  13. ArrayType.h
  14. AST.cpp
  15. AST.h
  16. CleanSpec.mk
  17. CompoundType.cpp
  18. CompoundType.h
  19. ConstantExpression.cpp
  20. ConstantExpression.h
  21. Coordinator.cpp
  22. Coordinator.h
  23. DeathRecipientType.cpp
  24. DeathRecipientType.h
  25. EnumType.cpp
  26. EnumType.h
  27. FmqType.cpp
  28. FmqType.h
  29. generateCpp.cpp
  30. generateCppAdapter.cpp
  31. generateCppImpl.cpp
  32. generateJava.cpp
  33. generateVts.cpp
  34. HandleType.cpp
  35. HandleType.h
  36. Hash.cpp
  37. hidl-gen_l.h
  38. hidl-gen_l.ll
  39. hidl-gen_y.yy
  40. HidlTypeAssertion.cpp
  41. HidlTypeAssertion.h
  42. Interface.cpp
  43. Interface.h
  44. Location.cpp
  45. Location.h
  46. main.cpp
  47. MemoryType.cpp
  48. MemoryType.h
  49. Method.cpp
  50. Method.h
  51. MODULE_LICENSE_APACHE2
  52. NamedType.cpp
  53. NamedType.h
  54. NOTICE
  55. OWNERS
  56. PointerType.cpp
  57. PointerType.h
  58. PREUPLOAD.cfg
  59. README.md
  60. Reference.h
  61. RefType.cpp
  62. RefType.h
  63. ScalarType.cpp
  64. ScalarType.h
  65. Scope.cpp
  66. Scope.h
  67. StringType.cpp
  68. StringType.h
  69. Type.cpp
  70. Type.h
  71. TypeDef.cpp
  72. TypeDef.h
  73. update-all-google-makefiles.sh
  74. update-makefiles-helper.sh
  75. VectorType.cpp
  76. VectorType.h
README.md

hidl-gen

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.

1. Build

m hidl-gen

2. Run

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).

c2hal

This is a helper tool to convert C headers to valid .hal files.

m c2hal && c2hal -h

docs

This tool generates html documentation for hal interfaces.

m hidl-doc && hidl-doc -h