Zephyr Toolchain Working Group Meeting – 20 Feb 2020

Rasmussen, Torsten



Today’s meeting minutes:



  • Toolchain support, github overview:
    • https://github.com/zephyrproject-rtos/zephyr/issues/5517


  • Experiences shared from Metaware toolchain work:
    • PR#22668 : Good feedback in the PR.
    • Many primitives are supported in metaware, so no problems here
    • most issues faced in relation to linker scripts, linker script are very gcc centric.
    • Certain features used in gcc cannot be used in Metaware.
    • Lot of time spend on things done in relation to binutils, such as mapping features from e.g. objcopy
    • User space / section rename relies heavily on some advanced features of gcc
    • Assembly code has difference


  • When a toolchain is stated as supported, it means:
    • Whole codebase compiles with that toolchain
    • To ensure this is possible, the following should be ensured:
      • Stick to standard C, ensure this through PR reviews
      • Consider imposing rules regarding, e.g. gcc extensions
      • There should be no to little need for assembly, as most things can be worked around in C.

Assembly should be isolated to special cases.

      • Look at CMSIS-intrinsic, ARM C Language Extensions (ACLE), as those are supported in gcc, llvm, IAR compilers
      • Minimize or remove the need for gcc preprocessing, one example is KConfig failures when trying to pre-process with IAR


  • Documentation:
    • Build system workflow is well described, but adding a new toolchain requires deeper knowledge.


  • Toolchain abstraction in build system that must be addressed
    • The abstraction of toolchains should be improved in Zephyr
      • Use learnings from Metaware work.
    • Evolve linker script to be more commercial toolchain friendly.
      • experience with ICC, Compiling was fast, but failed on linking
    • Python scripts makes lot of assumptions that are gcc/ld specific
    • PR#22668 is a good starting point for introducing needed improvements.


  • Oticon shared their experiences:
    • Current toolchain abstraction is sufficient
    • Oticon completely bypass toolchain / linking in Zephyr by using own and specialized linker script


  • IAR support:
    • IAR is willing to do work to ensure support for IAR
    • Hello World is a first goal, acceptable to use gcc as linker.

Comment: should not be too difficult to also support IAR linker

    • IAR linker can do optimizations not possible with gcc




  • Wayne: PR22668: Continue work, and use as base for better toolchain abstraction
  • Thomas: IAR: Get basic hello world compiling, (linking with GCC)
  • Everyone: Give feedback on PR#22688, and issue: #5517


Best regards


Torsten Tejlmand Rasmussen



Join devel@lists.zephyrproject.org to automatically receive all group messages.