Hi,
Just a humble suggestion: capability could be added to cmake to generate a build environment manifest. This could be a JSON or simple text file listing the location and version of each dependency (tool or software). The manifest file could simplify tracking down similar issues.
/George
From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of Thomas Törnblom via TF-M Sent: 28 January 2021 08:38 To: Sherry Zhang Sherry.Zhang2@arm.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: Re: [TF-M] Is Musca-A deprecated already?
Thanks Sherry,
Appears the current "cysecuretools" has a dependency on imgtool 1.7.0a1, which is likely where it came from.
I did build for musca_a last week and I may have updated cysecuretools since then as I had issues with flashing the psoc64, and that must have installed 1.7.0a1.
I installed 1.7.1, which caused a dependency error on cysecuretools 3.0.0.
Works now!
Cheers, Thomas Den 2021-01-28 kl. 03:50, skrev Sherry Zhang: Hi Thomas,
The issue is caused by the imgtool package itself. The version 1.7.0a1 is a pre-release version. If you check the line 378 of image.py of the imgtool package of version 1.7.0a1, it does not check the 'None' before accessing the custom_tlvs.items: [cid:image003.jpg@01D6F552.951E90A0]
In the version of 1.7.1, it has added the 'None' check at line 389 in image.py: [cid:image004.jpg@01D6F552.951E90A0]
In TF-M build system, the custom_tlvs should be 'None'.
To solve your issue, I suggest you use a release version of the imgtool package, such as 1.7.1, other than a pre-release one.
Please let me know how it goes.
Regards, Sherry Zhang
From: Thomas Törnblom thomas.tornblom@iar.commailto:thomas.tornblom@iar.com Sent: Wednesday, January 27, 2021 4:46 PM To: Sherry Zhang Sherry.Zhang2@arm.commailto:Sherry.Zhang2@arm.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd nd@arm.commailto:nd@arm.com Subject: Re: [TF-M] Is Musca-A deprecated already?
Hi Sherry,
Looks like I have version 1.7.0a1.
PS C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\cmake_build_iar> imgtool version 1.7.0a1
Cheers, Thomas Den 2021-01-27 kl. 09:22, skrev Sherry Zhang: Hi Thomas,
Can you share the version of the imgtool package you used? The recommended version is >=1.6.0. We run the build command on Linux locally and it works well.
An alternative option is to use the imgtool script from the upstream MCUBoot repo. To achieve that you can copy the folder ./build_dir/lib/ext/mcuboot-src/scripts/imgtool to bl2/ext/mcuboot/scripts/wrapper/.
Regards, Sherry Zhang
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: Wednesday, January 27, 2021 12:28 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: [TF-M] Is Musca-A deprecated already?
I'm working on some IAR brokenness for the cypress/psoc64 and for comparison I'm attempting to build for my favorite board, the musca_a, but it seems builds fails now. I think it was working last week, but today I'm unable to build with any of the toolchains.
I get the following errors frmo all of them. Here's a gcc build: --- [629/629] Generating tfm_s_ns_signed.bin FAILED: bl2/ext/mcuboot/tfm_s_ns_signed.bin cmd.exe /C "cd /D C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\cmake_build_armclang\bl2\ext\mcuboot && C:\Users\thomasto\AppData\Local\Programs\Python\Python39\python.exe C:/Users/thomasto/Projects/tf-m4/trusted-firmware-m/bl2/ext/mcuboot/scripts/wrapper/wrapper.py -v 1.2.0 --layout C:/Users/thomasto/Projects/tf-m4/trusted-firmware-m/cmake_build_armclang/bl2/ext/mcuboot/CMakeFiles/signing_layout_s.dir/./signing_layout_s_ns.o -k C:/Users/thomasto/Projects/tf-m4/trusted-firmware-m/bl2/ext/mcuboot/root-RSA-3072.pem --public-key-format full --align 1 --pad --pad-header -H 0x400 -s auto -d "(0, 0.0.0+0)" -d "(1, 0.0.0+0)" tfm_s_ns.bin C:/Users/thomasto/Projects/tf-m4/trusted-firmware-m/cmake_build_armclang/bl2/ext/mcuboot/tfm_s_ns_signed.bin && "C:\Program Files\CMake\bin\cmake.exe" -E copy C:/Users/thomasto/Projects/tf-m4/trusted-firmware-m/cmake_build_armclang/bl2/ext/mcuboot/tfm_s_ns_signed.bin C:/Users/thomasto/Projects/tf-m4/trusted-firmware-m/cmake_build_armclang/bin" Traceback (most recent call last): File "C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\bl2\ext\mcuboot\scripts\wrapper\wrapper.py", line 126, in <module> wrap() File "C:\Users\thomasto\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 829, in __call__ return self.main(*args, **kwargs) File "C:\Users\thomasto\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "C:\Users\thomasto\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Users\thomasto\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 610, in invoke return callback(*args, **kwargs) File "C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\bl2\ext\mcuboot\scripts\wrapper\wrapper.py", line 121, in wrap img.create(key, public_key_format, enckey, dependencies, boot_record) File "C:\Users\thomasto\AppData\Local\Programs\Python\Python39\lib\site-packages\imgtool\image.py", line 378, in create for tag, value in custom_tlvs.items(): AttributeError: 'NoneType' object has no attribute 'items' ninja: build stopped: subcommand failed. ---
cmake line: cmake -GNinja -S .. -B . -DTFM_PLATFORM=musca_a "-DTFM_TOOLCHAIN_FILE=..\toolchain_GNUARM.cmake" -DTEST_NS=ON -DTEST_S=ON -DCMAKE_BUILD_TYPE=Debug -DMCUBOOT_LOG_LEVEL=DEBUG -DTFM_PSA_API=ON
I've tested building for several of the other targets, which seems to work, but I don't have any of these here.
Ideas?
Thanks, 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
tf-m@lists.trustedfirmware.org