Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186 But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries. Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM. Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186 But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries. Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM. Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1 Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M tf-m@lists.trustedfirmware.org Date: Thursday, 2026. February 26. at 17:22 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: Short enums and short wchar
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186 But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries. Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM. Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
I rebuilt RTX not long ago and was not very difficult. Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think. Maybe a discussion topic for the next Tech Forum?
Thanks Nick
________________________________ From: David Hazi via TF-M tf-m@lists.trustedfirmware.org Sent: 26 February 2026 16:24 To: Antonio De Angelis Antonio.DeAngelis@arm.com; 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: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1 Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M tf-m@lists.trustedfirmware.org Date: Thursday, 2026. February 26. at 17:22 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: Short enums and short wchar
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Let's take this topic to the Tech Forum. Personally, I'd prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it's quite heavy. As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks, Anton
From: Nicola Mazzucato via TF-M tf-m@lists.trustedfirmware.org Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis Antonio.DeAngelis@arm.com; Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org; David Hazi David.Hazi@arm.com Cc: nd nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult. Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think. Maybe a discussion topic for the next Tech Forum?
Thanks Nick
________________________________ From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1 Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I'd very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags - which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) - I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks, Antonio
Sent from Outlook for Mac
From: Anton Komlev Anton.Komlev@arm.com Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato Nicola.Mazzucato@arm.com, Antonio De Angelis Antonio.DeAngelis@arm.com, Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com, tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org, David Hazi David.Hazi@arm.com Cc: nd nd@arm.com Subject: RE: Short enums and short wchar
Let’s take this topic to the Tech Forum. Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy. As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks, Anton
From: Nicola Mazzucato via TF-M tf-m@lists.trustedfirmware.org Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis Antonio.DeAngelis@arm.com; Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org; David Hazi David.Hazi@arm.com Cc: nd nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult. Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think. Maybe a discussion topic for the next Tech Forum?
Thanks Nick
________________________________ From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1 Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi all,
Thank you for the replies and suggestions.
I investigated the short enum and short wchar settings, and here is what I found.
At the moment, enum and wchar width settings are inconsistent across compilers:
Compiler
short enum
short wchar
ARM
YES
YES
GCC
YES
NO
IAR
NO
NO
CLANG
YES
YES
This inconsistency means that we cant choose uniformed flags for our crypto library.
I checked proposed solutions and I can agree that limited bandwith is also huge limitation for our team, thus we also will not be able to implement solutions like moving to freertos or building CMSIS rtos from sources during TFM build are.
As stated by Nicola:
I rebuilt RTX not long ago and was not very difficult.
I believe this is the best solution here – just rebuild RTOS (with versions that are currently used (v5.5.0 for ARMCLANG and GCC compilers and v5.7.0 for IAR compiler)) with -fno-short-wchar and -fno-short-enums. And then remove short enum/wchar from compiler options in respective toolchain.cmake files in TFM.
If this change is acceptable I would gladly make changes in TFM cmake files and maybe @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com would be generous to provide rebuilt for the libraries?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis Antonio.DeAngelis@arm.com Sent: Friday, 27 February 2026 11:08 To: Anton Komlev Anton.Komlev@arm.com; Nicola Mazzucato Nicola.Mazzucato@arm.com; Hunko Bohdan (CSS ICW SWE INT BFS SFW) Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org; David Hazi David.Hazi@arm.com Cc: nd nd@arm.com Subject: Re: Short enums and short wchar
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.
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks, Antonio
Sent from Outlook for Mac From: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>, Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>, Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org>, David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar Let’s take this topic to the Tech Forum. Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy. As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks, Anton
From: Nicola Mazzucato via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult. Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think. Maybe a discussion topic for the next Tech Forum?
Thanks Nick
________________________________ From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1 Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi all,
Any updates on this topic?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Sent: Friday, 27 February 2026 14:23 To: Antonio.DeAngelis@arm.com; Anton.Komlev@arm.com; Nicola.Mazzucato@arm.com; tf-m@lists.trustedfirmware.org; David.Hazi@arm.com Cc: nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
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 all,
Thank you for the replies and suggestions.
I investigated the short enum and short wchar settings, and here is what I found.
At the moment, enum and wchar width settings are inconsistent across compilers:
Compiler
short enum
short wchar
ARM
YES
YES
GCC
YES
NO
IAR
NO
NO
CLANG
YES
YES
This inconsistency means that we cant choose uniformed flags for our crypto library.
I checked proposed solutions and I can agree that limited bandwith is also huge limitation for our team, thus we also will not be able to implement solutions like moving to freertos or building CMSIS rtos from sources during TFM build are.
As stated by Nicola:
I rebuilt RTX not long ago and was not very difficult.
I believe this is the best solution here – just rebuild RTOS (with versions that are currently used (v5.5.0 for ARMCLANG and GCC compilers and v5.7.0 for IAR compiler)) with -fno-short-wchar and -fno-short-enums. And then remove short enum/wchar from compiler options in respective toolchain.cmake files in TFM.
If this change is acceptable I would gladly make changes in TFM cmake files and maybe @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com would be generous to provide rebuilt for the libraries?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com> Sent: Friday, 27 February 2026 11:08 To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com>; Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>; Hunko Bohdan (CSS ICW SWE INT BFS SFW) <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Short enums and short wchar
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.
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks, Antonio
Sent from Outlook for Mac From: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>, Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>, Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org>, David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar Let’s take this topic to the Tech Forum. Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy. As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks, Anton
From: Nicola Mazzucato via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult. Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think. Maybe a discussion topic for the next Tech Forum?
Thanks Nick
________________________________ From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1 Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks, Antonio
Sent from Outlook for Mac From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Bohdan.
Would you be able to join next week Tech forum?
We can discuss the re-building of RTX binaries, flags, etc to make it compatible with everyone. Also, we may want to explore options and interest for other RTOSes.
Hope that helps Thanks Nick
________________________________ From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Sent: 04 March 2026 10:58 To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
Hi all,
Any updates on this topic?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Bohdan.Hunko--- via TF-M tf-m@lists.trustedfirmware.org Sent: Friday, 27 February 2026 14:23 To: Antonio.DeAngelis@arm.com; Anton.Komlev@arm.com; Nicola.Mazzucato@arm.com; tf-m@lists.trustedfirmware.org; David.Hazi@arm.com Cc: nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
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 all,
Thank you for the replies and suggestions.
I investigated the short enum and short wchar settings, and here is what I found.
At the moment, enum and wchar width settings are inconsistent across compilers:
Compiler
short enum
short wchar
ARM
YES
YES
GCC
YES
NO
IAR
NO
NO
CLANG
YES
YES
This inconsistency means that we cant choose uniformed flags for our crypto library.
I checked proposed solutions and I can agree that limited bandwith is also huge limitation for our team, thus we also will not be able to implement solutions like moving to freertos or building CMSIS rtos from sources during TFM build are.
As stated by Nicola:
I rebuilt RTX not long ago and was not very difficult.
I believe this is the best solution here – just rebuild RTOS (with versions that are currently used (v5.5.0 for ARMCLANG and GCC compilers and v5.7.0 for IAR compiler)) with -fno-short-wchar and -fno-short-enums. And then remove short enum/wchar from compiler options in respective toolchain.cmake files in TFM.
If this change is acceptable I would gladly make changes in TFM cmake files and maybe @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com would be generous to provide rebuilt for the libraries?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com> Sent: Friday, 27 February 2026 11:08 To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com>; Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>; Hunko Bohdan (CSS ICW SWE INT BFS SFW) <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Short enums and short wchar
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.
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks,
Antonio
Sent from Outlook for Mac
From: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>, Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>, Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org>, David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar
Let’s take this topic to the Tech Forum.
Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy.
As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks,
Anton
From: Nicola Mazzucato via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult.
Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think.
Maybe a discussion topic for the next Tech Forum?
Thanks
Nick
________________________________
From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1
Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks,
Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi Nicola,
Sure – lets discuss it on the next tech forum. Is it this one [TF-M] Synced invitation: TF-M Tech forum @ Every 4 weeks from 8am to 9am on Thursday (MST) (tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org)
So next Thursday ?
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Nicola Mazzucato Nicola.Mazzucato@arm.com Sent: Wednesday, 4 March 2026 13:05 To: tf-m@lists.trustedfirmware.org; Hunko Bohdan (CSS ICW SWE INT BFS SFW) Bohdan.Hunko@infineon.com Cc: nd nd@arm.com Subject: Re: Short enums and short wchar
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.
Would you be able to join next week Tech forum?
We can discuss the re-building of RTX binaries, flags, etc to make it compatible with everyone. Also, we may want to explore options and interest for other RTOSes.
Hope that helps Thanks Nick
________________________________ From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 04 March 2026 10:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
Any updates on this topic?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Friday, 27 February 2026 14:23 To: Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com; Anton.Komlev@arm.commailto:Anton.Komlev@arm.com; Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David.Hazi@arm.commailto:David.Hazi@arm.com Cc: nd@arm.commailto:nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
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 all,
Thank you for the replies and suggestions.
I investigated the short enum and short wchar settings, and here is what I found.
At the moment, enum and wchar width settings are inconsistent across compilers:
Compiler
short enum
short wchar
ARM
YES
YES
GCC
YES
NO
IAR
NO
NO
CLANG
YES
YES
This inconsistency means that we cant choose uniformed flags for our crypto library.
I checked proposed solutions and I can agree that limited bandwith is also huge limitation for our team, thus we also will not be able to implement solutions like moving to freertos or building CMSIS rtos from sources during TFM build are.
As stated by Nicola:
I rebuilt RTX not long ago and was not very difficult.
I believe this is the best solution here – just rebuild RTOS (with versions that are currently used (v5.5.0 for ARMCLANG and GCC compilers and v5.7.0 for IAR compiler)) with -fno-short-wchar and -fno-short-enums. And then remove short enum/wchar from compiler options in respective toolchain.cmake files in TFM.
If this change is acceptable I would gladly make changes in TFM cmake files and maybe @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com would be generous to provide rebuilt for the libraries?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com> Sent: Friday, 27 February 2026 11:08 To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com>; Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>; Hunko Bohdan (CSS ICW SWE INT BFS SFW) <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Short enums and short wchar
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.
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks,
Antonio
Sent from Outlook for Mac
From: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>, Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>, Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org>, David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar
Let’s take this topic to the Tech Forum.
Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy.
As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks,
Anton
From: Nicola Mazzucato via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult.
Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think.
Maybe a discussion topic for the next Tech Forum?
Thanks
Nick
________________________________
From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1
Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks,
Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Great!
It is next Thursday the 12th at 3PM UK time. Every 4 weeks.
Thanks Nick
________________________________ From: Bohdan.Hunko@infineon.com Bohdan.Hunko@infineon.com Sent: 06 March 2026 10:44 To: Nicola Mazzucato Nicola.Mazzucato@arm.com; tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: RE: Short enums and short wchar
Hi Nicola,
Sure – lets discuss it on the next tech forum. Is it this one
[TF-M] Synced invitation: TF-M Tech forum @ Every 4 weeks from 8am to 9am on Thursday (MST) (tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org)
So next Thursday ?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Nicola Mazzucato Nicola.Mazzucato@arm.com Sent: Wednesday, 4 March 2026 13:05 To: tf-m@lists.trustedfirmware.org; Hunko Bohdan (CSS ICW SWE INT BFS SFW) Bohdan.Hunko@infineon.com Cc: nd nd@arm.com Subject: Re: Short enums and short wchar
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.
Would you be able to join next week Tech forum?
We can discuss the re-building of RTX binaries, flags, etc to make it compatible with everyone. Also, we may want to explore options and interest for other RTOSes.
Hope that helps
Thanks
Nick
________________________________
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 04 March 2026 10:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
Any updates on this topic?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Friday, 27 February 2026 14:23 To: Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com; Anton.Komlev@arm.commailto:Anton.Komlev@arm.com; Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David.Hazi@arm.commailto:David.Hazi@arm.com Cc: nd@arm.commailto:nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
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 all,
Thank you for the replies and suggestions.
I investigated the short enum and short wchar settings, and here is what I found.
At the moment, enum and wchar width settings are inconsistent across compilers:
Compiler
short enum
short wchar
ARM
YES
YES
GCC
YES
NO
IAR
NO
NO
CLANG
YES
YES
This inconsistency means that we cant choose uniformed flags for our crypto library.
I checked proposed solutions and I can agree that limited bandwith is also huge limitation for our team, thus we also will not be able to implement solutions like moving to freertos or building CMSIS rtos from sources during TFM build are.
As stated by Nicola:
I rebuilt RTX not long ago and was not very difficult.
I believe this is the best solution here – just rebuild RTOS (with versions that are currently used (v5.5.0 for ARMCLANG and GCC compilers and v5.7.0 for IAR compiler)) with -fno-short-wchar and -fno-short-enums. And then remove short enum/wchar from compiler options in respective toolchain.cmake files in TFM.
If this change is acceptable I would gladly make changes in TFM cmake files and maybe @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com would be generous to provide rebuilt for the libraries?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com> Sent: Friday, 27 February 2026 11:08 To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com>; Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>; Hunko Bohdan (CSS ICW SWE INT BFS SFW) <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Short enums and short wchar
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.
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks,
Antonio
Sent from Outlook for Mac
From: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>, Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>, Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org>, David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar
Let’s take this topic to the Tech Forum.
Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy.
As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks,
Anton
From: Nicola Mazzucato via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult.
Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think.
Maybe a discussion topic for the next Tech Forum?
Thanks
Nick
________________________________
From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1
Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks,
Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
Hi all,
I have done some testing with and without short enums option with following build settings
1. GCC 2. MinSizeRel build 3. Infineon/pse84 EPC2 platform build 4. TEST_S=ON TEST_NS=ON 5. profile_medium
Here are the results:
Short enums SPE: FLASH: 178344 B 2047 KB 8.51% RAM: 75864 B 988 KB 7.50% NSPE: flash: 101408 B 511 KB 19.38% ram: 512 KB 512 KB 100.00%
Long enums (no -fshoert-enums option) SPE: FLASH: 178344 B 2047 KB 8.51% RAM: 75864 B 988 KB 7.50% NSPE: flash: 101408 B 511 KB 19.38% ram: 512 KB 512 KB 100.00%
The memory consumption seems to be the same – My assumption is that compiler generates enums as 4 bytes even with -fshoert-enums option as 4 bytes aligned access is better anyways, same goes for enums as struct members or function parameters – 4 bytes are used there anyways.
So I think it is safe to just remove the -fshort-enums and -fshort-wchar compile flags – so I have created https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/49176 to do this
Next is for @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com to rebuild RTX in tests repo and then we can merge this change.
Best regards, Bohdan Hunko
Cypress Semiconductor Ukraine LLC Senior Engineer CSS ICW SW INT BFS SFW Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Nicola Mazzucato Nicola.Mazzucato@arm.com Sent: Friday, 6 March 2026 12:48 To: Hunko Bohdan (CSS ICW SWE INT BFS SFW) Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: Re: Short enums and short wchar
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.
Great!
It is next Thursday the 12th at 3PM UK time. Every 4 weeks.
Thanks Nick
________________________________ From: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com> Sent: 06 March 2026 10:44 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar
Hi Nicola,
Sure – lets discuss it on the next tech forum. Is it this one
[TF-M] Synced invitation: TF-M Tech forum @ Every 4 weeks from 8am to 9am on Thursday (MST) (tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org)
So next Thursday ?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com> Sent: Wednesday, 4 March 2026 13:05 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; Hunko Bohdan (CSS ICW SWE INT BFS SFW) <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Short enums and short wchar
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.
Would you be able to join next week Tech forum?
We can discuss the re-building of RTX binaries, flags, etc to make it compatible with everyone. Also, we may want to explore options and interest for other RTOSes.
Hope that helps
Thanks
Nick
________________________________
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 04 March 2026 10:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
Any updates on this topic?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Friday, 27 February 2026 14:23 To: Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com; Anton.Komlev@arm.commailto:Anton.Komlev@arm.com; Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David.Hazi@arm.commailto:David.Hazi@arm.com Cc: nd@arm.commailto:nd@arm.com Subject: [TF-M] Re: Short enums and short wchar
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 all,
Thank you for the replies and suggestions.
I investigated the short enum and short wchar settings, and here is what I found.
At the moment, enum and wchar width settings are inconsistent across compilers:
Compiler
short enum
short wchar
ARM
YES
YES
GCC
YES
NO
IAR
NO
NO
CLANG
YES
YES
This inconsistency means that we cant choose uniformed flags for our crypto library.
I checked proposed solutions and I can agree that limited bandwith is also huge limitation for our team, thus we also will not be able to implement solutions like moving to freertos or building CMSIS rtos from sources during TFM build are.
As stated by Nicola:
I rebuilt RTX not long ago and was not very difficult.
I believe this is the best solution here – just rebuild RTOS (with versions that are currently used (v5.5.0 for ARMCLANG and GCC compilers and v5.7.0 for IAR compiler)) with -fno-short-wchar and -fno-short-enums. And then remove short enum/wchar from compiler options in respective toolchain.cmake files in TFM.
If this change is acceptable I would gladly make changes in TFM cmake files and maybe @Nicola Mazzucatomailto:Nicola.Mazzucato@arm.com would be generous to provide rebuilt for the libraries?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
From: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com> Sent: Friday, 27 February 2026 11:08 To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com>; Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>; Hunko Bohdan (CSS ICW SWE INT BFS SFW) <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: Re: Short enums and short wchar
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.
There were mentions of using FreeRTOS, I believe it’s a good option as well, being it a widely adopted solution in the ecosystem. But we can discuss further in a tech forum.
Thanks,
Antonio
Sent from Outlook for Mac
From: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Date: Thursday, 26 February 2026 at 20:37 To: Nicola Mazzucato <Nicola.Mazzucato@arm.commailto:Nicola.Mazzucato@arm.com>, Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>, Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org>, David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: RE: Short enums and short wchar
Let’s take this topic to the Tech Forum.
Personally, I’d prefer using prebuilt binaries in tf-m-tests and avoiding fetching the CMSIS repo if possible since it’s quite heavy.
As I recall several RTX binary configurations are needed to cover different compiler options.
Thanks,
Anton
From: Nicola Mazzucato via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 26, 2026 5:08 PM To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; David Hazi <David.Hazi@arm.commailto:David.Hazi@arm.com> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
I rebuilt RTX not long ago and was not very difficult.
Though I did not change the flags, we my need to look into that.
It's also possible that TF-M could benefit from a more up-to-date version of RTX.
Not sure what others think.
Maybe a discussion topic for the next Tech Forum?
Thanks
Nick
________________________________
From: David Hazi via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: 26 February 2026 16:24 To: Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi all,
https://github.com/ARM-software/CMSIS-RTX/releases/tag/v5.9.1
Prebuilt images are in the RTX_Lib.tar.bz2 file.
There were discussions about switching to FreeRTOS, is this still an option?
Dávid
From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 2026. February 26. at 17:22 To: Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com>, tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] Re: Short enums and short wchar
Hi Bohdan,
Prebuilt RTX libraries were provided by the CMSIS project but I believe that now they have stopped distributing them. Using the prebuilt libraries at the beginning of TF-M was just a practical choice, I’d very much welcome a contribution to build RTX from source as part of the NS code. Do you think you can work towards that? Currently our bandwidth is limited to spend some engineering time on that but would very much appreciate any contributions.
Thanks,
Antonio
Sent from Outlook for Mac
From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Thursday, 26 February 2026 at 15:58 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] Short enums and short wchar
Hi all,
Currently TFM specifies -fshort-wchar and -fshort-enums
There previously was a discussion about this in https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to remove these flags – which was done in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6186
But then fix was reverted in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/6349 because:
Removing the -fshort-wchar flag will cause link error with
RTX library while using armclang and debug mode.
Now we faced same issue when linking some of our prebuilt crypto libraries.
Since RTX libraries ware prebuilt by TFM maintainers (prebuilt RTX libs are not part of CMSIS RTX) – I believe it is better to rebuild them without -fshort-wchar and -fshort-enums and remove these flags in TFM.
Does TFM team still have a possibility to rebuild these RTX libs? Does this change make sense to TFM community?
Best regards,
Bohdan Hunko
Cypress Semiconductor Ukraine LLC
Senior Engineer
CSS ICW SW INT BFS SFW
Mobile: +380995019714 Bohdan.Hunko@infineon.commailto:Bohdan.Hunko@infineon.com
tf-m@lists.trustedfirmware.org