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

On DFU jump address

Hello

D:\lianxi\nrf52832\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10040_ble

D:\lianxi\nrf52832\nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040

IAR Software Setting BootLoader Starting Address 0x78000

The starting address of app is 0x26000-0x77fff

1. Ask the example program is only IAR software settings address, example program how to set jump address, app to BootLoader and BootLoader to app?

2. I want to change the address of app, which is changed in IAR software. What needs to be changed in BootLoader app?

Parents
  • Q1: The bootloader start address is stored in one of the UICR register, which is written when you flash the bootloader to the nRF52832, see nrf_bootloader_info.c in the bootloader example. The MBR will check this UICR register on boot and then jump to the bootloader if there is a address present. On jumping to the application the bootloader will jump to the SoftDevice and then teh SoftDevice will jump to its end address where it expects the application to be located. 

    Q2: The application must start where the SoftDevice ends, i.e. if you're using S132 v6.1.0 the application start address must be set to 0x26000 as stated in the release notes. If the application is not placed at this address, then interrupt forwarding will not occur, i.e. the Application will not receive any SoC or Bluetooth events. 

  • 1.Hello, the starting address of app you mentioned is fixed according to the version of the station protocol.

    Is the end of the app larger than the size of the app or close to the BootLoader start address?

    The size of app is 0x1831c, so the end address of app is 2600 + 1831c or 77ffff

    2. How to calculate the start and end address of RAM?

    3. How do BootLoader start and end addresses be calculated?

    Thank you for your reply. I look forward to hearing from you again.

Reply
  • 1.Hello, the starting address of app you mentioned is fixed according to the version of the station protocol.

    Is the end of the app larger than the size of the app or close to the BootLoader start address?

    The size of app is 0x1831c, so the end address of app is 2600 + 1831c or 77ffff

    2. How to calculate the start and end address of RAM?

    3. How do BootLoader start and end addresses be calculated?

    Thank you for your reply. I look forward to hearing from you again.

Children
  • Q1: You typically set the application end address equal to the bootloader start address. 

    Q2: The minimum application ram start address is stated in the S132 SoftDevice release notes(0x1628 bytes). The sd_ble_enable() returns the application start address in the p_app_ram_start variable. 

    Q3: The bootloader is a separate project and its start address and end address is set in the project settings, you can find the IAR project in examples\dfu\secure_bootloader\pca10040_ble\iar. Its by default set to

     FLASH_START=0x78000

    FLASH_SIZE=0x6000

    RAM_START=0x200057b8

    RAM_SIZE=0xa848

Related