- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Eric,
Please do the following steps:
1. In the Bootloadable component of your application fill the box checksum excluse size with 256 (as shown in the image below):
2. In the cm0gc.ld (linker script) of your application project you will find the following line:
CY_CHECKSUM_EXCLUDE_SIZE = ALIGN(685, CY_FLASH_ROW_SIZE);
Please modify it to CY_CHECKSUM_EXCLUDE_SIZE = ALIGN(941, CY_FLASH_ROW_SIZE);
I just added actual EEPROM size to 685.
Please find the attached project for reference. Please update if you have any queries.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Eric,
Please do the following steps:
1. In the Bootloadable component of your application fill the box checksum excluse size with 256 (as shown in the image below):
2. In the cm0gc.ld (linker script) of your application project you will find the following line:
CY_CHECKSUM_EXCLUDE_SIZE = ALIGN(685, CY_FLASH_ROW_SIZE);
Please modify it to CY_CHECKSUM_EXCLUDE_SIZE = ALIGN(941, CY_FLASH_ROW_SIZE);
I just added actual EEPROM size to 685.
Please find the attached project for reference. Please update if you have any queries.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's working, thank you so much Ganesh !
Isn't there a risk for the linker script to be overwritten by a re-generation of the application ?
Kind regards
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Eric,
Glad to hear that !
Isn't there a risk for the linker script to be overwritten by a re-generation of the application ?
No. There won't be any problems. Only sources files will be regenerated. Not the linker script.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, thank you so much !