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

Starting own application with flashed SoftDevice

Hi everyone!

I was not able to find the answer, so could you please clarify what did I miss when I exercised with my application.

First, I was able to build ble_central_and_peripheral for pca10100. The build was flashed along with SD140 and the example works fine. Flashing is done using nrfjprog through USB.

Next step is to try to substitute example by my application and run it. My application does not have any SD API calls, the idea was to try just run it when SD is in the flash memory. The application itself works fine (I see my printouts come from UART) if I run it with no SD, so I use following configuration in linker script file:

MEMORY
{
FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x80000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x20000
}

I changed the configuration as follows:

MEMORY
{
FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0x80000
RAM (rwx) : ORIGIN = 0x20001678, LENGTH = 0x20000
}

Where 0x27000 and 0x20001678 were got from release notes for SD140 version 7.0.1. I also looked at Adjustment of RAM and Flash memory for common info, btw it does not mention SD140 ver 7.0.1.

I flash evaluation board using this steps (the same steps are used for flashing the example)

nrfjprog.exe -f nrf52 -s <devid> --eraseall

nrfjprog.exe -f nrf52 -s <devid> --program s140_nrf52_7.0.1_softdevice.hex --sectorerase

nrfjprog.exe -f nrf52 -s <devid> --program my_app.hex --sectorerase

nrfjprog.exe -f nrf52 -s <devid> --reset

The application does not start. Did I miss anything? Again, I'd like to just start the application which does not have any SD calls, but located in other address in the flash memory.

Thank you!

Related