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

Error Migrating Secure Bootloader Project from Keil to Segger Embedded Studio

Hello NRF Buddies,

My project is based on NRF51822 with SDK version 12.2.0. I am working with Keil till now and planning to migrate to the Segger Embedded Studio.

With the help of the nordic support team, i was able to successfully compile and run the application project on to my custom board. But when i tried migrating the bootloader project from keil to Segger Embedded Studio the same way, i am getting compilation errors.

Attaching the screenshot of the error for your reference.

Awaiting your response.

Best,

Krish

  • Waiting for your response. Really appreciate if you can help us in resolving this.

    Best,
    Krish

  • Hello,

    Can you upload the bootloader project here so I can take a look? The build log does not provide much information about what's causing the problem.

    Best regards,

    Vidar

  • Thanks for the reply

    Sure, please find the attached code below. Waiting for your quick response.

    Thanks in Advance.

    Best,

    Krish

    my_bootloader.zip

  • There is a formatting issue with one of your preprocessor symbols (should have been NRF_LOG_BACKEND_USES_RTT=1 on one line):

      

     Fixing this should solve the build error you reported. But there are still some linker errors that need to be solved. Try to use this flash_placement.xml:

    <!DOCTYPE Linker_Placement_File>
    <Root name="Flash Section Placement">
      <MemorySegment name="FLASH" start="0x0" size="0x40000">
        <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="0x35C00" />
        <ProgramSection alignment="4" load="Yes" name=".init" />
        <ProgramSection alignment="4" load="Yes" name=".init_rodata" />
        <ProgramSection alignment="4" load="Yes" name=".text" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".dfu_trans" inputsections="*(SORT(.dfu_trans*))" address_symbol="__start_dfu_trans" end_symbol="__stop_dfu_trans" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".svc_data" inputsections="*(.svc_data*)" address_symbol="__start_svc_data" end_symbol="__stop_svc_data" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".fs_data" inputsections="*(.fs_data*)" runin=".fs_data_run" />
        <ProgramSection alignment="4" load="Yes" name=".dtors" />
        <ProgramSection alignment="4" load="Yes" name=".ctors" />
        <ProgramSection alignment="4" load="Yes" name=".rodata" />
        <ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" />
        <ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" />
        <ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" />
        <ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloaderSettings" address_symbol="__bootloaderSettings_segment_start__" end_symbol="__bootloaderSettings_segment_end__" start="0x0003FC00" />
      </MemorySegment>
      <MemorySegment name="RAM" start="0x20000000" size="0x4000">
        <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="0x20002900"  />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run" address_symbol="__start_nrf_sections_run" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run_end" address_symbol="__end_nrf_sections_run" />
        <ProgramSection alignment="4" load="No" name=".fast_run" />
        <ProgramSection alignment="4" load="No" name=".data_run" />
        <ProgramSection alignment="4" load="No" name=".bss" />
        <ProgramSection alignment="4" load="No" name=".tbss" />
        <ProgramSection alignment="4" load="No" name=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".non_init" />
        <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" />
        <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack" />
        <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
      </MemorySegment>
      <MemorySegment name="uicr_bootloader_start_address" start="0x10001014" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicrBootStartAddress" address_symbol="__start_uicr_bootloader_start_address" end_symbol="__stop_uicr_bootloader_start_address" start="0x10001014" size="0x4" />
      </MemorySegment>
    </Root>
    

    And remember to add 'INITIALIZE_USER_SECTIONS' to the list of preprocessor symbols.

Related