Apologies for the difficulties that you're having. We've recently done an upgrade to the buildsystem and some of the documentation hasn't been properly updated to reflect the new files. There is a patch in review to rectify this.
For now, updated (plaintext) documentation can be found at https://review.trustedfirmware.org/plugins/gitiles/TF-M/trusted-firmware-m/…. It should also be updated on the website sometime this week.
Raef
________________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Antonio Ken IANNILLO via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 05 October 2020 14:06
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Running Tests on Musca-A
Dear all,
I’m a researcher exploring TF-M.
I have a Musca-A board, and I was able to build it with tests.
Now, it seems that the examples running the tests [1] are outdated: I simply do not have the same files.
My understanding is that I should merge two files (secure and non-secure) but it is not clear which ones and how the offset are computed.
Can somebody help me on this?
The output files in the /bin folder are: bl2, tfm_ns, and tfm_s in .axf, .bin, .elf, .hex, .map; tfm_s_ns.bin; and tfm_s_ns_signed.bin.
Best,
[1] https://ci.trustedfirmware.org/view/TF-M/job/tf-m-build-docs-nightly/lastSt…
--
Antonio Ken Iannillo, PhD
Research Scientist – SEDAN group
SnT – Interdisciplinary Centre for Security, Reliability and Trust
UNIVERSITÉ DU LUXEMBOURG
CAMPUS KIRCHBERG
29, avenue John F. Kennedy
L-1855 Luxembourg Kirchberg
T +352 46 66 44 9660 | antonioken.iannillo(a)uni.lu<mailto:antonioken.iannillo@uni.lu>
Join the conversation
News<https://wwwen.uni.lu/snt/news_events> | Twitter<https://twitter.com/SnT_uni_lu> | Linkedin<https://www.linkedin.com/school/snt-lu/>
www.uni.lu/snt<http://www.uni.lu/snt>
https://akiannillo.github.io/
P Please consider the environment before printing this e-mail
Hi Antonio,
And welcome to the TF-M community. To get a better understanding of your issue it I would like to ask from some further details, such as the HEAD of the TF-M which you are trying to build, as well as the HEAD of the test branche.
There has been a large overhaul of several components on the TF-M project, including the build system, so it would be good to have a common point of reference /
By examples, do you refer to the official user guide?
https://ci.trustedfirmware.org/view/TF-M/job/tf-m-build-docs-nightly/lastSt…
For Musca_A you only need the hex file to flash it, which is generated using the srec_cat command mentioned above which utilises the platform specific offsets and merges the signed secure and non-secure binaries with the bootloader.
If you are facing any issues flashing the HEX file, make sure that you have an up-to date daplink firmware.
https://community.arm.com/developer/tools-software/oss-platforms/w/docs/554…
If your output folder contains the HEX file, you can try flashing it by dragging and dropping, and see if it runs the regression tests.
Regards,
Minos Galanakis
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Antonio Ken IANNILLO via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 05 October 2020 14:06
To: tf-m(a)lists.trustedfirmware.org <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] Running Tests on Musca-A
Dear all,
I’m a researcher exploring TF-M.
I have a Musca-A board, and I was able to build it with tests.
Now, it seems that the examples running the tests [1] are outdated: I simply do not have the same files.
My understanding is that I should merge two files (secure and non-secure) but it is not clear which ones and how the offset are computed.
Can somebody help me on this?
The output files in the /bin folder are: bl2, tfm_ns, and tfm_s in .axf, .bin, .elf, .hex, .map; tfm_s_ns.bin; and tfm_s_ns_signed.bin.
Best,
[1] https://ci.trustedfirmware.org/view/TF-M/job/tf-m-build-docs-nightly/lastSt…
--
Antonio Ken Iannillo, PhD
Research Scientist – SEDAN group
SnT – Interdisciplinary Centre for Security, Reliability and Trust
UNIVERSITÉ DU LUXEMBOURG
CAMPUS KIRCHBERG
29, avenue John F. Kennedy
L-1855 Luxembourg Kirchberg
T +352 46 66 44 9660 | antonioken.iannillo(a)uni.lu<mailto:antonioken.iannillo@uni.lu>
Join the conversation
News<https://wwwen.uni.lu/snt/news_events> | Twitter<https://twitter.com/SnT_uni_lu> | Linkedin<https://www.linkedin.com/school/snt-lu/>
www.uni.lu/snt<http://www.uni.lu/snt>
https://akiannillo.github.io/
P Please consider the environment before printing this e-mail
Dear all,
I’m a researcher exploring TF-M.
I have a Musca-A board, and I was able to build it with tests.
Now, it seems that the examples running the tests [1] are outdated: I simply do not have the same files.
My understanding is that I should merge two files (secure and non-secure) but it is not clear which ones and how the offset are computed.
Can somebody help me on this?
The output files in the /bin folder are: bl2, tfm_ns, and tfm_s in .axf, .bin, .elf, .hex, .map; tfm_s_ns.bin; and tfm_s_ns_signed.bin.
Best,
[1] https://ci.trustedfirmware.org/view/TF-M/job/tf-m-build-docs-nightly/lastSt…
--
Antonio Ken Iannillo, PhD
Research Scientist – SEDAN group
SnT – Interdisciplinary Centre for Security, Reliability and Trust
UNIVERSITÉ DU LUXEMBOURG
CAMPUS KIRCHBERG
29, avenue John F. Kennedy
L-1855 Luxembourg Kirchberg
T +352 46 66 44 9660 | antonioken.iannillo(a)uni.lu
Join the conversation
News | Twitter | Linkedin
www.uni.lu/snthttps://akiannillo.github.io/
P Please consider the environment before printing this e-mail
Patches are now up for review.
for TF-M: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6095/1
for tf-m-tests: https://review.trustedfirmware.org/c/TF-M/tf-m-tests/+/6097
Any comments / reviews would be appreciated
Raef
________________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Raef Coles via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 01 October 2020 10:33
To: tf-m(a)lists.trustedfirmware.org; Christopher Brand
Subject: Re: [TF-M] CORE_TEST and the new build system
Yes, it seems like the core tests slipped through conversion. I've already had a report of this and got a patch together but it needs some thorough testing since it affects the linking order.
I'll notify here once the patch is submitted for review. Should be this morning.
Raef
________________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Christopher Brand via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 30 September 2020 23:45
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] CORE_TEST and the new build system
It seems that docs/reference/services/core_test_services_integration_guide.rst hasn’t been updated to reflect the new build system (it says to build using ConfigCoreTest.cmake). That config isn’t mentioned in docs/getting_started/tfm_build_instruction.rst.
So how do I build the CORE_TEST stuff with the new build system (I’m particularly interested in the IRQ test).
Thanks,
Chris Brand
Sr Prin Software Engr, MCD: WIRELESS
Cypress Semiconductor Corp.
An Infineon Technologies Company
#320-13700 International Place, Richmond, British Columbia V6V 2X8 Canada
www.infineon.com<http://www.infineon.com> www.cypress.com<http://www.cypress.com>
This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi guys. I'm curious why -fshort-wchar is enabled for ARMCLANG and GNUARM (not IAR, interestingly). This should have little or no impact since wchar_t is so rarely used, and causes incompatibility when I try to link my Zephyr app with TF-M libs.
Øyvind
Would it be possible to know what commit hash of TF-M you are currently using Kevin?
I had thought there was now some error handling in place for this but it's possible that it doesn't work as it should.
Raef
________________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Ken Liu via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 03 October 2020 14:37
To: tf-m(a)lists.trustedfirmware.org
Cc: nd
Subject: Re: [TF-M] Following the TF-M build example
Hi,
I assume you are building under windows, if that is true, add a -G"Unix Makefiles" in the command line would make it work as a quick fix, since cmake treat the default build system under windows as MSVC.
We are trying to create a patch to enhance this part.
BR
/Ken
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Kilzer via TF-M
Sent: Saturday, October 3, 2020 8:28 AM
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Following the TF-M build example
I’m following the first build example in docs\getting_started\tfm_build_instruction.rst, for the mps2/an521.
cmake -S . -B cmake_build -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake
Building on Windows with gnu, it progresses pretty far then stops with the error shown below.
Any suggestions?
Kevin
-- Configuring done
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: tfm_s_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:27 (target_add_scatter_file)
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: tfm_ns_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:40 (target_add_scatter_file)
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: bl2_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:63 (target_add_scatter_file)
CMake Generate step failed. Build files cannot be regenerated correctly.
Hi,
I assume you are building under windows, if that is true, add a -G"Unix Makefiles" in the command line would make it work as a quick fix, since cmake treat the default build system under windows as MSVC.
We are trying to create a patch to enhance this part.
BR
/Ken
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Kilzer via TF-M
Sent: Saturday, October 3, 2020 8:28 AM
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Following the TF-M build example
I'm following the first build example in docs\getting_started\tfm_build_instruction.rst, for the mps2/an521.
cmake -S . -B cmake_build -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake
Building on Windows with gnu, it progresses pretty far then stops with the error shown below.
Any suggestions?
Kevin
-- Configuring done
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: tfm_s_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:27 (target_add_scatter_file)
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: tfm_ns_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:40 (target_add_scatter_file)
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: bl2_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:63 (target_add_scatter_file)
CMake Generate step failed. Build files cannot be regenerated correctly.
I'm following the first build example in docs\getting_started\tfm_build_instruction.rst, for the mps2/an521.
cmake -S . -B cmake_build -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake
Building on Windows with gnu, it progresses pretty far then stops with the error shown below.
Any suggestions?
Kevin
-- Configuring done
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: tfm_s_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:27 (target_add_scatter_file)
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: tfm_ns_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:40 (target_add_scatter_file)
CMake Error at toolchain_GNUARM.cmake:114 (add_library):
No SOURCES given to target: bl2_scatter
Call Stack (most recent call first):
platform/ext/target/mps2/an521/CMakeLists.txt:63 (target_add_scatter_file)
CMake Generate step failed. Build files cannot be regenerated correctly.
Hi,
With the new build system, TF-M downloads all dependant repositories to the BUILD folder as part of CMAKE configuration. CMake does provide `make clean` target to clean the build and rebuild but this doesn't track any config changes between the builds. Previously, the CMake workflow was to delete all contents in the BUILD folder before re-configuring for a new build but now this means the developer has to re-download all the dependant git repositories before the project can be build again. This can be a slow and cumbersome process for developers. Deleting the CMakecache.txt doesn't seem to solve the problem either.
The most obvious solution is to move the cloned repositories outside the BUILD/ folder , so we can follow the previous workflow of deleting the BUILD folder before re-build. The sample test sequence to reproduce the problem is given below:
/* Build secure regressions test suite */
$ make clean; cmake .. -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake -DTEST_S=ON -DCMAKE_BUILD_TYPE=Debug; make install
/* reconfigure and build PSA Crypto API test suite */
$ make clean; cmake .. -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=Debug -DTEST_PSA_API=CRYPTO; make install
Built binary is still for regression test suite.
There are multiple suggestions to solve the problem, One is to move the clone repositories outside the BUILD/ folder, or introduce a build target like `make cleanall` which does the equivalent of rm -rf !(lib) within the BUILD folder (i.e the build target will remove all folders except the lib folder which has the cloned repositories). Please let us know of your suggestions on this.
Best Regards
Soby Mathew
Hi All,
The agenda for the forum today:
1. New build system features, tricks and known issues.
See you,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Anton Komlev via TF-M
Sent: 28 September 2020 11:39
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [TF-M] TF-M Technical Forum call – October 1
Hello,
The next Technical Forum is planned on Thursday, October 1 at 15:00-16:00 UTC (US time zone).
Please reply on this email with your proposals for agenda topics.
Recording and slides of previous meetings are here:
https://www.trustedfirmware.org/meetings/tf-m-technical-forum/
Best regards,
Anton