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

RAM and ROM address initialization in Keil

I have an nRF51822 chipset (256KB Flash memory and 32KB ROM) that want to put the ble_app_uart code on it from the nRF51_SDK_10.0.0_dc26b5e SDK. I am using Keil 5. I know that I should first put the SoftDevice on the nRF51822 chipset, but I fail this step. What I do is to select the flash_s110_nrf51_8.0.0_softdevice from the drop down menu near the download button. But it throws Error: Flash Download failed - "Cortex-M0". I suspect it is because the RAM and ROM start and size are wrong. I leave them at default values of below:

ROM Start: 0x0    ROM Size: 0x40000

RAM Start: 0x20000000    RAM Size: 0x8000

Then the next step is to build and program the application to the nRF51822 chipset. Please comment on the RAM and ROM address and size initialization on that as well. 

Also that would be great if there is a step-by-step tutorial on how to port an application with a soft device to nRF51822. I could not find anything complete and accurate online.

Parents Reply Children
  • Hi Simon,

    Thanks much for your reply. I actually tried the SDK you mentioned, I can program the application but still cannot program the softdevice. Here is the process I go through:

    I use an ARM Keil ULINK2 programmer and use it to program my nRF51822 module in SW mode. I use Keil uVision 5. I only connect SWCLK, SWDIO and GND between my nRF51822 and the programmer. The nRF51822 module is powered bu an external power supply. I leave the ROM and RAM start addresses as below: 

    ROM Start: 0x0    ROM Size: 0x40000

    RAM Start: 0x20000000    RAM Size: 0x8000

    Another thing to note is that, if I go under 'options for programmer' > debug > settings > 'Flash Download' and leave the 'Download Function' in 'Erase Sectors', the programmer even fails to erase the nRF51822. But when I set it to 'Erase Full Chip', during SoftDevice programming, it at least passes the erase step. But regardless, I get the same error as before: Error: Flash Download failed - "Cortex-M0". Just FYI, I use the below module by Adafruit:

    https://www.adafruit.com/product/4076?gclid=EAIaIQobChMI65SExNXN4gIVDNlkCh2MBAdMEAQYASABEgK4vvD_BwE



Related