Hi All,
When I compile with GCC and Debug config (only Debug), process stops with these errors:
[ 97%] Building C object bl2/CMakeFiles/bl2.dir/__/platform/ext/target/stm/common/hal/accelerator/stm.o
[ 98%] Linking C executable ../bin/bl2.axf
C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: address 0xc030fc4 of ../bin/bl2.axf section `.text' is not within region `FLASH'
C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: ../bin/bl2.axf section `.ARM.exidx' will not fit in region `FLASH'
C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: address 0xc030fc4 of ../bin/bl2.axf section `.text' is not within region `FLASH'
C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: section .BL2_NoHdp_Code LMA [0c02a000,0c02a5a7] overlaps section .text LMA [0c014000,0c030fc3]
C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 28620 bytes
Memory region Used Size Region Size %age Used
FLASH_NVMCNT: 32 B 8 KB 0.39%
FLASH: 118732 B 88 KB 131.76%
FLASH_NOHDP: 1448 B 8 KB 17.68%
FLASH_OTP: 756 B 4 KB 18.46%
FLASH_NVM: 32 B 8 KB 0.39%
RAM: 31624 B 63 KB 49.02%
collect2.exe: error: ld returned 1 exit status
make[5]: *** [bl2/CMakeFiles/bl2.dir/build.make:490: bin/bl2.axf] Error 1
make[4]: *** [CMakeFiles/Makefile2:1982: bl2/CMakeFiles/bl2.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/TF-M.dir/build.make:86: temp/src/TF-M-stamp/TF-M-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/TF-M.dir/all] Error 2
make: *** [Makefile:124: all] Error 2
Changing config to anything than Debug solves the issue, but along the way there are some warnings, of which these three seems to be particularly important:
tests_reg/build_spe/build-spe/lib/ext/mbedcrypto-src/include/mbedtls/ecp.h:365: warning: "MBEDTLS_ECP_MAX_BYTES" redefined
tests_reg/build_spe/build-spe/lib/ext/mbedcrypto-src/include/mbedtls/ecp.h:366: warning: "MBEDTLS_ECP_MAX_PT_LEN" redefined
trusted-firmware-m/bl2/ext/mcuboot/config/mcuboot-mbedtls-cfg.h:132:2: warning: #warning "Use legacy driver API for BL2" [-Wcpp]
132 | #warning "Use legacy driver API for BL2"
When I try to compile with Clang compiler latest version 6.21, I immediately get this error:
C:\Temp\tf-m\tf-m-tests\tests_reg>cmake --build build_spe -- install
[ 12%] Creating directories for 'TF-M'
[ 25%] No download step for 'TF-M'
[ 37%] No update step for 'TF-M'
[ 50%] No patch step for 'TF-M'
[ 62%] Performing configure step for 'TF-M'
loading initial cache file C:/Temp/tf-m/tf-m-tests/tests_reg/build_spe/temp/tmp/TF-M-cache-Debug.cmake
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.43.0.windows.1")
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is ARMClang
-- Found assembler: C:/Program Files/ArmCompilerforEmbedded6.21/bin/armasm.exe
CMake Error at toolchain_ARMCLANG.cmake:190 (message):
Please select newer Arm compiler version starting from 6.13.
Call Stack (most recent call first):
CMakeLists.txt:50 (tfm_toolchain_reload_compiler)
-- Configuring incomplete, errors occurred!
make[2]: *** [CMakeFiles/TF-M.dir/build.make:92: temp/src/TF-M-stamp/TF-M-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/TF-M.dir/all] Error 2
make: *** [Makefile:124: all] Error 2
Please advise,
Tomasz Jastrzêbski