Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Linker issues in the connectivity firmware

Hi,

I am trying to build the connectivity firmware for a custom dongle based on the nrf52832. I am getting a section overlap issue when I am trying to build the solution from SES.

Steps followed til now:

-> Downloaded the latest version of pc-ble-driver from the github page.

-> Ran the bootstrap_sd_api_v5 script.

-> Opened the ble_connectivity_s132v5_hci_pca10040 located at pc-ble-driver-master\sdk\nRF5_SDK_15.0.0_a53641a\examples\connectivity\ble_connectivity\pca10040\ser_s132v5_hci\ses\

-> Tried to build the solution but got the following error

1> Linking ble_connectivity_s132v5_hci_pca10040.elf
1> "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 3.40/gcc/arm-none-eabi/bin/ld" -X --omagic -eReset_Handler --defsym=__vfprintf=__vfprintf_long --defsym=__vfscanf=__vfscanf_int -EL --gc-sections "-TG:/pc-ble-driver-master/pc-ble-driver-master/sdk/nRF5_SDK_15.0.0_a53641a/examples/connectivity/ble_connectivity/pca10040/ser_s132v5_hci/ses/Output/ble_connectivity_s132v5_hci_pca10040 Release/Obj/ble_connectivity_s132v5_hci_pca10040.ld" -Map Output/Release/Exe/ble_connectivity_s132v5_hci_pca10040.map -u_vectors -o Output/Release/Exe/ble_connectivity_s132v5_hci_pca10040.elf --emit-relocs "@G:/pc-ble-driver-master/pc-ble-driver-master/sdk/nRF5_SDK_15.0.0_a53641a/examples/connectivity/ble_connectivity/pca10040/ser_s132v5_hci/ses/Output/ble_connectivity_s132v5_hci_pca10040 Release/Obj/ble_connectivity_s132v5_hci_pca10040.ind"
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 3.40/gcc/arm-none-eabi/bin/ld: section .connectivity_version_info LMA [0000000000030000,0000000000030017] overlaps section .rodata LMA [000000000002fd34,00000000000301b7]
Build failed

Chip : nRF52832 QFAA

IDE: Segger Embedded Studio

Thank you

Parents
  • Hi,

    Can you check that sdk150_add_sd_v3v5_support.patch:84195 have been applied to the SES project setting. 

    • Project 'ble_connectivity_s132_hci_pca10040' Options
    • Common configuration
    • Linker->Section Placement Segments
    • Check that "connectivity_version_info RX 0x30000 0x18" is included

    Best regards,
    Jørgen

  • Ok, might be that Segger changed the location in SES 3.40. The settings looks correct, but could you try with SES v3.34, just to be sure? This is the version that the SDK have been tested with. You might need to make a fresh copy of the SDK and apply the patch one more time.

  • I installed SES 3.34 and got a fresh copy of the pc-ble-driver and SDK 15. Did the same steps as the first post to setup the SDK. I am still getting a linker error, but the segment it shows is different now but the location is same.

    1> Linking ble_connectivity_s132_hci_pca10040.elf
    1> "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 3.34/gcc/arm-none-eabi/bin/ld" -X -eReset_Handler --omagic -defsym=__vfprintf=__vfprintf_long -defsym=__vfscanf=__vfscanf_int -EL --gc-sections "-TG:/pc-ble-driver-master-3.34/sdk/nRF5_SDK_15.0.0_a53641a/examples/connectivity/ble_connectivity/pca10040/ser_s132_hci/ses/Output/ble_connectivity_s132_hci_pca10040 Release/Obj/ble_connectivity_s132_hci_pca10040.ld" -Map Output/Release/Exe/ble_connectivity_s132_hci_pca10040.map -u_vectors -o Output/Release/Exe/ble_connectivity_s132_hci_pca10040.elf --emit-relocs "@G:/pc-ble-driver-master-3.34/sdk/nRF5_SDK_15.0.0_a53641a/examples/connectivity/ble_connectivity/pca10040/ser_s132_hci/ses/Output/ble_connectivity_s132_hci_pca10040 Release/Obj/ble_connectivity_s132_hci_pca10040.ind"
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 3.34/gcc/arm-none-eabi/bin/ld: section .connectivity_version_info LMA [0000000000030000,0000000000030017] overlaps section .text LMA [00000000000262f4,0000000000033067]
    Build failed
    

  • Seems to be an issue in the flash_placement.xml file. The static placed section connectivity_version_info should be placed into the memory segment "FLASH" instead of in its own memory segment, to avoid that other code have already been placed in this section by the linker. I have attached updated flash_placement.xml file that can be used to successfully compile the project:

    <!DOCTYPE Linker_Placement_File>
    <Root name="Flash Section Placement">
      <MemorySegment name="FLASH" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_flash" start="$(FLASH_PH_START)" size="$(FLASH_START)-$(FLASH_PH_START)" />
        <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START)" />
        <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=".log_const_data" inputsections="*(SORT(.log_const_data*))" address_symbol="__start_log_const_data" end_symbol="__stop_log_const_data" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_ble_observers" inputsections="*(SORT(.sdh_ble_observers*))" address_symbol="__start_sdh_ble_observers" end_symbol="__stop_sdh_ble_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_soc_observers" inputsections="*(SORT(.sdh_soc_observers*))" address_symbol="__start_sdh_soc_observers" end_symbol="__stop_sdh_soc_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_queue" inputsections="*(.nrf_queue*)" address_symbol="__start_nrf_queue" end_symbol="__stop_nrf_queue" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_balloc" inputsections="*(.nrf_balloc*)" address_symbol="__start_nrf_balloc" end_symbol="__stop_nrf_balloc" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_stack_observers" inputsections="*(SORT(.sdh_stack_observers*))" address_symbol="__start_sdh_stack_observers" end_symbol="__stop_sdh_stack_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_req_observers" inputsections="*(SORT(.sdh_req_observers*))" address_symbol="__start_sdh_req_observers" end_symbol="__stop_sdh_req_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_state_observers" inputsections="*(SORT(.sdh_state_observers*))" address_symbol="__start_sdh_state_observers" end_symbol="__stop_sdh_state_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".connectivity_version_info" address_symbol="__start_connectivity_version_info" end_symbol="__stop_connectivity_version_info" start = "0x30000" size="0x18" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_dynamic_data"  inputsections="*(SORT(.log_dynamic_data*))" runin=".log_dynamic_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" />
      </MemorySegment>
      <MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_ram" start="$(RAM_PH_START)" size="$(RAM_START)-$(RAM_PH_START)" />
        <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START)" address_symbol="__app_ram_start__"/>
        <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=".log_dynamic_data_run" address_symbol="__start_log_dynamic_data" end_symbol="__stop_log_dynamic_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=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".bss" />
        <ProgramSection alignment="4" load="No" name=".tbss" />
        <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"  address_symbol="__StackLimit" end_symbol="__StackTop"/>
        <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
      </MemorySegment>
    </Root>
    

Reply
  • Seems to be an issue in the flash_placement.xml file. The static placed section connectivity_version_info should be placed into the memory segment "FLASH" instead of in its own memory segment, to avoid that other code have already been placed in this section by the linker. I have attached updated flash_placement.xml file that can be used to successfully compile the project:

    <!DOCTYPE Linker_Placement_File>
    <Root name="Flash Section Placement">
      <MemorySegment name="FLASH" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_flash" start="$(FLASH_PH_START)" size="$(FLASH_START)-$(FLASH_PH_START)" />
        <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START)" />
        <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=".log_const_data" inputsections="*(SORT(.log_const_data*))" address_symbol="__start_log_const_data" end_symbol="__stop_log_const_data" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_ble_observers" inputsections="*(SORT(.sdh_ble_observers*))" address_symbol="__start_sdh_ble_observers" end_symbol="__stop_sdh_ble_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_soc_observers" inputsections="*(SORT(.sdh_soc_observers*))" address_symbol="__start_sdh_soc_observers" end_symbol="__stop_sdh_soc_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_queue" inputsections="*(.nrf_queue*)" address_symbol="__start_nrf_queue" end_symbol="__stop_nrf_queue" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_balloc" inputsections="*(.nrf_balloc*)" address_symbol="__start_nrf_balloc" end_symbol="__stop_nrf_balloc" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_stack_observers" inputsections="*(SORT(.sdh_stack_observers*))" address_symbol="__start_sdh_stack_observers" end_symbol="__stop_sdh_stack_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_req_observers" inputsections="*(SORT(.sdh_req_observers*))" address_symbol="__start_sdh_req_observers" end_symbol="__stop_sdh_req_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_state_observers" inputsections="*(SORT(.sdh_state_observers*))" address_symbol="__start_sdh_state_observers" end_symbol="__stop_sdh_state_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".connectivity_version_info" address_symbol="__start_connectivity_version_info" end_symbol="__stop_connectivity_version_info" start = "0x30000" size="0x18" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_dynamic_data"  inputsections="*(SORT(.log_dynamic_data*))" runin=".log_dynamic_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" />
      </MemorySegment>
      <MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_ram" start="$(RAM_PH_START)" size="$(RAM_START)-$(RAM_PH_START)" />
        <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START)" address_symbol="__app_ram_start__"/>
        <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=".log_dynamic_data_run" address_symbol="__start_log_dynamic_data" end_symbol="__stop_log_dynamic_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=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".bss" />
        <ProgramSection alignment="4" load="No" name=".tbss" />
        <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"  address_symbol="__StackLimit" end_symbol="__StackTop"/>
        <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
      </MemorySegment>
    </Root>
    

Children
No Data
Related