Merge Error: Section is overlapping Section during linker

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

When I try to build my bootloadable project and create the .cyacd file for bootloading, I keep getting an error saying my sections are overlapping. I bolded the error and included it below. If anyone could help me that would be great! Thanks!

No ELF section .cychecksum found, creating one

Application checksum calculated and stored in ELF section .cychecksum

Checksum calculated and stored in ELF section .cymeta

"C:\Program Files (x86)\Cypress\PDL\3.0.1\tools\win\elf\cymcuelftool.exe" --merge "C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM4\ARM_GCC_541\Debug\Bootloader_BLE_App1_signed.elf" "C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM0p\ARM_GCC_541\Debug\Bootloader_BLE_App1.elf" --output "C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM4\ARM_GCC_541\Debug\Bootloader_BLE_App1.elf" --hex "C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM4\ARM_GCC_541\Debug\Bootloader_BLE_App1.hex"

C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM0p\ARM_GCC_541\Debug\Bootloader_BLE_App1.elf: Merge error: Section 0x14000000 at C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM0p\ARM_GCC_541\Debug\Bootloader_BLE_App1.elf overlaps section 0x14000000 from C:\Users\FelixLe\Documents\PSoC Creator\CE216767_Bootloader_BLE\Bootloader_BLE_App1.cydsn\CortexM4\ARM_GCC_541\Debug\Bootloader_BLE_App1_signed.elf,

but it contains different data

The command 'C:\Program Files (x86)\Cypress\PDL\3.0.1\tools\win\elf\cymcuelftool.exe' failed with exit code '1'.

0 Likes
1 Solution

I suggest you to repeat the steps in that doc from modifying your general application, and to find out at which step exactly this error shows.

View solution in original post

0 Likes
3 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

As clarified in AN213924 chapter4.3 -> step#8,

"For updateable application projects, add to the main_cm4.c file a global array to store the application signature. For example, for checksum, the simplest and most common signature type, add the following:

/* This section holds signature data for application verification.

     For checksum verification, set the number of elements in the array to 1,

     and in bootload_common.ld set __cy_boot_signature_size = 4. */

CY_SECTION(".cy_app_signature") __USED static const uint32_t cy_bootload_appSignature[1];"

Please add this line and check if it helps.

0 Likes
Anonymous
Not applicable

Thank you for the reply! I tried what you recommended and declared the appSignature variable in my main_cm4.c file as a global variable, but I'm still getting the same errors.

This is my main_cm4.c file:

#include "project.h"

CY_SECTION(".cy_app_signature") __USED static const uint32_t cy_bootload_appSignature[1];

int main(void)

{

    __enable_irq(); /* Enable global interrupts. */

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    for(;;)

    {

        /* Place your application code here. */

    }

}

0 Likes

I suggest you to repeat the steps in that doc from modifying your general application, and to find out at which step exactly this error shows.

0 Likes