This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to setup Keil Uvision for Redbearlab BLE Nano?

I am having problem to download SDK NRF51 12.0 example firmware onto Redbearlab BLE Nano nrf51822. The compilation and build is fine. It is shown as

Erased Failed!
Error: Flash download failed - "Cortex M0" 

This BLE Nano is not using JLink but CMSIS-DAP Debugger. I have uploaded these bootloader here by drag and drop onto the mbed USB drive.

The SDK project points to the flash_s130nrf51_2.0.1_softdevice by default as another flash download option. I usually download the built firmware instead of this soft device. Should I change this, if so how?

Here are my setup for uVision

Device

Target

Output

Listing

Debug

Debug Settings

Flash download

Parents
  • Hi Daniel,

    if the screenshots of the "Options for Target" window belongs to your firmware project, then you have to modify the IRAM/IROM settings under "Options for Target" --> "Target" to the following

    IROM1 Start: 0x0001B000 Size: 0x25000 IRAM1 Start: 0x20002000 Size: 0x6000

    the minimum RAM size required by the S130 v2.x SoftDevice is 0x13C8 bytes, see this page in the SDS, but its commen to provide 0x2000 bytes to give the SoftDevice some headroom. If 0x2000 bytes is not enough, then sd_ble_enable will return the correct RAM start address in the app_ram_base argument.

    Best regards

    Bjørn

  • Hi Daniel, Keil does not merge the application hex with the SoftDevice and bootloader everytime you press download in your application project. You have to flash the SoftDevice and the Bootloader separately or merge all the hex files ( App, SD and BL) into one hex file and flash that. If you do not DFU in the application, then you have to set the BANK_APP_VALID flag in order to tell the bootloader that there is a valid application, see this answer.

Reply
  • Hi Daniel, Keil does not merge the application hex with the SoftDevice and bootloader everytime you press download in your application project. You have to flash the SoftDevice and the Bootloader separately or merge all the hex files ( App, SD and BL) into one hex file and flash that. If you do not DFU in the application, then you have to set the BANK_APP_VALID flag in order to tell the bootloader that there is a valid application, see this answer.

Children
No Data
Related