Custom bootloader with softdevice with jump to a specific address of app

Hi!

I try to explain quickly my setup that is working, I am on nrf52805 and I have SD112 ( 7.2.0 ) onboard. I am ok with placing bootloader at specific address using linker file, working correctly and also jump to the app is working correctly. My bootloader is custom ( not using softdevice - application needs sd instead), i just receive data from uart, erase app flash and rewrite with it with new app. All working if fw is above SD.

My issue is that I have a firmware now with a custom header needed for signature verification, which introduces an offsett on starting address of my app ( 0x800 + BASEADDRR ), I am quite sure that I can instruct MBR+SD to jump there reading this post , but i can't get it working. My understanding is that:

When I reset from bootloader i have to:

  • use SD_MBR_COMMAND_IRQ_FORWARD_ADDRESS_SET with my address plus the offset ( no more jump to 0x1000 default address )
  • Reset and jump there

But seems not working, I can't understand if I need also to use in some way this mbr command NRF_MBR_COMMANDS_SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET, but it's not clear to me ( and in this case it seems that I have to allocate a page for Settings right? ).

Thanks in advance!

Related