This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Keil fake error __STATIC_INLINE

My project is compiling and working, but there is this very annoying issue when Keil thinks there is a problem with __STATIC_INLINE in the file cmsis_armcc.h. It indicates an error throughout the include chain and it makes its way up to the top main function (when including nrf.h). This makes almost every file I use having one red cross in it indicating an error. When hunting for real bugs, this becomes very annoying and distracting.

So far I tried to put compiler definition into Project Options, but that didnt help. Is there anything I can do about this?

I am using Keil v5.16a and SDK v9.0.0

Parents
  • which version of CMSIS did you install? I have installed CMSIS core 4.1.0 and i do not see any CMSIS_armcc.h included inside core_cmInstr.h file.

    Also the __STATIC and INLINE declaration inside core_cmo.h file are done before core_cmInstr.h file is include, so they should be visible to all the include chain after that. Not sure why you get this error. Is it possible that you edited any files for debugging and something has changed? have you tried uninstalling CMSIS and re-installing it again?

Reply
  • which version of CMSIS did you install? I have installed CMSIS core 4.1.0 and i do not see any CMSIS_armcc.h included inside core_cmInstr.h file.

    Also the __STATIC and INLINE declaration inside core_cmo.h file are done before core_cmInstr.h file is include, so they should be visible to all the include chain after that. Not sure why you get this error. Is it possible that you edited any files for debugging and something has changed? have you tried uninstalling CMSIS and re-installing it again?

Children
No Data
Related