Using embOS with IAR Embedded Workbench

From SEGGER Wiki
Jump to: navigation, search

embOS was ported for various architectures and respective editions of the IAR Embedded Workbench. This page contains information on how to use embOS with various versions of these editions.

Disabling the IAR stack check feature

The IAR Embedded Workbench includes a stack check feature that will issue warnings to the debug log in case the stack pointer points outside the stack range that was configured in the project options. This typcially results in several warnings being issued when debbuging an application that includes an RTOS, since IAR is not aware of task stacks. It will thus assume the stack pointer does not point to a valid stack range whenever a task stack is used instead of the system stacks. These warning will read “ The stack pointer for stack ... is outside the stack range ...”, similar to the warning shown in the screenshot below:

Active debug session with an IAR steck check warning in the debug log
The IAR steck check warning as displayed in the debug log

Typically, embOS start projects are pre-configured to disable the stack check feature through a *.dni file that is located in the folder settings of the respective start project. If that file was modified or deleted, or a new project was created from scratch, the warnings may reappear. In that case, the warnings may be disabled via the toolchain's options dialog at Tool → Options by unchecking “ Warn when stack pointer is out of bonds” checkbox as shown below:

Disablind the IAR steck check warning in the Options dialog
Uncheck the “ Warn when stack pointer is out of bonds” checkbox

Using embOS with IAR Embedded Workbench for ARM V6/7 and V8

With V8.10 of the IAR Embedded Workbench for ARM, and once again with the release of V8.11 of the Workbench, IAR performed modifications to the Workbench that unfortunately are not backwards-compatible. Specifically, modifications were done to IAR's thread-local storage implementation and the size of the wchar_t data type. Object code that was built using previous versions of the Workbench therefore cannot be used with V8.x of the Workbench and vice versa.

To account for these differences in the IDE versions, starting with V4.34 of embOS for Cortex-M and IAR as well as with V4.34.1 of embOS for ARM and IAR, embOS releases now contain two different shipments in a single Zip file: one shipment contains libraries which may be used with V6.x and V7.x of the IAR Embedded Workbench, while the other contains libraries for use with V8.11 or later.

Except for the contained libraries, these shipments are identical for identical versions of embOS. Customers using source code in their projects therefore may use either shipment, but customers who use the libraries in their projects will need to pick the appropriate shipment for their chosen version of the IAR Embedded Workbench.

Using embOS with IAR Embedded Workbench for RX V2/3 and V4

With V4.10 of the IAR Embedded Workbench for RX, IAR performed modifications to the Workbench that unfortunately are not backwards-compatible.

To account for the differences in the IDE versions, starting with V5.02 of embOS for RX and IAR, embOS releases now contain two different shipments in a single Zip file: one shipment contains libraries which may be used with V2.x and V3.x of the IAR Embedded Workbench, while the other contains libraries for use with V4.10 or later.

Except for the contained libraries, these shipments are identical for identical versions of embOS. Customers using source code in their projects therefore may use either shipment, but customers who use the libraries in their projects will need to pick the appropriate shipment for their chosen version of the IAR Embedded Workbench.