Add README.md for hidl-gen

Change-Id: I02673f41811adb27700a54ee98c99870556378ef
1 file changed
tree: 1b1a48d9c5cccf543310012c5bf4d03b2030a967
  1. test/
  2. Android.mk
  3. Annotation.cpp
  4. Annotation.h
  5. ArrayType.cpp
  6. ArrayType.h
  7. AST.cpp
  8. AST.h
  9. CompoundType.cpp
  10. CompoundType.h
  11. Constant.cpp
  12. Constant.h
  13. Coordinator.cpp
  14. Coordinator.h
  15. EnumType.cpp
  16. EnumType.h
  17. Formatter.cpp
  18. Formatter.h
  19. FQName.cpp
  20. FQName.h
  21. generateCpp.cpp
  22. generateJava.cpp
  23. HandleType.cpp
  24. HandleType.h
  25. hidl-gen_l.ll
  26. hidl-gen_y.yy
  27. Interface.cpp
  28. Interface.h
  29. main.cpp
  30. Method.cpp
  31. Method.h
  32. NamedType.cpp
  33. NamedType.h
  34. README.md
  35. ScalarType.cpp
  36. ScalarType.h
  37. Scope.cpp
  38. Scope.h
  39. StringType.cpp
  40. StringType.h
  41. Type.cpp
  42. Type.h
  43. TypeDef.cpp
  44. TypeDef.h
  45. VectorType.cpp
  46. VectorType.h
README.md

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

hidl-gen -o output-path -L language (-r interface-root) fqname

output-path: directory to store the output files.
language: output file for given language. e.g.c++.

fqname: fully qualified name of the input files.
For singe file input, follow the format: package@version::fileName
For directory input, follow the format: package@version

interface-root(optional): prefix and root path for fqname.
If not set, use the default prefix: android.hardware and default root path
defined in $TOP.

examples:

hidl-gen -o output -L c++ android.hardware.nfc@1.0::INfc.hal
hild-gen -o test -L c++ -r android.hardware:/home/android/master/hardware/interfaces android.hardware.nfc@1.0