can't compile bootloader SES SDK v17.1.0, linker error

Hello, 

I'm trying to compile the examples\dfu\secure_bootloader\pca10040e_s112_ble_debug\ses project, I have modified the flash placement according to the memory layout reported here:

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Fble_sdk_app_buttonless_dfu.html&cp=7_5_9_4_3_2

in particular, using SoftDevice s112

Bootloader settings                           0x0002 F000 - 0x0003 0000 (4 kB)
MBR parameter storage                   0x0002 E000 - 0x0002 F000 (4 kB)
Bootloader                                        0x0002 8000 - 0x0002 E000 (24 kB)
Application area (incl. free space)    0x0001 9000 - 0x0002 8000 (60 kB)
SoftDevice                                        0x0000 1000 - 0x0001 9000 (96 kB)
Master Boot Record (MBR)              0x0000 0000 - 0x0000 1000 (4 kB)

These are the modfified settings in the flash placement

FLASH_PH_START=0x0

FLASH_PH_SIZE=0x80000

RAM_PH_START=0x20000000

RAM_PH_SIZE=0x6000

FLASH_START=0x28000

FLASH_SIZE=0x6000

RAM_START=0x200022c8

RAM_SIZE=0x3d38

but when I compile I get these errors:

C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 6.34a/gcc/arm-none-eabi/bin/ld: error: section .tdata overlaps absolute placed section .mbr_params_page
4> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 6.34a/gcc/arm-none-eabi/bin/ld: section .mbr_params_page VMA [000000000002e000,000000000002efff] overlaps section .text VMA [00000000000283d4,000000000002e4cf]
4> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 6.34a/gcc/arm-none-eabi/bin/ld: section .dfu_trans VMA [000000000002e4d0,000000000002e4d7] overlaps section .mbr_params_page VMA [000000000002e000,000000000002efff]
4> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 6.34a/gcc/arm-none-eabi/bin/ld: section .bootloader_settings_page VMA [000000000002f000,000000000002ffff] overlaps section .rodata VMA [000000000002e53c,000000000002f127]

the first impression that I have is that the bootloader is much bigger than the 24kb expected.

what I'm doing wrong?

Regards,

Rocco

Parents
  • Hello Rocco,

    The "debug" configuration (i.e. pca10040e_s112_ble_debug) of the bootloader will not fit within the 24K area you allocated. If you want the bootloader to be <24K, I recommend you use 'the pca10040e_s112_ble' project.

    I also notice you are using Segger Embedded studio v6.34a. This version is not fully compatible with nRF5 SDK 17.1.0. Please consider using v5.42a instead. From the SDK release notes:

    nRF5 SDK v17.1.0
    ------------------------
    Release Date: August, 2021
     
    ...
    
    The following toolchains/devices have been used for testing and verification:
     
     - ARM: MDK-ARM version 5.25   
     - GCC: GCC ARM Embedded 9.2020-q2.major
     - IAR: IAR Workbench 7.80.4
     - SES: SES 5.42a

    Regards,

    Vidar

  • hi Vidar,

    I have a similar error compiling the 'pca10040e_s112_ble' project using SES 5.50a

    ARM 5.50a/gcc/arm-none-eabi/bin/ld: section .mbr_params_page VMA [000000000002e000,000000000002efff] overlaps section .text VMA [00000000000283d4,000000000002e2cf]
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.50a/gcc/arm-none-eabi/bin/ld: section .dfu_trans VMA [000000000002e2d0,000000000002e2d7] overlaps section .mbr_params_page VMA [000000000002e000,000000000002efff]

    I will try to install SES 5.42a as you suggested and retry to compile

  • same issue  compiling the 'pca10040e_s112_ble' project using SES 5.42a

    1> Generating linker script ‘secure_bootloader_ble_s112_pca10040e.ld’
    1> Linking secure_bootloader_ble_s112_pca10040e.elf
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.42a/gcc/arm-none-eabi/bin/ld: error: section .tdata overlaps absolute placed section .mbr_params_page
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.42a/gcc/arm-none-eabi/bin/ld: section .mbr_params_page VMA [000000000002e000,000000000002efff] overlaps section .text VMA [00000000000283d4,000000000002e347]
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.42a/gcc/arm-none-eabi/bin/ld: section .dfu_trans VMA [000000000002e348,000000000002e34f] overlaps section .mbr_params_page VMA [000000000002e000,000000000002efff]
    Build failed

  • If you haven't already, please try to do a full rebuild of the project to ensure the linker is not trying to use objects built previously.

  • yeas, that is what I did and still have the error

  • I am not sure if I can explain the linker error then. Have you made any modifications to this project, or the SDK source files? 

Reply Children
Related