Technical Note 75890

CMSIS build problems with IAR Embedded Workbench for ARM 6.20

EW targets: ARM
EW component: C/C++ compiler
Keywords: C compiler, CMSIS, Project
Last update: June 22, 2011

Problem
There is an issue with older versions of CMSIS and IAR Embedded Workbench for ARM (EWARM) 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.

Solutions


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 the C/C++ Compiler (link to the right): http://supp.iar.com/FilesPublic/UPDINFO/005832/arm/doc/infocenter/iccarm.ENU.html

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.


Background
The compiler that comes with EWARM 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 EWARM, 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 EWARM 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.

Release notes for 6.20.1

Related Support notes:

Technical note 23971
Example projects fail to build. (6.20.1)