Hi,
There is no forwarded define for '__START' in the current TF-M design, then the runtime init provided by toolchain is applied. This runtime init did something unnecessary as the data copying and ZI has been done already by the startup code, jumping to spm::main would be the next job as SPM would prepare runtime environment for subsequent partition execution and itself won't need other runtime operations besides the data moving.
I have created a patch to jump to main under GNUARM:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/5609
Change the code is because this would easy the code reading -- most of the users won't check a compiler flag given in the build system for forwarding '__START', so they will try to find the __start from the toolchain source.
Currently, we can not avoid depending on ARMCLANG runtime init, so need double check (also IAR).
Please provide your feedback, we are changing the platform startup code and need your confirmation to see if it is applicable.
Best Regards,
Summer
Hello,
The next Technical Forum is planned on Thursday, September 17 at 6:00-07:00 UTC (Asia 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
Note that it's also still possible to use the "old style" cmake syntax:
```
mkdir build
cd build
cmake -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake ..
make
```
Ninja is also supported as a generator by using
```
mkdir build
cd build
cmake -GNinja -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake ..
ninja
```
This has been noted in the updated build documentation patch, which will be pushed to review.trustedfirmware.org as soon as possible (with other bugfixes, including both of the bugs encountered earlier in the email chain).
Raef
________________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Anton Komlev via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 09 September 2020 08:58
To: 'tf-m(a)lists.trustedfirmware.org'
Cc: nd
Subject: Re: [TF-M] TF-M build system update heads-up
Great to hear that that.
BTW, instead of building all targets using “install”
You can build a specific target separately by:
cmake --build cmake_build --target <target>
To list the targets available. use:
cmake --build cmake_build --target help
Cheers,
Anton
From: Christopher Brand <chris.brand(a)cypress.com>
Sent: 08 September 2020 22:30
To: Anton Komlev <Anton.Komlev(a)arm.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: RE: TF-M build system update heads-up
Thanks, Anton. That does work.
The command I ran was definitely correct – I’ve tried switching back-and-forth between “-B” and “--build”, and they consistently fail and succeed, respectively. I’ve also seen my email client change “--” to “—“.
I’m running cmake 3.18.2 on Ubuntu 18.04.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Tuesday, September 8, 2020 1:13 PM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
Could you try this:
cmake --build cmake_build -- install
Please note, when I copied your command the minus sign “-” was incorrect – probably a dash or hyphen sign. Need double check the doc.
Hope it helps,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Gyorgy Szing via TF-M
Sent: 08 September 2020 19:48
To: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M build system update heads-up
Hi,
Sorry to hear that. When you manage to find out the culprit please drop an email to the list. I am really curious.
/George
From: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>
Sent: 08 September 2020 19:08
To: Gyorgy Szing <Gyorgy.Szing(a)arm.com<mailto:Gyorgy.Szing@arm.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: RE: TF-M build system update heads-up
Thanks, Gyorgy. I did indeed have the double dash (pretty sure I just copied and pasted from the doc). I guess my email client decided to “fix it in the mail message.
Chris
From: Gyorgy Szing <Gyorgy.Szing(a)arm.com<mailto:Gyorgy.Szing@arm.com>>
Sent: Saturday, September 5, 2020 5:42 AM
To: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: RE: TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
You need two dashes before install.
Options with a single dash are processed by cmake. Options after a double dash (--) are passed over to the build tool (in this case gnumake). (See the cmake documentation [1].)
So:
cmake -B cmake_build -- install
is the correct command.
[cid:image001.png@01D68687.0FBC1660]
I attached an image above to work around potential readability issues of some font sets. I hope it gets trough.
[1] https://cmake.org/cmake/help/v3.0/manual/cmake.1.html
/George
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Christopher Brand via TF-M
Sent: 05 September 2020 00:26
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: Re: [TF-M] TF-M build system update heads-up
Thanks, Anton.
I tried again today, and got further – the first cmake command seems to succeed, but the second failed.
I used
git fetch "https://review.trustedfirmware.org/TF-M/trusted-firmware-m" refs/changes/72/5472/1 && git checkout FETCH_HEAD
to get the tree, followed by
cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=debug
and then
cmake -B cmake_build – install
This error seems like something trivial:
CMake Error: The source directory “…/trusted-firmware-m/install" does not exist.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Thursday, September 3, 2020 11:35 AM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
Thanks for trying. Please specify the build type explicitly: -DCMAKE_BUILD_TYPE=debug
It shall be defaulted to “MinSizeRel", but something went wrong. Will be fixed asap.
Good luck,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Christopher Brand via TF-M
Sent: 03 September 2020 19:10
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: Re: [TF-M] TF-M build system update heads-up
I tried to build PSoC64 with the new build system a couple of days ago, and wasn’t successful.
Following docs/getting_started/tfm_build_instruction.rst (the “Example: building TF-M for AN521 platform using GCC:” section), I ran cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake
That failed :
CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:107 (if):
if given arguments: "STREQUAL" "DEBUG" "OR" "STREQUAL" "Debug" "OR" "STREQUAL" "debug" Unknown arguments specified
Looking at that file it seemed that the default for CMAKE_BUILD_TYPE wasn’t being applied, so I tried this command:
cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=MinSizeRel
That got further, but failed with:
CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:115 (target_include_directories):
Cannot specify include directories for target "mbedcrypto_crypto_service"
which is not built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:120 (target_compile_definitions):
Cannot specify compile definitions for target "mbedcrypto_crypto_service"
which is not built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:130 (target_sources):
Cannot specify sources for target "mbedcrypto_crypto_service" which is not
built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:135 (target_link_libraries):
Cannot specify link libraries for target "mbedcrypto_crypto_service" which
is not built by this project.
At that point, I gave up.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Thursday, September 3, 2020 10:04 AM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello,
As I mentioned in the Open Tech Forum today – we are close to merge the new build system to the master branch. Plan to start doing that at the beginning of the next week.
It might cause code freeze for several days and minor problems in corner cases after that. The intention is to clean it out before the next release in November.
All changes to merge are in feature-ux-buildsystem branch at the moment.
Please signal if it conflicts with your plans.
Regards,
Anton
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.
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.
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.
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.
Hi Øyvind,
IMOO, such a NVME area is psa-arch-tests dedicated requirement, instead of TF-M implementation or FF-M definitions. I'd suggest to ask for more details in https://github.com/ARM-software/psa-arch-tests/.
FYI a patch from psa-arch-test to enable such a NVME area in TF-M: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/3360
Best regards,
Hu Ziji
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Rønningstad, Øyvind via TF-M
Sent: Wednesday, September 9, 2020 3:48 PM
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] PSA tests: NVMEM section
According to psa-arch-tests[1] the tests need an NVMEM area to write its states to.
"Non-volatile memory support to preserve test status over watchdog timer reset. Each byte of this region must be initialised to FF at power on reset."
I could not find any code that does this in the TF-M or PSA repos. How do other platforms reserve and manage this 1k area.
[1]: https://github.com/ARM-software/psa-arch-tests/blob/master/api-tests/docs/p…
Thanks, Anton. That does work.
The command I ran was definitely correct – I’ve tried switching back-and-forth between “-B” and “--build”, and they consistently fail and succeed, respectively. I’ve also seen my email client change “--” to “—“.
I’m running cmake 3.18.2 on Ubuntu 18.04.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Anton Komlev via TF-M
Sent: Tuesday, September 8, 2020 1:13 PM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
Could you try this:
cmake --build cmake_build -- install
Please note, when I copied your command the minus sign “-” was incorrect – probably a dash or hyphen sign. Need double check the doc.
Hope it helps,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Gyorgy Szing via TF-M
Sent: 08 September 2020 19:48
To: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M build system update heads-up
Hi,
Sorry to hear that. When you manage to find out the culprit please drop an email to the list. I am really curious.
/George
From: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>
Sent: 08 September 2020 19:08
To: Gyorgy Szing <Gyorgy.Szing(a)arm.com<mailto:Gyorgy.Szing@arm.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: RE: TF-M build system update heads-up
Thanks, Gyorgy. I did indeed have the double dash (pretty sure I just copied and pasted from the doc). I guess my email client decided to “fix it in the mail message.
Chris
From: Gyorgy Szing <Gyorgy.Szing(a)arm.com<mailto:Gyorgy.Szing@arm.com>>
Sent: Saturday, September 5, 2020 5:42 AM
To: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: RE: TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
You need two dashes before install.
Options with a single dash are processed by cmake. Options after a double dash (--) are passed over to the build tool (in this case gnumake). (See the cmake documentation [1].)
So:
cmake -B cmake_build -- install
is the correct command.
[cid:image001.png@01D685EC.35B811C0]
I attached an image above to work around potential readability issues of some font sets. I hope it gets trough.
[1] https://cmake.org/cmake/help/v3.0/manual/cmake.1.html
/George
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Christopher Brand via TF-M
Sent: 05 September 2020 00:26
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: Re: [TF-M] TF-M build system update heads-up
Thanks, Anton.
I tried again today, and got further – the first cmake command seems to succeed, but the second failed.
I used
git fetch "https://review.trustedfirmware.org/TF-M/trusted-firmware-m" refs/changes/72/5472/1 && git checkout FETCH_HEAD
to get the tree, followed by
cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=debug
and then
cmake -B cmake_build – install
This error seems like something trivial:
CMake Error: The source directory “…/trusted-firmware-m/install" does not exist.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Thursday, September 3, 2020 11:35 AM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
Thanks for trying. Please specify the build type explicitly: -DCMAKE_BUILD_TYPE=debug
It shall be defaulted to “MinSizeRel", but something went wrong. Will be fixed asap.
Good luck,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Christopher Brand via TF-M
Sent: 03 September 2020 19:10
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: Re: [TF-M] TF-M build system update heads-up
I tried to build PSoC64 with the new build system a couple of days ago, and wasn’t successful.
Following docs/getting_started/tfm_build_instruction.rst (the “Example: building TF-M for AN521 platform using GCC:” section), I ran cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake
That failed :
CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:107 (if):
if given arguments: "STREQUAL" "DEBUG" "OR" "STREQUAL" "Debug" "OR" "STREQUAL" "debug" Unknown arguments specified
Looking at that file it seemed that the default for CMAKE_BUILD_TYPE wasn’t being applied, so I tried this command:
cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=MinSizeRel
That got further, but failed with:
CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:115 (target_include_directories):
Cannot specify include directories for target "mbedcrypto_crypto_service"
which is not built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:120 (target_compile_definitions):
Cannot specify compile definitions for target "mbedcrypto_crypto_service"
which is not built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:130 (target_sources):
Cannot specify sources for target "mbedcrypto_crypto_service" which is not
built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:135 (target_link_libraries):
Cannot specify link libraries for target "mbedcrypto_crypto_service" which
is not built by this project.
At that point, I gave up.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Thursday, September 3, 2020 10:04 AM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello,
As I mentioned in the Open Tech Forum today – we are close to merge the new build system to the master branch. Plan to start doing that at the beginning of the next week.
It might cause code freeze for several days and minor problems in corner cases after that. The intention is to clean it out before the next release in November.
All changes to merge are in feature-ux-buildsystem branch at the moment.
Please signal if it conflicts with your plans.
Regards,
Anton
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.
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.
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.
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.
According to psa-arch-tests[1] the tests need an NVMEM area to write its states to.
"Non-volatile memory support to preserve test status over watchdog timer reset. Each byte of this region must be initialised to FF at power on reset."
I could not find any code that does this in the TF-M or PSA repos. How do other platforms reserve and manage this 1k area.
[1]: https://github.com/ARM-software/psa-arch-tests/blob/master/api-tests/docs/p…
Hi,
A new branch created for two repos 'TF-M/tf-m-tests' and 'TF-M/trusted-firmware-m', this feature branch is for isolation related patches merging.
The POC patches would come in following days, first platform would be AN521. If you want to try this branch, please:
IMPORTANT:
Checkout 'feature-isoaltion-level3' branch for both 'TF-M/tf-m-tests' and 'TF-M/trusted-firmware-m'.
BR
/Ken
Hi Chris,
Could you try this:
cmake --build cmake_build -- install
Please note, when I copied your command the minus sign “-” was incorrect – probably a dash or hyphen sign. Need double check the doc.
Hope it helps,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Gyorgy Szing via TF-M
Sent: 08 September 2020 19:48
To: Christopher Brand <chris.brand(a)cypress.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] TF-M build system update heads-up
Hi,
Sorry to hear that. When you manage to find out the culprit please drop an email to the list. I am really curious.
/George
From: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>
Sent: 08 September 2020 19:08
To: Gyorgy Szing <Gyorgy.Szing(a)arm.com<mailto:Gyorgy.Szing@arm.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: RE: TF-M build system update heads-up
Thanks, Gyorgy. I did indeed have the double dash (pretty sure I just copied and pasted from the doc). I guess my email client decided to “fix it in the mail message.
Chris
From: Gyorgy Szing <Gyorgy.Szing(a)arm.com<mailto:Gyorgy.Szing@arm.com>>
Sent: Saturday, September 5, 2020 5:42 AM
To: Christopher Brand <chris.brand(a)cypress.com<mailto:chris.brand@cypress.com>>; tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: RE: TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
You need two dashes before install.
Options with a single dash are processed by cmake. Options after a double dash (--) are passed over to the build tool (in this case gnumake). (See the cmake documentation [1].)
So:
cmake -B cmake_build -- install
is the correct command.
[cid:image001.png@01D68623.8624BBE0]
I attached an image above to work around potential readability issues of some font sets. I hope it gets trough.
[1] https://cmake.org/cmake/help/v3.0/manual/cmake.1.html
/George
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Christopher Brand via TF-M
Sent: 05 September 2020 00:26
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: Re: [TF-M] TF-M build system update heads-up
Thanks, Anton.
I tried again today, and got further – the first cmake command seems to succeed, but the second failed.
I used
git fetch "https://review.trustedfirmware.org/TF-M/trusted-firmware-m" refs/changes/72/5472/1 && git checkout FETCH_HEAD
to get the tree, followed by
cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=debug
and then
cmake -B cmake_build – install
This error seems like something trivial:
CMake Error: The source directory “…/trusted-firmware-m/install" does not exist.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Thursday, September 3, 2020 11:35 AM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Chris,
Thanks for trying. Please specify the build type explicitly: -DCMAKE_BUILD_TYPE=debug
It shall be defaulted to “MinSizeRel", but something went wrong. Will be fixed asap.
Good luck,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Christopher Brand via TF-M
Sent: 03 September 2020 19:10
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: Re: [TF-M] TF-M build system update heads-up
I tried to build PSoC64 with the new build system a couple of days ago, and wasn’t successful.
Following docs/getting_started/tfm_build_instruction.rst (the “Example: building TF-M for AN521 platform using GCC:” section), I ran cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake
That failed :
CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:107 (if):
if given arguments: "STREQUAL" "DEBUG" "OR" "STREQUAL" "Debug" "OR" "STREQUAL" "debug" Unknown arguments specified
Looking at that file it seemed that the default for CMAKE_BUILD_TYPE wasn’t being applied, so I tried this command:
cmake -S . -B cmake_build -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=MinSizeRel
That got further, but failed with:
CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:115 (target_include_directories):
Cannot specify include directories for target "mbedcrypto_crypto_service"
which is not built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:120 (target_compile_definitions):
Cannot specify compile definitions for target "mbedcrypto_crypto_service"
which is not built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:130 (target_sources):
Cannot specify sources for target "mbedcrypto_crypto_service" which is not
built by this project.CMake Error at secure_fw/partitions/crypto/CMakeLists.txt:135 (target_link_libraries):
Cannot specify link libraries for target "mbedcrypto_crypto_service" which
is not built by this project.
At that point, I gave up.
Chris
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Anton Komlev via TF-M
Sent: Thursday, September 3, 2020 10:04 AM
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] TF-M build system update heads-up
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello,
As I mentioned in the Open Tech Forum today – we are close to merge the new build system to the master branch. Plan to start doing that at the beginning of the next week.
It might cause code freeze for several days and minor problems in corner cases after that. The intention is to clean it out before the next release in November.
All changes to merge are in feature-ux-buildsystem branch at the moment.
Please signal if it conflicts with your plans.
Regards,
Anton
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.
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.
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.