I need to remap ble bootloader because I want to use nrf52832_AB instead of nrf52832_AA found in dev kits.
I wish I could have this memory mapping in embedded flash :
0x00000000 - 0x00001000 MBR
0x00001000 - 0x00026000 softdevice
0x00026000 - 0x00036000 my app and app data
0x00036000 - 0x0003E000 booloader
0x0003E000 - 0x0003F000 boot data
0x0003F000 - 0x00040000 mbr data
So I've set IROM start and IROM size to fair values in Keil at compilation time for bootloader and my app, but at execution time, when pushing a package in the device, the bootloader raise an error and the system in stuck, even after reboot.
I've set #define BOOTLOADER_SETTINGS_ADDRESS (0x0003F000UL)
I think bootloader writes at a wrong address, but it's just a guess.
Edit 1 : Iv'e set NRF_DFU_APP_DATA_AREA_SIZE to 0 and the bootloader transfert process is going on, but the application never starts. The application has been validated on an AB and the whole process has been tested on a AA
The problem stands in nrf_dfu_types.h, because I've made a project copied from secure bootloader. In the Keil project settings, nrf52832_AA was still defined so that bootlodaer settings address was not set correctly.
Othewise, I had to reduce the project size in flash, by setting off the log module, which was not important because debug is made whithout bootloader.
In short, when you want to have a bootloader from AA to AB type you have to :
- set ROM start to 0x00036000
- set ROM size to 0x8000
- use the RAM not used by softdevice
- set booloader settings address to 0x0003F000UL
- set ROM start to softdevice end (see this post )
- set RAM accordingly
- be sure that app ROM size doesn't exceed the space between softdevice and bootloader