GenAVB/TSN is a generic AVB/TSN stack developed by NXP for NXP MCUs and MPUs. It is cross-platform, currently supporting Linux, FreeRTOS and Zephyr.
This project supports several hardware targets and several different configuration modes. The table below summarizes the supported combinations, and their status for this specific release:
Compilation target | Hardware target | AVB endpoint | TSN endpoint | AVB/TSN bridge | AVB hybrid |
---|---|---|---|---|---|
linux i.MX6 |
i.MX 6Q , i.MX 6QP , i.MX 6D , i.MX 6SX |
x | |||
linux i.MX6ULL |
i.MX 6ULL |
O | |||
linux i.MX8 |
i.MX 8MM |
O | |||
linux i.MX8 |
i.MX 8MP , i.MX 8DXL , i.MX 93 |
O | O | ||
linux i.MX8 |
i.MX 8DXL + SJA1105Q |
O | |||
linux i.MX8 |
i.MX 93 + SJA1105Q |
O | O | ||
linux LS1028 |
LS1028A |
O | |||
freertos RT1052 |
i.MX RT1052 |
x | x | ||
freertos RT1176 |
i.MX RT1176 |
x | x | ||
freertos RT1187 M33 |
i.MX RT1187 |
x | |||
freertos RT1187 M7 |
i.MX RT1187 |
x | |||
freertos RT1189 M33 |
i.MX RT1189 |
x | |||
freertos RT1189 M7 |
i.MX RT1189 |
x | |||
freertos i.MX8MM A53 |
i.MX 8MM |
O | O | ||
freertos i.MX8MN A53 |
i.MX 8MN |
O | O | ||
freertos i.MX8MP A53 |
i.MX 8MP |
O | O | ||
freertos i.MX93 A55 |
i.MX 93 |
O | O | ||
zephyr i.MX8MM A53 |
i.MX 8MM |
O | O | ||
zephyr i.MX8MN A53 |
i.MX 8MN |
O | O | ||
zephyr i.MX8MP A53 |
i.MX 8MP |
O | O | ||
zephyr i.MX93 A55 |
i.MX 93 |
O | O |
GenAVB/TSN is using Cmake to generate build system.
Some preliminary configuration is required to provide path to the toolchain, staging directory and external components.
Local configuration files can be included by the build system in order to
to define some variables specific to the developer environment.
The local config file name is ./local_config_${target}.cmake
Currently GenAVB/TSN stack support only ARM gcc toolchain for FreeRTOS targets. To be able to build the stack, ARMGCC_DIR environment variable pointing to arm-gcc toolchain must be defined.
export ARMGCC_DIR=/path/to/gcc-arm-none-eabi-xxx
The local config file should define:
set(MCUX_SDK "/path/to/freertos_MCUXpresso_SDK" CACHE PATH "Path to MCUXpresso SDK")
set(RTOS_APPS "/path/to/freertos_application" CACHE PATH "Path to FreeRTOS application repository")
The GenAVB/TSN stack can be built as a Cmake subdirectory of a top level Zephyr application Refer to Harpoon Software for an example application.
The Linux target is usually built using a complete toolchain, which helps setting most of the environment variables required for cross-compilation. In the case of a Yocto SDK/toolchain for example, the following command will setup $CROSS_COMPILE as well as other related environment variables:
source /path/to/yocto/toolchain/environment-setup-xxx
The local config should however define:
set(KERNELDIR "/path/to/linux_avb" CACHE PATH "Path to Linux kernel")
Syntax is:
cmake . -B<build directory> -DTARGET=<target name> -DCONFIG=<config name>
make -C <build directory> install
The GenAVB/TSN stack also provides a couple shell functions with auto-completion to facilitate the build process. Usage is
# Setup environment, see Build paragraph above
source environment-genavb
make_genavb [target] [config_list]
clean_genavb [target]
where target and config_list are optional. If no config_list is defined, all available configurations for specified target are built. If no target is specified the default is linux_imx6. config_list is of the form: configA configB ..., with one or more members.
To generate doxygen HTML documentation:
cmake . -B<build directory> -DBUILD_DOC=ON -DTARGET=<target name> -DCONFIG=<config name>
make -C <build directory> doc_doxygen
The generated documentation is available under <build_directory>/doc
To install documentation under a custom path: use cmake variable -DDOC_OUTPUT_DIR=<custom absolute path>
The generated binaries are installed under <build directory>/
Copy the content of <build directory>/target/
to the root directory of the target filesystem
Refer to the FreeRTOS application README.
Refer to the Harpoon application README.