Hello.
I'm investigating how bootloader works (bare minimum), especially how it brings control to an application (already flashed at 0x1B000, s130 SoftDevice also present in flash).
I do the following:
-
Flash s130 2.0.0-7.aplha SoftDevice with nRFgo studio.
-
Flash simple BLE app example at address 0x1B000 (at this step if i reset nRF51822 module - app works fine!)
-
Flash minimal bootloader to 0x3C000 which purpose is only to run app at 0x1B000
The bootloader code is a copy&paste from nRF51422 (no examples for nRF51822 in SDK) bootloader code example - only minimum of code which starts application.
And bootloader fails to start an application - while calling sd_softdevice_vector_table_base_set() function it fails to SVC_Handler at 0x0003C1D2
Could you please tell me how to create bare minimum bootloader which only run application at 0x1B000 ?
Here is the code of minimum bootloader (185 lines of code): http://pastebin.com/kAZruUPp
Questions: if I have s130 SoftDevice stack flashed - should I initialize SoftDevice in bootloader OR bootloader may immediately start app at 0x1B000 (which will initialize SoftDevice and use BLE stack) ?