Hi Andrej,
Does your IDE support pre-build command? Is there any chance to execute the parse and auto-generation in the pre-build step?
Best regards,
Hu Ziji
________________________________ From: TF-M tf-m-bounces@lists.trustedfirmware.org on behalf of Andrej Butok via TF-M tf-m@lists.trustedfirmware.org Sent: Thursday, July 11, 2019 7:41 PM To: Ken Liu (Arm Technology China) Cc: tf-m@lists.trustedfirmware.org Subject: Re: [TF-M] Common scatter files and templates
Hi Ken,
Could you help to tell the name of the file you don't want to be removed?
So, any .c,.h,.inc and linker file which may be used during compilation. An IDE project (ARM Kei, MCUx, IAR etc.) assumes a fixed set of existing files.
Thanks, Andrej
-----Original Message----- From: Ken Liu (Arm Technology China) Ken.Liu@arm.com Sent: Thursday, July 11, 2019 12:44 PM To: Andrej Butok andrey.butok@nxp.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: Common scatter files and templates
Hi Andrej,
Could you help to tell the name of the file you don't want to be removed? So that we can estimate what is important for IDE projects and how we could help on that.
An introduction of how your IDE integrate with TF-M code is also welcome. Would you share this to us?
Thanks.
-Ken
-----Original Message----- From: Andrej Butok andrey.butok@nxp.com Sent: Thursday, July 11, 2019 2:25 PM To: David Hu (Arm Technology China) David.Hu@arm.com; Antonio De Angelis Antonio.DeAngelis@arm.com; Ken Liu (Arm Technology China) Ken.Liu@arm.com; Miklos Balint Miklos.Balint@arm.com Cc: tf-m@lists.trustedfirmware.org Subject: RE: Common scatter files and templates
Pre-generated files are required for TFM IDE projects. Please do not delete them, find other solution! It can be solved by adding #if/#ifdef.
Thank you, Andrej Butok
-----Original Message----- From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of David Hu (Arm Technology China) via TF-M Sent: Thursday, July 11, 2019 4:08 AM To: Antonio De Angelis Antonio.DeAngelis@arm.com; tf- m@lists.trustedfirmware.org; Ken Liu (Arm Technology China) Ken.Liu@arm.com; Miklos Balint Miklos.Balint@arm.com Cc: nd nd@arm.com Subject: Re: [TF-M] Common scatter files and templates
Hi Antonio, Ken, Miklos,
Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to comment the veneer sections in the templates in multi-core topology. Each time before building, we have to run the Python script to generate new link script/scatter file with veneer disabled, to replace the existing ones. It becomes more inconvenient as the number of developers and users on feature-twincpu branch grows.
As Chris proposed on https://review.tr ustedfirmware.org%2Fc%2Ftrusted-firmware- m%2F%2B%2F1527&data=02%7C01%7Candrey.butok%40nxp.com%7C068 37920c9bd443236e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635% 7C0%7C0%7C636984076614785023&sdata=2SVwa0TpX4a4lP86hsIYiw25YS Zqi8FzFErhpH3CrYI%3D&reserved=0, does it also make sense to directly update the "generated" linker script/scatter file as well, on feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common flag used in multi- core topology and will help resolve our urgent problem. If the final improvement solution is completed on master branch, we will update the feature branch accordingly when merging it back to master branch.
Please let me know if there is a better option for feature-twincpu branch. Thank you.
Best regards, Hu Ziji
-----Original Message----- From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of Antonio De Angelis via TF-M Sent: Thursday, July 11, 2019 3:53 AM To: TF-M@lists.trustedfirmware.org; nd nd@arm.com Subject: Re: [TF-M] Common scatter files and templates
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks, Antonio
From: TF-M tf-m-bounces@lists.trustedfirmware.org on behalf of Christopher Brand via TF-M tf-m@lists.trustedfirmware.org Sent: 10 July 2019 19:50 To: TF-M@lists.trustedfirmware.org; Miklos Balint Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this? $ ls platform/ext/common/armclang/ tfm_common_s.sct tfm_common_s.sct.template $ ls platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In both directories, both files are under source control, but the non-template files say that they're auto-generated: /*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
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@lists.trustedfirmware.org https://lists.trust edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trust edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 -- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trust edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0
-- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Hu Ziji
All examples must be compiled and run out-of-the box. Even if IDEs support pre-build commands, nobody may give a guaranty that a final client platform has installed proper Python or other scripting language support. Also IDEs may run on Win, Linux or MAC that may bring additional difficulties. We have a lot of different middleware projects in our SDK without this type of "dancing", so TFM may not get an exception. I would like to avoid a TFM fork.
Thanks, Andrej Butok
From: David Hu (Arm Technology China) David.Hu@arm.com Sent: Thursday, July 11, 2019 3:18 PM To: Ken Liu (Arm Technology China) Ken.Liu@arm.com; Andrej Butok andrey.butok@nxp.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: Re: Common scatter files and templates
Hi Andrej,
Does your IDE support pre-build command? Is there any chance to execute the parse and auto-generation in the pre-build step?
Best regards,
Hu Ziji
________________________________ From: TF-M tf-m-bounces@lists.trustedfirmware.org on behalf of Andrej Butok via TF-M tf-m@lists.trustedfirmware.org Sent: Thursday, July 11, 2019 7:41 PM To: Ken Liu (Arm Technology China) Cc: tf-m@lists.trustedfirmware.org Subject: Re: [TF-M] Common scatter files and templates
Hi Ken,
Could you help to tell the name of the file you don't want to be removed?
So, any .c,.h,.inc and linker file which may be used during compilation. An IDE project (ARM Kei, MCUx, IAR etc.) assumes a fixed set of existing files.
Thanks, Andrej
-----Original Message----- From: Ken Liu (Arm Technology China) Ken.Liu@arm.com Sent: Thursday, July 11, 2019 12:44 PM To: Andrej Butok andrey.butok@nxp.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: Common scatter files and templates
Hi Andrej,
Could you help to tell the name of the file you don't want to be removed? So that we can estimate what is important for IDE projects and how we could help on that.
An introduction of how your IDE integrate with TF-M code is also welcome. Would you share this to us?
Thanks.
-Ken
-----Original Message----- From: Andrej Butok andrey.butok@nxp.com Sent: Thursday, July 11, 2019 2:25 PM To: David Hu (Arm Technology China) David.Hu@arm.com; Antonio De Angelis Antonio.DeAngelis@arm.com; Ken Liu (Arm Technology China) Ken.Liu@arm.com; Miklos Balint Miklos.Balint@arm.com Cc: tf-m@lists.trustedfirmware.org Subject: RE: Common scatter files and templates
Pre-generated files are required for TFM IDE projects. Please do not delete them, find other solution! It can be solved by adding #if/#ifdef.
Thank you, Andrej Butok
-----Original Message----- From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of David Hu (Arm Technology China) via TF-M Sent: Thursday, July 11, 2019 4:08 AM To: Antonio De Angelis Antonio.DeAngelis@arm.com; tf- m@lists.trustedfirmware.org; Ken Liu (Arm Technology China) Ken.Liu@arm.com; Miklos Balint Miklos.Balint@arm.com Cc: nd nd@arm.com Subject: Re: [TF-M] Common scatter files and templates
Hi Antonio, Ken, Miklos,
Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to comment the veneer sections in the templates in multi-core topology. Each time before building, we have to run the Python script to generate new link script/scatter file with veneer disabled, to replace the existing ones. It becomes more inconvenient as the number of developers and users on feature-twincpu branch grows.
As Chris proposed on https://review.trhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639192009&sdata=q8ltClS7UABWY2Zr2YkAKpV%2BRiT9pa8WiPijFrlVhaM%3D&reserved=0 ustedfirmware.org%2Fc%2Ftrusted-firmware- m%2F%2B%2F1527&data=02%7C01%7Candrey.butok%40nxp.com%7C068 37920c9bd443236e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635% 7C0%7C0%7C636984076614785023&sdata=2SVwa0TpX4a4lP86hsIYiw25YS Zqi8FzFErhpH3CrYI%3D&reserved=0, does it also make sense to directly update the "generated" linker script/scatter file as well, on feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common flag used in multi- core topology and will help resolve our urgent problem. If the final improvement solution is completed on master branch, we will update the feature branch accordingly when merging it back to master branch.
Please let me know if there is a better option for feature-twincpu branch. Thank you.
Best regards, Hu Ziji
-----Original Message----- From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of Antonio De Angelis via TF-M Sent: Thursday, July 11, 2019 3:53 AM To: TF-M@lists.trustedfirmware.org; nd nd@arm.com Subject: Re: [TF-M] Common scatter files and templates
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks, Antonio
From: TF-M tf-m-bounces@lists.trustedfirmware.org on behalf of Christopher Brand via TF-M tf-m@lists.trustedfirmware.org Sent: 10 July 2019 19:50 To: TF-M@lists.trustedfirmware.org; Miklos Balint Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this? $ ls platform/ext/common/armclang/ tfm_common_s.sct tfm_common_s.sct.template $ ls platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In both directories, both files are under source control, but the non-template files say that they're auto-generated: /*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
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@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639202006&sdata=39KuoMxh2YPoQGJjFpvtarj7URdZkyWzzD5zyGsImwo%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639202006&sdata=39KuoMxh2YPoQGJjFpvtarj7URdZkyWzzD5zyGsImwo%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 -- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639202006&sdata=39KuoMxh2YPoQGJjFpvtarj7URdZkyWzzD5zyGsImwo%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0
-- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-mhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-m&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639211999&sdata=tfj%2Fr%2Fl5aIJQo3Yp6NSL9aiTO5TTKGxp6G62JISHgwM%3D&reserved=0
Hi Andrej,
Just of curiosity, do you directly import TF-M original code repo into IDE, or do you have to do some pre-processing and re-restructure prior to integrate TF-M into IDE? Thank you.
Best regards, Hu Ziji
From: Andrej Butok andrey.butok@nxp.com Sent: Thursday, July 11, 2019 9:42 PM To: David Hu (Arm Technology China) David.Hu@arm.com; Ken Liu (Arm Technology China) Ken.Liu@arm.com; tf-m@lists.trustedfirmware.org Subject: RE: Common scatter files and templates
Hi Hu Ziji
All examples must be compiled and run out-of-the box. Even if IDEs support pre-build commands, nobody may give a guaranty that a final client platform has installed proper Python or other scripting language support. Also IDEs may run on Win, Linux or MAC that may bring additional difficulties. We have a lot of different middleware projects in our SDK without this type of "dancing", so TFM may not get an exception. I would like to avoid a TFM fork.
Thanks, Andrej Butok
From: David Hu (Arm Technology China) <David.Hu@arm.commailto:David.Hu@arm.com> Sent: Thursday, July 11, 2019 3:18 PM To: Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Common scatter files and templates
Hi Andrej,
Does your IDE support pre-build command? Is there any chance to execute the parse and auto-generation in the pre-build step?
Best regards,
Hu Ziji
________________________________ From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, July 11, 2019 7:41 PM To: Ken Liu (Arm Technology China) Cc: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: Re: [TF-M] Common scatter files and templates
Hi Ken,
Could you help to tell the name of the file you don't want to be removed?
So, any .c,.h,.inc and linker file which may be used during compilation. An IDE project (ARM Kei, MCUx, IAR etc.) assumes a fixed set of existing files.
Thanks, Andrej
-----Original Message----- From: Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com> Sent: Thursday, July 11, 2019 12:44 PM To: Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Common scatter files and templates
Hi Andrej,
Could you help to tell the name of the file you don't want to be removed? So that we can estimate what is important for IDE projects and how we could help on that.
An introduction of how your IDE integrate with TF-M code is also welcome. Would you share this to us?
Thanks.
-Ken
-----Original Message----- From: Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com> Sent: Thursday, July 11, 2019 2:25 PM To: David Hu (Arm Technology China) <David.Hu@arm.commailto:David.Hu@arm.com>; Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; Miklos Balint <Miklos.Balint@arm.commailto:Miklos.Balint@arm.com> Cc: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: RE: Common scatter files and templates
Pre-generated files are required for TFM IDE projects. Please do not delete them, find other solution! It can be solved by adding #if/#ifdef.
Thank you, Andrej Butok
-----Original Message----- From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of David Hu (Arm Technology China) via TF-M Sent: Thursday, July 11, 2019 4:08 AM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; tf- m@lists.trustedfirmware.orgmailto:m@lists.trustedfirmware.org; Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; Miklos Balint <Miklos.Balint@arm.commailto:Miklos.Balint@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: [TF-M] Common scatter files and templates
Hi Antonio, Ken, Miklos,
Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to comment the veneer sections in the templates in multi-core topology. Each time before building, we have to run the Python script to generate new link script/scatter file with veneer disabled, to replace the existing ones. It becomes more inconvenient as the number of developers and users on feature-twincpu branch grows.
As Chris proposed on https://review.trhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639192009&sdata=q8ltClS7UABWY2Zr2YkAKpV%2BRiT9pa8WiPijFrlVhaM%3D&reserved=0 ustedfirmware.org%2Fc%2Ftrusted-firmware- m%2F%2B%2F1527&data=02%7C01%7Candrey.butok%40nxp.com%7C068 37920c9bd443236e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635% 7C0%7C0%7C636984076614785023&sdata=2SVwa0TpX4a4lP86hsIYiw25YS Zqi8FzFErhpH3CrYI%3D&reserved=0, does it also make sense to directly update the "generated" linker script/scatter file as well, on feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common flag used in multi- core topology and will help resolve our urgent problem. If the final improvement solution is completed on master branch, we will update the feature branch accordingly when merging it back to master branch.
Please let me know if there is a better option for feature-twincpu branch. Thank you.
Best regards, Hu Ziji
-----Original Message----- From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M Sent: Thursday, July 11, 2019 3:53 AM To: TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org; nd <nd@arm.commailto:nd@arm.com> Subject: Re: [TF-M] Common scatter files and templates
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks, Antonio
From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> on behalf of Christopher Brand via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 10 July 2019 19:50 To: TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org; Miklos Balint Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this? $ ls platform/ext/common/armclang/ tfm_common_s.sct tfm_common_s.sct.template $ ls platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In both directories, both files are under source control, but the non-template files say that they're auto-generated: /*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
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@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639202006&sdata=39KuoMxh2YPoQGJjFpvtarj7URdZkyWzzD5zyGsImwo%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- TF-M mailing list TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639202006&sdata=39KuoMxh2YPoQGJjFpvtarj7URdZkyWzzD5zyGsImwo%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 -- TF-M mailing list TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639202006&sdata=39KuoMxh2YPoQGJjFpvtarj7URdZkyWzzD5zyGsImwo%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0
-- TF-M mailing list TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-mhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-m&data=02%7C01%7Candrey.butok%40nxp.com%7C66ad6995d86b42db643808d706022618%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984478639211999&sdata=tfj%2Fr%2Fl5aIJQo3Yp6NSL9aiTO5TTKGxp6G62JISHgwM%3D&reserved=0
Hi Hu Ziji,
We import the TF-M original code to IDEs without generation. But there are some modifications which are not related to the file-generation:
* Add #ifdef where it is needed, to have constant set of files (TFM have different file-set per configuration).
The TFM configuration parameters are part of projects, which may be different but the file-set stays the same.
* Add FreeRTOS #ifdef to make it compatible with FreeRTOS as much as possible, just in case.
But RTX is still the default RTOS for TFM, because TFM puts limits for the non-secure word which create a conflict with FreeRTOS.
* Use own mbedCrypto configuration file. * Add our platform initialization. * Other minor modifications. * Some files for the PSA-test suite are pre-generated and some files are created manually (reversed engineered). As it is done by us, a user does not know about it.
PS: It looks like, the PSA/TFM projects are done by Linux way. But the MCU world is mainly a territory of IDEs.
Thanks, Andrej
From: David Hu (Arm Technology China) David.Hu@arm.com Sent: Friday, July 12, 2019 4:03 AM To: Andrej Butok andrey.butok@nxp.com; Ken Liu (Arm Technology China) Ken.Liu@arm.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: Common scatter files and templates
Hi Andrej,
Just of curiosity, do you directly import TF-M original code repo into IDE, or do you have to do some pre-processing and re-restructure prior to integrate TF-M into IDE? Thank you.
Best regards, Hu Ziji
From: Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com> Sent: Thursday, July 11, 2019 9:42 PM To: David Hu (Arm Technology China) <David.Hu@arm.commailto:David.Hu@arm.com>; Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: RE: Common scatter files and templates
Hi Hu Ziji
All examples must be compiled and run out-of-the box. Even if IDEs support pre-build commands, nobody may give a guaranty that a final client platform has installed proper Python or other scripting language support. Also IDEs may run on Win, Linux or MAC that may bring additional difficulties. We have a lot of different middleware projects in our SDK without this type of "dancing", so TFM may not get an exception. I would like to avoid a TFM fork.
Thanks, Andrej Butok
From: David Hu (Arm Technology China) <David.Hu@arm.commailto:David.Hu@arm.com> Sent: Thursday, July 11, 2019 3:18 PM To: Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Common scatter files and templates
Hi Andrej,
Does your IDE support pre-build command? Is there any chance to execute the parse and auto-generation in the pre-build step?
Best regards,
Hu Ziji
________________________________ From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, July 11, 2019 7:41 PM To: Ken Liu (Arm Technology China) Cc: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: Re: [TF-M] Common scatter files and templates
Hi Ken,
Could you help to tell the name of the file you don't want to be removed?
So, any .c,.h,.inc and linker file which may be used during compilation. An IDE project (ARM Kei, MCUx, IAR etc.) assumes a fixed set of existing files.
Thanks, Andrej
-----Original Message----- From: Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com> Sent: Thursday, July 11, 2019 12:44 PM To: Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Common scatter files and templates
Hi Andrej,
Could you help to tell the name of the file you don't want to be removed? So that we can estimate what is important for IDE projects and how we could help on that.
An introduction of how your IDE integrate with TF-M code is also welcome. Would you share this to us?
Thanks.
-Ken
-----Original Message----- From: Andrej Butok <andrey.butok@nxp.commailto:andrey.butok@nxp.com> Sent: Thursday, July 11, 2019 2:25 PM To: David Hu (Arm Technology China) <David.Hu@arm.commailto:David.Hu@arm.com>; Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; Miklos Balint <Miklos.Balint@arm.commailto:Miklos.Balint@arm.com> Cc: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: RE: Common scatter files and templates
Pre-generated files are required for TFM IDE projects. Please do not delete them, find other solution! It can be solved by adding #if/#ifdef.
Thank you, Andrej Butok
-----Original Message----- From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of David Hu (Arm Technology China) via TF-M Sent: Thursday, July 11, 2019 4:08 AM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; tf- m@lists.trustedfirmware.orgmailto:m@lists.trustedfirmware.org; Ken Liu (Arm Technology China) <Ken.Liu@arm.commailto:Ken.Liu@arm.com>; Miklos Balint <Miklos.Balint@arm.commailto:Miklos.Balint@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: [TF-M] Common scatter files and templates
Hi Antonio, Ken, Miklos,
Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to comment the veneer sections in the templates in multi-core topology. Each time before building, we have to run the Python script to generate new link script/scatter file with veneer disabled, to replace the existing ones. It becomes more inconvenient as the number of developers and users on feature-twincpu branch grows.
As Chris proposed on https://review.trhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr&data=02%7C01%7Candrey.butok%40nxp.com%7Cea0b5076966b4cf0721608d7066d03d8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984937628145534&sdata=CHV5G%2F%2BUvG%2F8OxZxOzYbJU9oTHVinI5KUbEENLYN9aA%3D&reserved=0 ustedfirmware.org%2Fc%2Ftrusted-firmware- m%2F%2B%2F1527&data=02%7C01%7Candrey.butok%40nxp.com%7C068 37920c9bd443236e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635% 7C0%7C0%7C636984076614785023&sdata=2SVwa0TpX4a4lP86hsIYiw25YS Zqi8FzFErhpH3CrYI%3D&reserved=0, does it also make sense to directly update the "generated" linker script/scatter file as well, on feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common flag used in multi- core topology and will help resolve our urgent problem. If the final improvement solution is completed on master branch, we will update the feature branch accordingly when merging it back to master branch.
Please let me know if there is a better option for feature-twincpu branch. Thank you.
Best regards, Hu Ziji
-----Original Message----- From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M Sent: Thursday, July 11, 2019 3:53 AM To: TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org; nd <nd@arm.commailto:nd@arm.com> Subject: Re: [TF-M] Common scatter files and templates
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks, Antonio
From: TF-M <tf-m-bounces@lists.trustedfirmware.orgmailto:tf-m-bounces@lists.trustedfirmware.org> on behalf of Christopher Brand via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 10 July 2019 19:50 To: TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org; Miklos Balint Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this? $ ls platform/ext/common/armclang/ tfm_common_s.sct tfm_common_s.sct.template $ ls platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In both directories, both files are under source control, but the non-template files say that they're auto-generated: /*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
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@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7Cea0b5076966b4cf0721608d7066d03d8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984937628145534&sdata=2CAd9mUKsWcVOY8EJ%2FR342h4nON0ZNp%2B%2FLCUNaM632U%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- TF-M mailing list TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7Cea0b5076966b4cf0721608d7066d03d8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984937628155531&sdata=MxjBAKWwETIwVJRugas8bM%2FIUNCFcA6EmX%2F2%2F%2FdqSCM%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0 -- TF-M mailing list TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trusthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trust&data=02%7C01%7Candrey.butok%40nxp.com%7Cea0b5076966b4cf0721608d7066d03d8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984937628155531&sdata=MxjBAKWwETIwVJRugas8bM%2FIUNCFcA6EmX%2F2%2F%2FdqSCM%3D&reserved=0 edfirmware.org%2Fmailman%2Flistinfo%2Ftf- m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD bfl678%3D&reserved=0
-- TF-M mailing list TF-M@lists.trustedfirmware.orgmailto:TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-mhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-m&data=02%7C01%7Candrey.butok%40nxp.com%7Cea0b5076966b4cf0721608d7066d03d8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636984937628165523&sdata=bogAB5TNFrSLsFOyyK422Gbb0Dw14M6Kpx8eNFCgqGs%3D&reserved=0
tf-m@lists.trustedfirmware.org