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

Embedded Studio With Bootloader + Application

All,

I'm relatively new with the Nordic Ecosystem and have been playing with the example projects on the nRF52 DK and have successfully gotten several examples up and running including 'Blinky' and 'Bootloader Secure BLE.' In addition, I have successfully merged the S132 softdevice, bootloader, blinky, and a bootloader settings file that I generated into 1 hex file that I was able to load and have it successfully jump into the blinky application.

Moving forward with Nordic, my plan is to have a modified bootloader project and a main application in 1 solution that I can load. I know that multiple hex files can be loaded from the Debug->Loader but when I've attempted using the individual files from the merge I get errors about a section not fitting in the target description. I'm assuming this is due to FLASH_START and SRAM_START not being set properly for each project. How can I determine the proper FLASH_START and SRAM_START for both the bootloader and main application?

EDIT: Below is a screenshot of the error: image description

Parents
  • Hi,

    I know this is very late, but I struggled with this for quite a while.  The solution I found to load the SoftDevice, Bootloader, and Application in Segger Embedded Studio with additional load files was to add the following lines to Segment Placement Macros in Edit Options->Linker 

    uicr_bootloader_start_address RX 0x10001014 0x4
    bootloader_settings_page RX 0x0007F000 0x1000
    mbr_params_page RX 0x0007E000 0x1000
    uicr_mbr_params_page RX 0x10001018 0x4

    And add the following XML sections to flash_placement.xml:

      <MemorySegment name="bootloader_settings_page" start="0x0007F000" size="0x1000">
        <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloader_settings_page" address_symbol="__start_bootloader_settings_page" end_symbol="__stop_bootloader_settings_page" start = "0x0007F000" size="0x1000" />
      </MemorySegment>
      <MemorySegment name="mbr_params_page" start="0x0007E000" size="0x1000">
        <ProgramSection alignment="4" keep="Yes" load="No" name=".mbr_params_page" address_symbol="__start_mbr_params_page" end_symbol="__stop_mbr_params_page" start = "0x0007E000" size="0x1000" />
      </MemorySegment>
      <MemorySegment name="uicr_bootloader_start_address" start="0x10001014" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_bootloader_start_address" address_symbol="__start_uicr_bootloader_start_address" end_symbol="__stop_uicr_bootloader_start_address" start = "0x10001014" size="0x4" />
      </MemorySegment>
      <MemorySegment name="uicr_mbr_params_page" start="0x10001018" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_mbr_params_page" address_symbol="__start_uicr_mbr_params_page" end_symbol="__stop_uicr_mbr_params_page" start = "0x10001018" size="0x4" />
      </MemorySegment>
    

Reply
  • Hi,

    I know this is very late, but I struggled with this for quite a while.  The solution I found to load the SoftDevice, Bootloader, and Application in Segger Embedded Studio with additional load files was to add the following lines to Segment Placement Macros in Edit Options->Linker 

    uicr_bootloader_start_address RX 0x10001014 0x4
    bootloader_settings_page RX 0x0007F000 0x1000
    mbr_params_page RX 0x0007E000 0x1000
    uicr_mbr_params_page RX 0x10001018 0x4

    And add the following XML sections to flash_placement.xml:

      <MemorySegment name="bootloader_settings_page" start="0x0007F000" size="0x1000">
        <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloader_settings_page" address_symbol="__start_bootloader_settings_page" end_symbol="__stop_bootloader_settings_page" start = "0x0007F000" size="0x1000" />
      </MemorySegment>
      <MemorySegment name="mbr_params_page" start="0x0007E000" size="0x1000">
        <ProgramSection alignment="4" keep="Yes" load="No" name=".mbr_params_page" address_symbol="__start_mbr_params_page" end_symbol="__stop_mbr_params_page" start = "0x0007E000" size="0x1000" />
      </MemorySegment>
      <MemorySegment name="uicr_bootloader_start_address" start="0x10001014" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_bootloader_start_address" address_symbol="__start_uicr_bootloader_start_address" end_symbol="__stop_uicr_bootloader_start_address" start = "0x10001014" size="0x4" />
      </MemorySegment>
      <MemorySegment name="uicr_mbr_params_page" start="0x10001018" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_mbr_params_page" address_symbol="__start_uicr_mbr_params_page" end_symbol="__stop_uicr_mbr_params_page" start = "0x10001018" size="0x4" />
      </MemorySegment>
    

Children
No Data
Related