Hi Thomas,
I’ve created a full fix: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/12860
Please check. Sorry for the inconvenience.
Best Regards, Kevin
From: Thomas Törnblom thomas.tornblom@iar.com Sent: Monday, December 6, 2021 4:43 PM To: Kevin Peng Kevin.Peng@arm.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: Re: [TF-M] Commit 65064c56 causes cmake errors for AN547 for all toolchains
Looks like the fix worked around the cmake error, but it causes build errors:
My cmake line:
PS D:\Projects\trusted-firmware-m\armclang> cmake -GNinja -S .. -B . -DTFM_PLATFORM=arm/musca_s1 "-DTFM_TOOLCHAIN_FILE=..\toolchain_ARMCLANG.cmake" -DTEST_NS=ON -DTEST_S=ON -DCMAKE_BUILD_TYPE=Debug -DBL2=ON
Build: PS D:\Projects\trusted-firmware-m\armclang> ninja ninja: error: '../tfm_core_test/tfm_ss_core_test.yaml', needed by 'generated/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc', missing and no known rule to make it
The fix causes build errors also on linux.
/Thomas Den 2021-12-06 kl. 09:14, skrev Thomas Törnblom: Hi Kevin,
Looks like this is a Windows (10?) only issue. I tried it on linux, and there was no problem there. It happens also right after a fresh clone.
I'm using cmake 3.22 btw.
Your fix below seems to fix the issue.
Cheers, Thomas Den 2021-12-06 kl. 06:53, skrev Kevin Peng via TF-M: Hi Thomas,
This looks like the permission issue of the filesystem. Please check if those directories are readable on your side. Before that patch, the parse_field_from_yaml function was not performed on any directories.
Meanwhile, I found the functionality of the dependency check for the manifest tool custom command - the parse_field_from_yaml is part of it – is broken. This means if you change any manifest list or manifest file, the build system is not aware of that and wouldn’t do the re-config. You have to do a manual clean build. It may take a while to fix this issue.
For you particular issue, you can try the following workaround if you could not figure out the permission issue:
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index bf8ee8f8..d65fd284 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -61,6 +61,9 @@ set(GENERATED_FILE_LISTS ${GENERATED_FILE_LISTS} ${TFM_EXTRA_GENERATED_FILE_LIST function(parse_field_from_yaml files field output_variable) set(${output_variable} "" PARENT_SCOPE) foreach(yaml_file ${files}) + if (IS_DIRECTORY ${yaml_file}) + continue() + endif() # Load the lines that refer to the key we selected file(STRINGS ${yaml_file} temp_variable REGEX " *"${field}":") # Take only the value of the key
Best Regards, Kevin
From: TF-M tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org On Behalf Of Ken Liu via TF-M Sent: Saturday, December 4, 2021 10:30 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd nd@arm.commailto:nd@arm.com Subject: Re: [TF-M] Commit 65064c56 causes cmake errors for AN547 for all toolchains
Will fix it on Monday.
/Ken
From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of chris.brand--- via TF-M Sent: Saturday, December 4, 2021 4:42 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: Re: [TF-M] Commit 65064c56 causes cmake errors for AN547 for all toolchains
In the master branch: $ git show 65064c56 commit 65064c5680ecc04ffed0b291e8fdf6dc466fa75e Author: Kevin Peng <kevin.peng@arm.commailto:kevin.peng@arm.com> Date: Wed Oct 27 17:12:17 2021 +0800
Tools: Combine manifest lists and extra manifest lists
It’s here in gerrit - https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/12185
Chris
From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Anton Komlev via TF-M Sent: Friday, December 3, 2021 10:42 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: [TF-M] Commit 65064c56 causes cmake errors for AN547 for all toolchains
Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safehttps://intranet-content.infineon.com/explore/aboutinfineon/rules/informationsecurity/ug/SocialEngineering/Pages/SocialEngineeringElements_en.aspx.
Hi Thomas,
I was able to build TF-M v1.50 using your command for Clang and GNU toolchains. I am in Windows and cmake v1.18.1. At the same time can not find commit 65064c56. What repository you use?
Regards, Anton
From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Thomas Törnblom via TF-M Sent: Friday, December 3, 2021 3:34 PM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: [TF-M] Commit 65064c56 causes cmake errors for AN547 for all toolchains
While working on IAR support for AN547 (M55) I notice that this commit causes cmake errors for all toolchains.
cmake -GNinja -S .. -B . -DTFM_PLATFORM=arm/mps3/an547 "-DTFM_TOOLCHAIN_FILE=..\toolchain_ARMCLANG.cmake" -DTEST_NS=ON -DTEST_S=ON -DCMAKE_BUILD_TYPE=Debug -DBL2=ON
... CMake Error at tools/CMakeLists.txt:65 (file): file STRINGS file "D:/Projects/tf-m1/trusted-firmware-m/tools" cannot be read. Call Stack (most recent call first): tools/CMakeLists.txt:84 (parse_field_from_yaml)
CMake Error at tools/CMakeLists.txt:65 (file): file STRINGS file "D:/Projects/tf-m1/trusted-firmware-m/armclang/lib/ext/tfm_test_repo-src/test/test_services" cannot be read. Call Stack (most recent call first): tools/CMakeLists.txt:84 (parse_field_from_yaml)
Thomas --
Thomas Törnblom, Product Engineer IAR Systems AB Box 23051, Strandbodgatan 1 SE-750 23 Uppsala, SWEDEN Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01 E-mail: thomas.tornblom@iar.commailto:thomas.tornblom@iar.com Website: www.iar.comhttp://www.iar.com Twitter: www.twitter.com/iarsystemshttp://www.twitter.com/iarsystems
--
Thomas Törnblom, Product Engineer IAR Systems AB Box 23051, Strandbodgatan 1 SE-750 23 Uppsala, SWEDEN Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01 E-mail: thomas.tornblom@iar.commailto:thomas.tornblom@iar.com Website: www.iar.comhttp://www.iar.com Twitter: www.twitter.com/iarsystemshttp://www.twitter.com/iarsystems
--
Thomas Törnblom, Product Engineer IAR Systems AB Box 23051, Strandbodgatan 1 SE-750 23 Uppsala, SWEDEN Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01 E-mail: thomas.tornblom@iar.commailto:thomas.tornblom@iar.com Website: www.iar.comhttp://www.iar.com Twitter: www.twitter.com/iarsystemshttp://www.twitter.com/iarsystems