4 Replies Latest reply on Oct 5, 2020 1:42 AM by ErBo_3698991

    Emulated EEPROM checksum issue

    ErBo_3698991

      Hello,

       

      I have a problem setting up an emulated eeprom in a PSOC-4 BLE project, that implements OTA (launcher + stack + application projects).

       

      In the application project I have created the emulated eeprom as specified in the doc:

       

      - Added an Emulated EEPROM component on TopDesign.cysch with the following parameters:

          * EEPROM size = 128 (actual eeprom size is 256 bytes)

          * Redundant copy = No

          * Wear level factor = None

       

      - Configured the "Bootable" component:

          * Checksum exclude section size (byte) = 256

       

      - Created, as global variable in main.c:

          const uint8 Em_EEPROM_em_EepromStorage[Em_EEPROM_1_PHYSICAL_SIZE]

          CY_SECTION(".cy_checksum_exclude")

          __ALIGNED(CY_FLASH_SIZEOF_ROW) = {0u};

         

      The problem is that the following assertion in the linker script (cm0gcc.ld) fails:

          ASSERT(cy_checksum_exclude_size <= CY_CHECKSUM_EXCLUDE_SIZE, "CY_BOOT: Section .cy_checksum_exclude size exceedes specified limit.")

       

      This is what the output of the linker command is:

          (...)

          arm-none-eabi-gcc.exe -Wl,--start-group -o C:\Users\EricBohnes\git_repositories\power_reader_mcu\PowerReader\PowerReader_application.cydsn\CortexM0\ARM_GCC_541\Debug\PowerReader_application.elf .\CortexM0\ARM_GCC_541\Debug\main.o .\CortexM0\ARM_GCC_541\Debug\ota_mandatory.o .\CortexM0\ARM_GCC_541\Debug\load_control.o .\CortexM0\ARM_GCC_541\Debug\app-ble.o .\CortexM0\ARM_GCC_541\Debug\app-adc.o .\CortexM0\ARM_GCC_541\Debug\app-console.o .\CortexM0\ARM_GCC_541\Debug\app-event.o .\CortexM0\ARM_GCC_541\Debug\app-time.o .\CortexM0\ARM_GCC_541\Debug\app-wdt.o .\CortexM0\ARM_GCC_541\Debug\app-led-btn.o .\CortexM0\ARM_GCC_541\Debug\app-statemanager.o .\CortexM0\ARM_GCC_541\Debug\debug.o .\CortexM0\ARM_GCC_541\Debug\TinyEncrypt.o .\CortexM0\ARM_GCC_541\Debug\app-sd.o .\CortexM0\ARM_GCC_541\Debug\ff.o .\CortexM0\ARM_GCC_541\Debug\rtc.o .\CortexM0\ARM_GCC_541\Debug\sdcard.o .\CortexM0\ARM_GCC_541\Debug\cyfitter_cfg.o .\CortexM0\ARM_GCC_541\Debug\cybootloader.o .\CortexM0\ARM_GCC_541\Debug\cymetadata.o .\CortexM0\ARM_GCC_541\Debug\Cm0Start.o .\CortexM0\ARM_GCC_541\Debug\PowerReader_application.a -mcpu=cortex-m0 -mthumb -L Generated_Source\PSoC4 -Wl,-Map,.\CortexM0\ARM_GCC_541\Debug/PowerReader_application.map -T .\LinkerScripts\cm0gcc.ld -specs=nano.specs -Wl,--gc-sections -g -ffunction-sections -Og -ffat-lto-objects -Wl,--end-group

          ERROR: CY_BOOT: Section .cy_checksum_exclude size exceedes specified limit.

          collect2.exe: error: ld returned 1 exit status

          The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

          --------------- Build Failed: 10/01/2020 12:13:38 ---------------

       

      Can anyone here help me to understand first what I did wrong, and how can I solve this problem ? It seems tpo me that this should all be configured through the GUI in TopDesign.cysch, as the linker script is overwritten during the build process, but I might miss something.

       

      Thanx in advance !

       

      Best regards

       

      Eric