6 Replies Latest reply on Apr 29, 2019 2:57 AM by DheerajK_81

    Cymcuelftool merge fails if emulated EEPROM is enabled on PSoC6

    jukuc_3760166

      Hi,

       

      I added the "Emulated EEPROM" component into my PSoC6 design and after this the build consistently fails with:

       

      App.elf: Merge error: Section 0x14000000 at App.elf overlaps section 0x14000000 from App_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'.

       

      Looking in the .map file that was generated around 0x14000000 shows this:

       

      cy_em_eeprom   0x14000000     0x1400

      *(.cy_em_eeprom)

      .cy_em_eeprom  0x14000000     0x10bd .\CortexM4\ARM_GCC_541\Debug\BLE_config.o

      *fill*         0x140010bd      0x143

      .cy_em_eeprom  0x14001200      0x200 .\CortexM4\ARM_GCC_541\Debug\Em_EEPROM_1.o

                      0x14001200                Em_EEPROM_1_em_EepromStorage

       

      Before it was merely:

      .cy_em_eeprom   0x14000000     0x10bd

      *(.cy_em_eeprom)

      .cy_em_eeprom  0x14000000     0x10bd .\CortexM4\ARM_GCC_541\Debug\BLE_config.o

       

      Disabling the EEPROM component reverst the .map file change and build succeeds as before.

       

      Further looking into the App.elf and App_signed.elf files:

       

      App.elf:

      Contents of section .cy_em_eeprom:

      14000000 00000000 00000000 00000000 00000000  ................

      ...

      140010b0 00000000 00000000 00000004 11        .............

       

      App_signed.elf:

      Contents of section .cy_em_eeprom:

      14000000 00000000 00000000 00000000 00000000  ................

      ...

      140010b0 00000000 00000000 00000004 11000000  ................

      ...

      140013f0 00000000 00000000 00000000 00000000  ................

       

      Clearly the signed ELF file has the emulated EEPROM data but the regular ELF does not.

       

      Looking into it further, it seems that the ELF file for the M0 core only has the EEPROM data in the .cy_em_eeprom section but the M4 has both the BLE and EEPROM data and merging these two together is causing the problem.

       

      I also created a fresh project with only these two components and got the same error.

       

      Is there a correct way to fix this problem?

       

      - Juha