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

Why does keil erase softdevice hex and the app hex when doing a clean build?

I am trying to figure out how/if I can program the softdevice hex from keil? I know I can just use nRF studio however its annoying sometimes....I also noticed I cannot rebuild the softdevice hex and when you do a clean all it literally erases all hex from project including the softdevice, how can I prevent this and/or why is this happening?

  • Thanks that's a really great article however it only answers about half the question....I need to know why and/or how to stop the Keil IDE from erasing the softdevice HEX file from the directory when I do a clean build...it erases the HEX from the project which is fine but I dont want it to erase the softdevice as its annoying to copy back all the time after hitting that function.

  • Keil should not be able to overwrite the softdevice. This is Keil µvision 5? What SDK project and version are you using? What are the ROM settings(Start, Size) in the Keil project?

  • No No I don't mean overwrite I mean if you press clean build from Keil from SDK any version but I am using 12.1 and 12.2 it actually deletes the softdevice HEX file and I am not sure how to rebuild it...is that even possible? I obviously realize I can just copy the HEX file and I know I can program it from nRF goStudio but that it.....

    I am trying to figure out how to stop the Keil IDE from erasing both my soft-device and hex file from project folder?? I don't care if the application gets erased obviously however the softdevice being erased is a bit annoying.....Also I cannot remake the softdevice HEX once erased is this true?

  • The SoftDevice hex should be located SDK_Folder\components\softdevice\S13x\hex\. The SoftDevice is a precompiled and linked binary, you should never have to “build” or “rebuild” the SoftDevice. If you tried building the application in Keil using the target flash_s132_nrf52_3.0.0_softdevice, the hex file in the SDK might have been removed. You then have to download and copy the hex file into the directory specified above. Use the regular "nrf52832_xxaa" as target in Keil, and the SoftDevice hex should not be deleted/removed.

Related