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

Unable to compile softdevice examples

I have an issue with compilng and loadingthe nrf52840 examples.

I have a nrf52480 pdk and a keil v5 installed on windows. 

Everything is ok when I compile and load nrf52840_xxAA as a target. 

However when I choose flash_s140_nrf52_6.0.0_softdevice I see the error message:

..\..\..\main.c(48): error:  #5: cannot open source input file "nordic_common.h": No such file or directory

I tried to add nordic_common.h which was located C:\Sources\nrfSDK\components\libraries\util    to options for target-> C/C++ -> include paths and miscs. But I am still having error as: error - cannot create command input file '..\..\..\..\..\..\components\softdevice\s140\hex\main.__i'

I added a screenshot from my keil window here below:

PS: nrfgo is working well. I can earase and program all example hex files.

Parents
  • Hi,

    You should not click Build when selecting the flash_s140_nrf52_6.0.0_softdevice to flash the softdevice, only click Download to flash the precompiled softdevice HEX-file to the board.

    If you click build, Keil will remove the hex-file and try to build it. Since you do not have the source of the softdevice available, it will fail.

    If you have clicked on Build, you will have to copy the softdevice hex-file back into the original directory (nRF5_SDK_15.0.0_a53641a\components\softdevice\s140\hex\s140_nrf52_6.0.0_softdevice.hex), either from the original SDK zip file or from the softdevice download, for this functionality to work again.

    Best regards,
    Jørgen

Reply
  • Hi,

    You should not click Build when selecting the flash_s140_nrf52_6.0.0_softdevice to flash the softdevice, only click Download to flash the precompiled softdevice HEX-file to the board.

    If you click build, Keil will remove the hex-file and try to build it. Since you do not have the source of the softdevice available, it will fail.

    If you have clicked on Build, you will have to copy the softdevice hex-file back into the original directory (nRF5_SDK_15.0.0_a53641a\components\softdevice\s140\hex\s140_nrf52_6.0.0_softdevice.hex), either from the original SDK zip file or from the softdevice download, for this functionality to work again.

    Best regards,
    Jørgen

Children
Related