mbedTLS fails to build on STM32MP13 with TRUSTED_BOARD_BOOT
- July 15, 2026
- 0 replies
- 4 views
We are trying to build BL2 for STM32MP13 with `TRUSTED_BOARD_BOOT=1` and mbedTLS 3.6.6, using a standard `arm-*-gnueabihf` toolchain. The build fails while compiling the first mbedTLS source file:
...
In file included from /src/mbedtls-3.6.6/library/aes.c:14:
/src/mbedtls-3.6.6/library/common.h:23:10: fatal error: arm_neon.h: No such file or directory
23 | #include <arm_neon.h>
|
...The failure occurs as follows. The STM32MP1 platform enables:
ARM_WITH_NEON := yes
This adds `-mcpu=cortex-a7 -mfpu=neon` to the compiler flags. When using a hard-float toolchain such as `arm-linux-gnueabihf`, GCC consequently defines `__ARM_NEON`.
Since library/common.h is included by every mbedTLS source file, mbedTLS then tries to include:
#if defined(__ARM_NEON)
#include <arm_neon.h>However, TF-A builds with -`nostdinc` and uses its own libc headers. As a result, arm_neon.h cannot be found and the build fails.
The same configuration builds fine with a soft-float toolchain, where `__ARM_NEON` is not predefined.
We have attached a Dockerfile that reproduces the issue using pinned TF-A and mbedTLS revisions together with the Ubuntu 24.04 cross toolchain
We have attached a Dockerfile that reproduces the issue using pinned TF-A and mbedTLS revisions together with the Ubuntu 24.04 cross toolchain
