commit | 736f195a62fde9617a8b9743bc99f52c8695c557 | [log] [tgz] |
---|---|---|
author | Harrison Mutai <harrison.mutai@arm.com> | Thu May 01 08:08:20 2025 +0000 |
committer | Harrison Mutai <harrison.mutai@arm.com> | Fri Jun 13 11:25:37 2025 +0000 |
tree | e93077fdc3a21372d395f3aec4a1ed2e1f8247c9 | |
parent | bd05e5783f14f3b62e57136404c61685a1867b5c [diff] |
fix: make library backward compatible with c99 Replaces use of static_assert with a macro that falls back to a typedef trick for pre-C11 compilers. Ensures transfer_list_entry size check works with older firmware toolchains. Also, remove C11 setting; ensure the library honors whatever standard version is passed by the user. Change-Id: Ibe0d9524913739c58c418e46ab6498dacfdf0027 Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
The Transfer List Library (LibTL) implements the Firmware Handoff specification, providing a streamlined interface for managing transfer lists. LibTL offers a user-friendly interface for:
The library supports building with host tools such as Clang and GCC, and cross compilation with the Aarch64 GNU compiler.
Tool | Minimum Version |
---|---|
Clang-Format | 14 |
CMake | 3.15 |
To configure the project, use the following command. This will default to using GCC as the toolchain and create a build directory named build/
:
cmake -B build
To build the project, use:
cmake --build build
This will output libtl.a in the build directory.
For cross-compilation or selecting a different compiler, specify the target toolchain file using the CMAKE_TOOLCHAIN_FILE
option and the target with CROSS_COMPILE
:
export CROSS_COMPILE=aarch64-none-elf- cmake -B build -DCMAKE_TOOLCHAIN_FILE=toolchains/host/gnu.cmake
Tests for LibTL are provided in the folder test
, to configure the project for test builds, run:
cmake -B build -DTARGET_GROUP=test cmake --build build
Then, to run the tests with ctest
, use:
ctest --test-dir build/