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

Why isnt the Keil compiler finding core_cm0.h?

There are 10000 posts with this problem. I have imported someone else's project, and the file exists at Keil_v5\ARM\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include exactly where it should be and the device packs are installed. Even reinstalled them a couple of times to no effect. I will say the link to the Keil site for the nrf51822 displayed in the Pack Installer is broken.

There MUST be something in the IDE that points the compiler to its installation directory but I cannot find it. Otherwise its very hard to fix an error that states

..\..\..\..\..\..\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory when that is clearly wrong. (the error is pointing to the nordic header file which has the core_cm0.h include in it.

One can add the path to the list of include directories, but this is a system file and that makes no sense to me. The compiler should know about itself, and how many other system features are needed?

Parents
  • What version of Keil uVision are you using? Which SDK is this?

    The release notes of the nRF5 SDK should state which versions it has been tested with, so you may compare there.

    Best regards,
    Kenneth

  • I downloaded the latest version a week ago. I dont really want to use Keil because it is outrageously expensive but the project came that way. As I said, I got it to build by writing in the path to the include files in the Keil install directory along with the other paths to the 'local' header files.It just seems weird to me to be required to hand configure the include files of the system. Never had to do that before with any other build system (Android Studio, Visual Studio, Segger Embedded Studio, etc.). Somehow something must be misconfigured and this 'workaround' is a temporary solution, I may find more surprises when my DK arrives... 

Reply
  • I downloaded the latest version a week ago. I dont really want to use Keil because it is outrageously expensive but the project came that way. As I said, I got it to build by writing in the path to the include files in the Keil install directory along with the other paths to the 'local' header files.It just seems weird to me to be required to hand configure the include files of the system. Never had to do that before with any other build system (Android Studio, Visual Studio, Segger Embedded Studio, etc.). Somehow something must be misconfigured and this 'workaround' is a temporary solution, I may find more surprises when my DK arrives... 

Children
Related