Skip to main content
Xwang.41
Associate
March 5, 2021
Solved

Use the latest version of IAR to compile the standard peripheral library, get some faults.

  • March 5, 2021
  • 3 replies
  • 2322 views

IAR version is 9.10.1, the lib version is 1.5.0 for F0 device. The IAR expose a lot of faults about "core_cm0.h". I do not change anything, just open the project file under "EWARM", then compile.

This topic has been closed for replies.
Best answer by Imen.D

Hi @Xwang.4​ ,

In fact, this issue also appears when I used old release EWARM 8.50.6 and it’s caused by wrong path to core_cm0.h file.

Could you please try the following steps and let me know if that fixes your issue ?

  • Open the project template using EWARM v9.10.1
  • From project options -> C/C++ compiler add the following path:

\Project repository\STM32F0xx_StdPeriph_Lib_V1.5.0\Libraries\CMSIS\Include

0693W000008w8SGQAY.png 

  • Build the project

Note: the project in "STM32F0xx_StdPeriph_Lib_V1.5.0" package was developed using an old IDE version (EWARM V7.30.3)

If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be very helpful for Community users to find this solution more quickly.

If you still need help, feel free to ask your question in more detail.

Imen

3 replies

Ozone
Principal
March 5, 2021

I never tried the SPL examples with IAR.

However, the CMSIS headers like core_cm0.h contain specific defines for several different toolchains.

You might need to set the IAR-specific define (__ICCARM__) on project level.

Technical Moderator
March 5, 2021

Hello @Xwang.4​ and welcome to the STM32 Community =)

Can you please provide me with the project you are using, so that I can reproduce the error on my side?

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
Imen.DBest answer
Technical Moderator
March 5, 2021

Hi @Xwang.4​ ,

In fact, this issue also appears when I used old release EWARM 8.50.6 and it’s caused by wrong path to core_cm0.h file.

Could you please try the following steps and let me know if that fixes your issue ?

  • Open the project template using EWARM v9.10.1
  • From project options -> C/C++ compiler add the following path:

\Project repository\STM32F0xx_StdPeriph_Lib_V1.5.0\Libraries\CMSIS\Include

0693W000008w8SGQAY.png 

  • Build the project

Note: the project in "STM32F0xx_StdPeriph_Lib_V1.5.0" package was developed using an old IDE version (EWARM V7.30.3)

If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be very helpful for Community users to find this solution more quickly.

If you still need help, feel free to ask your question in more detail.

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
Xwang.41
Xwang.41Author
Associate
March 8, 2021

Thanks, it can be compiled correctly.