Skip to content

Conversation

RobinKastberg
Copy link
Contributor

@RobinKastberg RobinKastberg commented Jan 28, 2025

This PR integrates experimental IAR Toolchain support into Zephyr.
Currently supporting selected ARM Cortex-M targets.
We have run internal testing where:

The following have at various points passed --level acceptance (and much more) using the IAR Toolchain

  • ek_ra4e2 (currently misses some CMAKE_LINKER_GENERATOR sections)
  • frdm_mcxn947/mcxn947/cpu0
  • mimxrt1060_evk
  • nrf52840dk/nrf52840
  • qemu_cortex_m0
  • qemu_cortex_m3

Currently this PR is being tested using --level acceptance on qemu_cortex_m3

Limitations/Known Issues

  • Currently only minimallibc is supported, this means Picolibc and Newlib is not supported. There is experimental support for IARs DLib.
  • Currently C++ is not supported
  • Currently TrustZone is not working.
  • Currently CONFIG_USERSPACE is not working due to the usage of CMAKE_LINKER_GENERATOR. Support for CONFIG_USERSPACE is being worked on internally in IAR.
  • --no_system_include should probably be used but isn't currently. We are unsure if this will cause problems.
  • Currently using the GNU Assembler for .S files
  • Currently CONFIG_STACK_CANARIES is not working due to a different type of __stack_chk_guard
  • The current method for static initialization in the linker script generator is experimental and will most likely change during this PR or shortly after this PR.

Obtaining an IAR Toolchain

Right now, a special development version of the IAR build tools for Arm is required to work with Zephyr.
Toolchain can be found here: https://github.com/iarsystems/zephyr-iar/releases

A license is required to use this toolchain.
It is distributed to selected partners and customers for evaluation. If you are interested in being
part of this program, please send a request to our FAE team at [email protected].

TODO

@zephyrbot
Copy link

zephyrbot commented Jan 28, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-cmsis DNM This PR should not be merged (Do Not Merge) labels Jan 28, 2025
@RobinKastberg
Copy link
Contributor Author

rebased due to merge conflict in check_compliance.py. Nothing else fixed for now. Let's try to get this in and it will get easier to work on.

tejlmand
tejlmand previously approved these changes Feb 14, 2025
This adds experimental support for the IAR toolchain.

Signed-off-by: Robin Kastberg <[email protected]>
This commit adds the `Toolchain IAR` area of maintenance.

Signed-off-by: Robin Kastberg <[email protected]>
This commit adds documentation information
about the IAR toolchain.

Signed-off-by: Robin Kastberg <[email protected]>
@kartben
Copy link
Contributor

kartben commented Feb 14, 2025

just force pushed to fix compliance error. @tejlmand please refresh your +1 :)
https://github.com/zephyrproject-rtos/zephyr/compare/df14d6e52d153b2da64020a1d67df3894a9892ad..f1bf5d3a941b54cd98fcaf6e4cf124a90f7b81cf

@fabiobaltieri fabiobaltieri merged commit c3c5333 into zephyrproject-rtos:main Feb 14, 2025
33 checks passed
@ruuddw
Copy link
Member

ruuddw commented Feb 17, 2025

See #85854 it looks like this PR broke ARC MetaWare support, and we were not involved in this PR.
Any idea/suggestion what could be wrong?

bjorniuppsala added a commit to bjorniuppsala/iar-zephyr-fixes that referenced this pull request Feb 17, 2025
Add the -imacros property for assembler language to compensate
for changes introduced in PR zephyrproject-rtos#84800.

Signed-off-by: Björn Bergman <[email protected]>
fabiobaltieri pushed a commit that referenced this pull request Feb 19, 2025
Add the -imacros property for assembler language to compensate
for changes introduced in PR #84800.

Signed-off-by: Björn Bergman <[email protected]>
phb98 pushed a commit to phb98/zephyr that referenced this pull request Feb 20, 2025
Add the -imacros property for assembler language to compensate
for changes introduced in PR zephyrproject-rtos#84800.

Signed-off-by: Björn Bergman <[email protected]>
RuibinChang pushed a commit to RuibinChang/zephyr that referenced this pull request Mar 4, 2025
Add the -imacros property for assembler language to compensate
for changes introduced in PR zephyrproject-rtos#84800.

(cherry picked from commit 36a599f)

Original-Signed-off-by: Björn Bergman <[email protected]>
GitOrigin-RevId: 36a599f
Cr-Build-Id: 8722485936012132001
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8722485936012132001
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I2740d563792e682df058a8ddc9fb9c93cc6e47f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6281753
Bot-Commit: ChromeOS Prod (Robot) <[email protected]>
Commit-Queue: ChromeOS Prod (Robot) <[email protected]>
Tested-by: ChromeOS Prod (Robot) <[email protected]>
ssekar15 pushed a commit to linumiz/zephyr that referenced this pull request Mar 6, 2025
Add the -imacros property for assembler language to compensate
for changes introduced in PR zephyrproject-rtos#84800.

Signed-off-by: Björn Bergman <[email protected]>
ssekar15 pushed a commit to linumiz/zephyr that referenced this pull request Mar 7, 2025
Add the -imacros property for assembler language to compensate
for changes introduced in PR zephyrproject-rtos#84800.

Signed-off-by: Björn Bergman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 3.7 (LTS3)
Development

Successfully merging this pull request may close these issues.