Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK samples compile error with Keil MDK V4.7

Hi I'm using Keil MDK 4.7 with nRF5 SDK V15, both of the 2 SDKs are installed at C:\, and the Keil4 Nordic License has been installed. When I tried to compile one of the example projects in the nRF5 SDK, for example the ble_app_blinky, the compiler reported this error:

arm_startup_nrf52.s: error: A1023E: File "..\..\..\..\..\..\modules\nrfx\mdk\arm_startup_nrf52.s" could not be opened: No such file or directory

I've checked that that there is no such a folder "modules" in the nRF5 SDK, but there do exist a file named arm_startup_nrf52.s in C:\Keil\ARM\Device\Nordic\nRF52832\Source\templates\arm

I can modify the configurations like include pathes manually, but it seems there are a lot of references to this folder, did I missed anything in the SDK? or is there an easier way to do it?

Thanks!

Parents
  • Updates: 

    I changed the path of arm_startup.nrf52.s and system_nrf52.c files in project settings, then seems the problem solved at first, but later the compiler reported another error:

    ..\..\..\..\..\..\components\boards\boards.h(43): error:  #5: cannot open source input file "nrf_gpio.h": No such file or directory

    I searched the whole C:\nRF5_SDK_15.0.0_a53641a directory and the whole C:\Keil directory, couldn't find this file. Similarly another error reported as:

    nrf_drv_clock.c: Error:  #5: cannot open source input file "..\..\..\..\..\..\integration\nrfx\legacy\nrf_drv_clock.c": No such file or directory

    So seems I do missed something, but Where Can I find these files?

  • Hi,

    nrf_gpio.h is here: nRF5_SDK_15.0.0_a53641a\modules\nrfx\hal

    nrf_drv_clock.c is here: nRF5_SDK_15.0.0_a53641a\integration\nrfx\legacy

  • Thank you for the reply. I re-downloaded the SDK and the modules folder is there this time. Seems some parts of the SDK were missing during either the downloading or the extracting, but Windows didn't give any alert.

    I recompiled the project this time a linking error prompt:

    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol __BKPT (referred from app_error_weak.o).

    I didn't change anything, just installed the SDK and opened the example project, which is 

    ble_peripheral\ble_app_blinky\pca10040\s132\arm4\ble_app_blinky_pca10040_s132.uvproj

    Have no idea how to fix this, can you help please.

    Thank you!

  • Strange,

    I just build it without any errors or warnings on Keil: 4.72.1.0

Reply Children
Related