commit | 0427b50f5d3ec67333bd9c43b3fc294a935f8a98 | [log] [tgz] |
---|---|---|
author | Pranav Tilak <pranav.vinaytilak@amd.com> | Wed Jul 16 14:18:09 2025 +0530 |
committer | Pranav Tilak <pranav.vinaytilak@amd.com> | Fri Aug 08 17:15:51 2025 +0530 |
tree | 14ed81b1a0f59fdcdc999c1b8edd54dad753ec8c | |
parent | 23e0260407b5109c764c699bb3cf7c2319754fce [diff] |
fix(libtl): typecast expression to match data type This corrects the MISRA violation C2012-10.1: Operands shall not be of an inappropriate essential type. The original code used an expression of a non-Boolean essential type in a Boolean context. To comply with the rule, the expression has been replaced with an explicit comparison to a Boolean-compatible value (e.g., == NULL, != 0U, ensuring clarity and type safety. Change-Id: Iac29e26415267e6287b523e1535fcda1d4fcf0de Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.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 with the default settings (using GCC as the host compiler), run:
cmake -B build
Then, to compile the project and produce libtl.a
in the build/
directory:
cmake --build build
To cross-compile the project (e.g., for AArch64), specify the appropriate tool using the CC
option when configuring the project:
CC=aarch64-none-elf-gcc cmake -B build -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY cmake --build build
You can specify the build mode using the CMAKE_BUILD_TYPE
option. Supported modes include:
Debug
– Full debug info with no optimization.Release
– Optimized build without debug info.RelWithDebInfo
– Optimized build with debug info.MinSizeRel
– Optimized for minimum size.APIs for specific projects can be conditionally included in the static library using the PROJECT_API
option.
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/