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

nrf52-ble-app-lbs compilation error "core_cm4.h" not found

Hi, i;m trying to build the "nrf52-ble-app-lbs" example which i downloaded from git hub github.com/.../nRF52-ble-app-lbs.

I followed the instructions in the README file.I'm not using any IDE. I invoked make in armgcc folder.

But i'm getting following error.

../../../../../../components/device/nrf52.h:137:130: fatal error: core_cm4.h: No such file or directory compilation terminated. make: *** [_build/app_button.o] Error 1

Parents
  • Resolved the problem by adding following in the makefile INC_PATHS += -I../../../../../../components/toolchain/CMSIS/Include

    I hope this is the right way. Kindly advise if there is a more appropriate solution.

Reply
  • Resolved the problem by adding following in the makefile INC_PATHS += -I../../../../../../components/toolchain/CMSIS/Include

    I hope this is the right way. Kindly advise if there is a more appropriate solution.

Children
  • This should be good. The folder structure has changed slightly between SDK releases, which means the above change in the Makefile is required.

  • The structure of the SDK has changed since this example was made. The error you saw occurred because there is an #include "core_cm4.h" in nrf52.h and this was not found because the path to core_cm4.h wasn't in the INC_PATHS.

    Since the CMSIS files were moved to the folder you included above it works now. It used to be the case these files were in the toolchain/gcc/ directory (an SDK or two revision ago..)

    Feel free to make a pull request on GitHub if you'd like adding your fix!