nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

How to change the mbr jump address location

Hi,

I am using nrf5280 development kit and 17.1.0 sdk.

i am working on  ble_app_uart example code.

Its working fine no issue. Since the start address of the application is 0x27000 and i want to change it on to some other location as per my requirement which id 0xE8000.

But when i changed the starting address then its not working. Looks like control not reaches to that location.

or 

mbr not able to jump that location which i changed. 

can someone help me here. what exactly i am missing here.?

Regards

R_S

  • Hi,

    I trace it and found the point where i am getting hard fault.

    ret_code = sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler);

    The result is same even after using nrf_dfu_mbr_vector_table_set() and not nrf_dfu_mbr_irq_forward_address_set() in the bootloader code.

    And the value of registers are mentioned below:

    And yes the only chage in my application is in .icf file that is flash start address change.

    Previously it was 

    And Currently i changed it to this 

    in previous case the application address was 27000 so in that case i directly flashed it without bootloader code.

    And in the current scenario as address is 0xED000, so i flashed it with Bootloader code. But not sure what goes wrong in this case? Because i had used open bootloader and secure bootloader together where code control first goes to open bootloader and then from there it jump to the secure bootloader and then it was no issue. But dont know what wrong with this ble_app_uart code.

     

    Regards

    R_S

  • I see... Can you share your bootloader code, where you branch to the application, including configuring the MBR etc? Please include enough context, so include values of constants that may be set elsewhere etc.

  • HI,

    I have attached the bootloader code here.

    In main.c line no 218. i am calling "nrf_bootloader_app_start();" API to jump to the application part.

    And inside nrf_bootloader_app_start() function i am given the start address as the application start address(0xED000).

    And also calling the function nrf_dfu_mbr_init_sd() & nrf_dfu_mbr_vector_table_set() as you mentioned.

    i also attached nrf_bootloader_app_start.c file in which i have added these chnages.

    apart from that i dont have any change in the bootloader code. An the code i am using is open bootloader code.

    Regards

    R_S

  • Hi,

    I did not get a chance to look at this today, but I will test your code on my end tomorrow and get back to you.

  • Hi Einar,

    The issue got resolved.

    I found that under DFU we are also calling ble_stack_init() function. But there is additional data added in that function.

    So same thing i am calling in ble code under ble_stack_init() function. And after that its working fine.

    actually we need to use these two function calls on both the places once in bootloader before jumping to application and second is inside the application. 

    Regards

    R_S

Related