Hi,

 

I’ve tried with the latest main branch (commit e43540934) and TF-Mv1.8.1 tag, both worked well with exactly your build command:

cmake -S . -B cmake_build -DTFM_PLATFORM=musca_s1 -DTEST_PSA_API=CRYPTO

cmake --build cmake_build -- install

 

As this config will choose GCC compiler and use “toolchain_GNUARM.cmake” by default, please double check your environment. Here is my GCC version for your reference:

arm-none-eabi-gcc --version

arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)

 

Best regards,

Xinyu

 

From: capablegh--- via TF-M <tf-m@lists.trustedfirmware.org>
Date: Monday, October 23, 2023 at 00:58
To: tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.org>
Subject: [TF-M] Re: Building TF-M for ARM reference SoC/boards MPS2/MPS3 and Musca S1

Hello Antonio and David.

Instead of following the Zephyr build I follow the instructions per 'https://tf-m-user-guide.trustedfirmware.org/building/tfm_build_instruction.html' and build for Musca S1,

The build command lines are
cmake -S . -B cmake_build -DTFM_PLATFORM=musca_s1 -DTEST_PSA_API=CRYPTO
cmake --build cmake_build -- install

I get an error "/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/lib/thumb/v8-m.main/nofp/libnosys.a(sbrk.o): in function `_sbrk':
Memory region         Used Size  Region Size  %age Used
           FLASH:      159572 B       380 KB     41.01%
             RAM:       48656 B       256 KB     18.56%
collect2: error: ld returned 1 exit status"

Am I using the correct command? How do I get this to build successfully?

I get the same error if I use "-DTEST_S=ON -DTEST_NS=ON" instead of "-DTEST_PSA_API=CRYPTO"

If I do not provide either of the two specific "-D" options for test, the build completes.

With this I see the ".hex", ".bin" files in 'cmake_build/bin/'. If I copy 'tfm_s_ns_signed.bin' to the DAPLink USB MSD partition that gets mounted, I see a "FAIL.TXT" file created there with content "An error occurred during the transfer".

This is with the default "main" branch of the Git repo of 'trusted-firmware-m'. I get the same error for "-DTEST_PSA_API=CRYPTO" if I checkout "TF-Mv1.8.1" tag.

Is this expected to work for the Musca S1? Am I using the correct command line(s)?
--
TF-M mailing list -- tf-m@lists.trustedfirmware.org
To unsubscribe send an email to tf-m-leave@lists.trustedfirmware.org