Hi all,
I see that https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/31942 changes the way ASM files are built for Clang, this seems to cause the issues in our build: I am trying to compile following file https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... for cortex-m55https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/TOOLCHAIN_ARM/cy_syslib_ext.s%20for%20cortex-m55 CPU but I get following errors: armclang: error: armasm does not support CPU 'cortex-m55' armclang: error: armasm does not support FPU 'unknown'
cmd.txt shows full compile command for this file.
I suppose this is because -masm=armasm does not support CM55 core? Any ideas how to fix this?
Regards, Bohdan Hunko
Cypress Semiconductor Ukraine Engineer CSUKR CSS ICW SW FW Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Bohdan,
support for -masm=armasm is indeed not available for Cortex-M55 and newer CPUs. This is meant to be a temporary option to allow the migration of legacy assembly code to the GNU notation. In TF-M we keep it as an option but we should drop it as well soon now that we don't have pretty much anymore assembly source in the project apart for some platform startup files, and in particular we have just realised that the psoc64 armclang startup files would have to be aligned to the GNU ones for this to work. We will loop you in that change soon.
For your case specifically, you should avoid -masm=armasm and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/...
Thanks, Antonio ________________________________ From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Sent: Wednesday, October 15, 2025 11:00 To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: [TF-M] TFM fails to compile asm (.s) file for CM55 core
Hi all,
I see that https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/31942 changes the way ASM files are built for Clang, this seems to cause the issues in our build:
I am trying to compile following file https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... for cortex-m55https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/TOOLCHAIN_ARM/cy_syslib_ext.s%20for%20cortex-m55 CPU but I get following errors:
armclang: error: armasm does not support CPU 'cortex-m55'
armclang: error: armasm does not support FPU 'unknown'
cmd.txt shows full compile command for this file.
I suppose this is because -masm=armasm does not support CM55 core?
Any ideas how to fix this?
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Antonio,
Interesting suggestion, but still when I apply https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/44148 and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... I get following errors:
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:42:1: error: unknown directive .func Cy_SysLib_DelayCycles, Cy_SysLib_DelayCycles ^ C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:61:1: error: unknown directive .endfunc ^ C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:79:1: error: unknown directive .func Cy_SysLib_EnterCriticalSection, Cy_SysLib_EnterCriticalSection ^ C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:88:1: error: unknown directive .endfunc ^ C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:105:1: error: unknown directive .func Cy_SysLib_ExitCriticalSection, Cy_SysLib_ExitCriticalSection ^ C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:113:1: error: unknown directive .endfunc ^
Regards, Bohdan Hunko
Cypress Semiconductor Ukraine Engineer CSUKR CSS ICW SW FW Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis Antonio.DeAngelis@arm.com Sent: Wednesday, 15 October 2025 14:18 To: tf-m@lists.trustedfirmware.org Cc: Hunko Bohdan (CSS ICW SW INT BFS SFW) Bohdan.Hunko@infineon.com; nd nd@arm.com Subject: Re: TFM fails to compile asm (.s) file for CM55 core
Caution: This e-mail originated outside Infineon Technologies. Please be cautious when sharing information or opening attachments especially from unknown senders. Refer to our intranet guidehttps://intranet-content.infineon.com/explore/aboutinfineon/rules/informationsecurity/ug/SocialEngineering/Pages/SocialEngineeringElements_en.aspx to help you identify Phishing email.
Hi Bohdan,
support for -masm=armasm is indeed not available for Cortex-M55 and newer CPUs. This is meant to be a temporary option to allow the migration of legacy assembly code to the GNU notation. In TF-M we keep it as an option but we should drop it as well soon now that we don't have pretty much anymore assembly source in the project apart for some platform startup files, and in particular we have just realised that the psoc64 armclang startup files would have to be aligned to the GNU ones for this to work. We will loop you in that change soon.
For your case specifically, you should avoid -masm=armasm and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/...
Thanks, Antonio ________________________________ From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Wednesday, October 15, 2025 11:00 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] TFM fails to compile asm (.s) file for CM55 core
Hi all,
I see that https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/31942 changes the way ASM files are built for Clang, this seems to cause the issues in our build:
I am trying to compile following file https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... for cortex-m55https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/TOOLCHAIN_ARM/cy_syslib_ext.s%20for%20cortex-m55 CPU but I get following errors:
armclang: error: armasm does not support CPU 'cortex-m55'
armclang: error: armasm does not support FPU 'unknown'
cmd.txt shows full compile command for this file.
I suppose this is because -masm=armasm does not support CM55 core?
Any ideas how to fix this?
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Bohdan,
thanks apparently the .func directive is not supported by Armclang with the GNU backend. We're looking for alternative approaches. Will keep you posted.
Thanks, Antonio ________________________________ From: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com Sent: Wednesday, October 15, 2025 14:32 To: Antonio De Angelis Antonio.DeAngelis@arm.com; tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: TFM fails to compile asm (.s) file for CM55 core
Hi Antonio,
Interesting suggestion, but still when I apply https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/44148 and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... I get following errors:
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:42:1: error: unknown directive
.func Cy_SysLib_DelayCycles, Cy_SysLib_DelayCycles
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:61:1: error: unknown directive
.endfunc
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:79:1: error: unknown directive
.func Cy_SysLib_EnterCriticalSection, Cy_SysLib_EnterCriticalSection
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:88:1: error: unknown directive
.endfunc
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:105:1: error: unknown directive
.func Cy_SysLib_ExitCriticalSection, Cy_SysLib_ExitCriticalSection
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:113:1: error: unknown directive
.endfunc
^
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis Antonio.DeAngelis@arm.com Sent: Wednesday, 15 October 2025 14:18 To: tf-m@lists.trustedfirmware.org Cc: Hunko Bohdan (CSS ICW SW INT BFS SFW) Bohdan.Hunko@infineon.com; nd nd@arm.com Subject: Re: TFM fails to compile asm (.s) file for CM55 core
Caution: This e-mail originated outside Infineon Technologies. Please be cautious when sharing information or opening attachments especially from unknown senders. Refer to our intranet guidehttps://intranet-content.infineon.com/explore/aboutinfineon/rules/informationsecurity/ug/SocialEngineering/Pages/SocialEngineeringElements_en.aspx to help you identify Phishing email.
Hi Bohdan,
support for -masm=armasm is indeed not available for Cortex-M55 and newer CPUs. This is meant to be a temporary option to allow the migration of legacy assembly code to the GNU notation. In TF-M we keep it as an option but we should drop it as well soon now that we don't have pretty much anymore assembly source in the project apart for some platform startup files, and in particular we have just realised that the psoc64 armclang startup files would have to be aligned to the GNU ones for this to work. We will loop you in that change soon.
For your case specifically, you should avoid -masm=armasm and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/...
Thanks,
Antonio
________________________________
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Wednesday, October 15, 2025 11:00 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] TFM fails to compile asm (.s) file for CM55 core
Hi all,
I see that https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/31942 changes the way ASM files are built for Clang, this seems to cause the issues in our build:
I am trying to compile following file https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... for cortex-m55https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/TOOLCHAIN_ARM/cy_syslib_ext.s%20for%20cortex-m55 CPU but I get following errors:
armclang: error: armasm does not support CPU 'cortex-m55'
armclang: error: armasm does not support FPU 'unknown'
cmd.txt shows full compile command for this file.
I suppose this is because -masm=armasm does not support CM55 core?
Any ideas how to fix this?
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Bohdan,
we investigated this and we believe that you could just remove the .func and .endfunc directives from your GNU syntaxed assembly files and that should work. I have pushed a patch in TF-M for that here:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/44148
but you would have to change the external SDK assembly depdency as well:
$<$<C_COMPILER_ID:ARMClang>:${CY_MTB_PDL_CAT1_LIB_PATH}/drivers/source/TOOLCHAIN_ARM/cy_syslib_mdk.s>
must be made to point to the corresponding TOOLCHAIN_GCC_ARM in the SDK dep repo and that .s file has to drop the .func and .endfunc directives.
Please let us know if you're happy with it (and when your depdencies are sorted) we will then be able to push this.
Thanks, Antonio
________________________________ From: Antonio De Angelis via TF-M tf-m@lists.trustedfirmware.org Sent: Wednesday, October 15, 2025 14:57 To: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: [TF-M] Re: TFM fails to compile asm (.s) file for CM55 core
Hi Bohdan,
thanks apparently the .func directive is not supported by Armclang with the GNU backend. We're looking for alternative approaches. Will keep you posted.
Thanks, Antonio ________________________________ From: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com Sent: Wednesday, October 15, 2025 14:32 To: Antonio De Angelis Antonio.DeAngelis@arm.com; tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: TFM fails to compile asm (.s) file for CM55 core
Hi Antonio,
Interesting suggestion, but still when I apply https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/44148 and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... I get following errors:
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:42:1: error: unknown directive
.func Cy_SysLib_DelayCycles, Cy_SysLib_DelayCycles
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:61:1: error: unknown directive
.endfunc
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:79:1: error: unknown directive
.func Cy_SysLib_EnterCriticalSection, Cy_SysLib_EnterCriticalSection
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:88:1: error: unknown directive
.endfunc
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:105:1: error: unknown directive
.func Cy_SysLib_ExitCriticalSection, Cy_SysLib_ExitCriticalSection
^
C:/Work/TFM/repos/ifx/ifx-trusted-firmware-m/build_e/libs/ifx_dev_support-src/pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_ext.S:113:1: error: unknown directive
.endfunc
^
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis Antonio.DeAngelis@arm.com Sent: Wednesday, 15 October 2025 14:18 To: tf-m@lists.trustedfirmware.org Cc: Hunko Bohdan (CSS ICW SW INT BFS SFW) Bohdan.Hunko@infineon.com; nd nd@arm.com Subject: Re: TFM fails to compile asm (.s) file for CM55 core
Caution: This e-mail originated outside Infineon Technologies. Please be cautious when sharing information or opening attachments especially from unknown senders. Refer to our intranet guidehttps://intranet-content.infineon.com/explore/aboutinfineon/rules/informationsecurity/ug/SocialEngineering/Pages/SocialEngineeringElements_en.aspx to help you identify Phishing email.
Hi Bohdan,
support for -masm=armasm is indeed not available for Cortex-M55 and newer CPUs. This is meant to be a temporary option to allow the migration of legacy assembly code to the GNU notation. In TF-M we keep it as an option but we should drop it as well soon now that we don't have pretty much anymore assembly source in the project apart for some platform startup files, and in particular we have just realised that the psoc64 armclang startup files would have to be aligned to the GNU ones for this to work. We will loop you in that change soon.
For your case specifically, you should avoid -masm=armasm and use https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/...
Thanks,
Antonio
________________________________
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Wednesday, October 15, 2025 11:00 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] TFM fails to compile asm (.s) file for CM55 core
Hi all,
I see that https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/31942 changes the way ASM files are built for Clang, this seems to cause the issues in our build:
I am trying to compile following file https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/... for cortex-m55https://github.com/Infineon/mtb-dsl-pse8xxgp/blob/master/pdl/drivers/source/TOOLCHAIN_ARM/cy_syslib_ext.s%20for%20cortex-m55 CPU but I get following errors:
armclang: error: armasm does not support CPU 'cortex-m55'
armclang: error: armasm does not support FPU 'unknown'
cmd.txt shows full compile command for this file.
I suppose this is because -masm=armasm does not support CM55 core?
Any ideas how to fix this?
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
tf-m@lists.trustedfirmware.org