So I got access to a IAR manual and the issue is in fact that with our recent refactoring the IAR FIH_LABEL uses the “::” instead of a single “:” . That will make it a public symbol and will lead to clashes. We are going to discuss internally to double check if that was done intentionally and provide a patch early next week.
Thanks, Antonio
Sent from Outlook for Mac
From: Antonio De Angelis via TF-M tf-m@lists.trustedfirmware.org Date: Friday, 14 November 2025 at 15:15 To: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com, tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: Hennadiy.Kytsun@infineon.com Hennadiy.Kytsun@infineon.com, nd nd@arm.com Subject: [TF-M] Re: IAR + FIH issue
So just to clarify, you might need to explicitly make the symbol local, so the macro would have to be modified to have something like:
“FIH_LABEL_ …” to “LOCAL FIH_LABEL_ ...\n FIH_LABEL_ ...”
Given that the label itself is computed attaching line and cnt, it looks like quite ugly eventually…
Thanks,
Antonio
Sent from Outlook for Mac
From: Antonio De Angelis via TF-M tf-m@lists.trustedfirmware.org Date: Friday, 14 November 2025 at 15:09 To: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com, tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: Hennadiy.Kytsun@infineon.com Hennadiy.Kytsun@infineon.com, nd nd@arm.com Subject: [TF-M] Re: IAR + FIH issue
Hi Bohdan,
I don’t have access to a IAR compiler, it seems it might require to change this line:
https://git.trustedfirmware.org/plugins/gitiles/TF-M/trusted-firmware-m/+/re...
To prefix “FIH_LABEL …" with "LOCAL FIH_LABEL …"
Can you give it a try if possible and let me know?
Thanks, Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com Date: Friday, 14 November 2025 at 13:37 To: Antonio De Angelis Antonio.DeAngelis@arm.com, tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: Hennadiy.Kytsun@infineon.com Hennadiy.Kytsun@infineon.com, nd nd@arm.com Subject: RE: IAR + FIH issue
Hi Antonio,
We have this commit in our tee, but it does not solve the issue I described.
FYI – that commit is helpful as it solves other compile issues, but not the one I reported.
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: Friday, 14 November 2025 15:23 To: Hunko Bohdan (CSS ICW SW INT BFS SFW) Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org Cc: Kytsun Hennadiy (CSS ICW SW INT BFS SFW) Hennadiy.Kytsun@infineon.com; nd nd@arm.com Subject: Re: IAR + FIH issue
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,
Does this help?
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/44258
Thanks, Antonio
Sent from Outlook for Mac From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Friday, 14 November 2025 at 12:43 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: Hennadiy.Kytsun@infineon.commailto:Hennadiy.Kytsun@infineon.com <Hennadiy.Kytsun@infineon.commailto:Hennadiy.Kytsun@infineon.com> Subject: [TF-M] IAR + FIH issue Hi all,
I am trying to build TFM with IAR with TFM_FIH_PROFILE=HIGH and I am facing the issue with the FIH labels.
I see following errors: [ 98%] Linking C executable ../bin/tfm_s.axf Error[Li006]: duplicate definitions for "FIH_LABEL_FIH_CALL_END_46_1"; in "main.o(libtfm_spm.a)", and "tfm_hal_platform.o(libtfm_spm.a)" Error[Li006]: duplicate definitions for "FIH_LABEL_FIH_CALL_START_46_1"; in "main.o(libtfm_spm.a)", and "tfm_hal_platform.o(libtfm_spm.a)" Error[Li006]: duplicate definitions for "FIH_LABEL_FIH_CALL_END_35_0"; in "tfm_hal_platform.o(libtfm_spm.a)", and "platform_svc_handler.o(libtfm_spm.a)" Error[Li006]: duplicate definitions for "FIH_LABEL_FIH_CALL_START_35_0"; in "tfm_hal_platform.o(libtfm_spm.a)", and "platform_svc_handler.o(libtfm_spm.a)"
I did some investigations and I believe I know the root cause: Looks like __COUNTER__ for IAR is unique only for a translation unit (.c file) – thus when 2 files have FIH call in same line with the same number of FIH calls before – it creates a label which overlaps with labels in other file.
For example tfm_hal_platform.c in our case has first FIH CALL in line 46 (which creates label FIH_LABEL_FIH_CALL_END_46_1) but main.c in our code also has first FIH CALL in line 46 which also results in FIH_LABEL_FIH_CALL_END_46_1 label.
The question is – how can we solve this issue? Any ideas I can try?
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