CMSIS and IAR Embedded Workbench for ARM 6.20

Technical Note 75890



9/18/2015 11:39 AM


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 you 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 has 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.

Related Tech Notes

© IAR Systems 1995-2021 - All rights reserved.

We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies