You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jianglk.darker 7ee447c011
v811_spc009_project
4 months ago
..
build v811_spc009_project 4 months ago
c2hal v811_spc009_project 4 months ago
hashing v811_spc009_project 4 months ago
hidl2aidl v811_spc009_project 4 months ago
host_utils v811_spc009_project 4 months ago
lint v811_spc009_project 4 months ago
metadata v811_spc009_project 4 months ago
scripts v811_spc009_project 4 months ago
test v811_spc009_project 4 months ago
utils v811_spc009_project 4 months ago
.clang-format v811_spc009_project 4 months ago
AST.cpp v811_spc009_project 4 months ago
AST.h v811_spc009_project 4 months ago
Android.bp v811_spc009_project 4 months ago
Annotation.cpp v811_spc009_project 4 months ago
Annotation.h v811_spc009_project 4 months ago
ArrayType.cpp v811_spc009_project 4 months ago
ArrayType.h v811_spc009_project 4 months ago
CleanSpec.mk v811_spc009_project 4 months ago
CompoundType.cpp v811_spc009_project 4 months ago
CompoundType.h v811_spc009_project 4 months ago
ConstantExpression.cpp v811_spc009_project 4 months ago
ConstantExpression.h v811_spc009_project 4 months ago
Coordinator.cpp v811_spc009_project 4 months ago
Coordinator.h v811_spc009_project 4 months ago
DeathRecipientType.cpp v811_spc009_project 4 months ago
DeathRecipientType.h v811_spc009_project 4 months ago
DocComment.cpp v811_spc009_project 4 months ago
DocComment.h v811_spc009_project 4 months ago
EnumType.cpp v811_spc009_project 4 months ago
EnumType.h v811_spc009_project 4 months ago
FmqType.cpp v811_spc009_project 4 months ago
FmqType.h v811_spc009_project 4 months ago
FormattingConstants.h v811_spc009_project 4 months ago
HandleType.cpp v811_spc009_project 4 months ago
HandleType.h v811_spc009_project 4 months ago
HidlTypeAssertion.cpp v811_spc009_project 4 months ago
HidlTypeAssertion.h v811_spc009_project 4 months ago
Interface.cpp v811_spc009_project 4 months ago
Interface.h v811_spc009_project 4 months ago
Location.cpp v811_spc009_project 4 months ago
Location.h v811_spc009_project 4 months ago
MemoryType.cpp v811_spc009_project 4 months ago
MemoryType.h v811_spc009_project 4 months ago
Method.cpp v811_spc009_project 4 months ago
Method.h v811_spc009_project 4 months ago
NOTICE v811_spc009_project 4 months ago
NamedType.cpp v811_spc009_project 4 months ago
NamedType.h v811_spc009_project 4 months ago
OWNERS v811_spc009_project 4 months ago
PREUPLOAD.cfg v811_spc009_project 4 months ago
PointerType.cpp v811_spc009_project 4 months ago
PointerType.h v811_spc009_project 4 months ago
README.md v811_spc009_project 4 months ago
Reference.h v811_spc009_project 4 months ago
ScalarType.cpp v811_spc009_project 4 months ago
ScalarType.h v811_spc009_project 4 months ago
Scope.cpp v811_spc009_project 4 months ago
Scope.h v811_spc009_project 4 months ago
StringType.cpp v811_spc009_project 4 months ago
StringType.h v811_spc009_project 4 months ago
TEST_MAPPING v811_spc009_project 4 months ago
Type.cpp v811_spc009_project 4 months ago
Type.h v811_spc009_project 4 months ago
TypeDef.cpp v811_spc009_project 4 months ago
TypeDef.h v811_spc009_project 4 months ago
VectorType.cpp v811_spc009_project 4 months ago
VectorType.h v811_spc009_project 4 months ago
generateCpp.cpp v811_spc009_project 4 months ago
generateCppAdapter.cpp v811_spc009_project 4 months ago
generateCppImpl.cpp v811_spc009_project 4 months ago
generateDependencies.cpp v811_spc009_project 4 months ago
generateFormattedHidl.cpp v811_spc009_project 4 months ago
generateInheritanceHierarchy.cpp v811_spc009_project 4 months ago
generateJava.cpp v811_spc009_project 4 months ago
generateJavaImpl.cpp v811_spc009_project 4 months ago
generateVts.cpp v811_spc009_project 4 months ago
hidl-gen_l.h v811_spc009_project 4 months ago
hidl-gen_l.ll v811_spc009_project 4 months ago
hidl-gen_y-helpers.h v811_spc009_project 4 months ago
hidl-gen_y.yy v811_spc009_project 4 months ago
main.cpp v811_spc009_project 4 months ago
update-all-google-makefiles.sh v811_spc009_project 4 months ago
update-makefiles-helper.sh v811_spc009_project 4 months ago

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

NOTE: When using the -Landroidbp option, you can force generated modules to be installed in /system_ext rather than other partition by putting a marker file .hidl_for_system_ext alongside *.hal files.

NOTE: You can also install the vendor variant of the generated modules to be installed in /odm rather than /vendor by putting a marker file .hidl_for_odm alongside *.hal files.

c2hal

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

m c2hal && c2hal -h