CMSIS and IAR Embedded Workbench for ARM 6.20

Technical Note 75890






2015-11-06 10:09


There is an issue with older versions of CMSIS and IAR Embedded Workbench for ARM version 6.20.1 and later. This may lead to build errors with CMSIS projects.

The errors are for example "Error[Pe147]" and "Error[Pe337]".
Most of the errors comes from a CMSIS header file named core_cm3.h or similar.


Solution 1

Copy a CMSIS based project from the present version, and use that project as the base to where your application is added.

Solution 2

See the release notes for IAR C/C++ Compiler version 6.20.1

See the chapter "A special note on CMSIS integration", specially the part that starts with "However, ...".

Please note that excluding the CMSIS files from the example projects, some functions required by the examples may disappear. In such a situation, just changing the include paths and excluding some source files is not enough to fix the problem. If so, functions have to be moved from excluded files (like system_stm32f10x.c) to the source in the project in order to build it.


The compiler that comes with IAR Embedded Workbench for ARM 6.20.1 and later has got support for more intrinsics than previous versions, which leads to an incompatibility issue with CMSIS source code that is included in projects.

The essence of the adjustment suggested in the release notes is to "remove" the CMSIS source code included in the project and instead use the CMSIS source code that is installed in IAR Embedded Workbench for ARM, in the "arm\CMSIS" directory. Turn on CMSIS usage in Project > Options... > General Options > Library Configuration > Use CMSIS.

Note that some of the CMSIS example projects in IAR Embedded Workbench for ARM 6.20.1 were affected by the problem discussed above. This has been corrected in later versions.

All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.