- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see there have a been a few similar queries before where other modules have generated this Build error but none of the answers given in those queries help me understand this issue.
Background:
I have a Solar Powered IoT Device Kit (with BLE module CYBLE-022001. I tried to build the Simple_BLE example but get the error "Section .cy_checksum_exclude size exceeds specified limit." When you double click on the error message it opens up the Linker script file cm0gcc.ld but does not highlight which line.
Based on other online searches and comparing this to the LED_ONOFF example, which does compile/ build ok, it appears to be related to this line here
CY_CHECKSUM_EXCLUDE_SIZE = ALIGN(640, CY_FLASH_ROW_SIZE);
The LED_ONOFF example has
CY_CHECKSUM_EXCLUDE_SIZE = ALIGN(0, CY_FLASH_ROW_SIZE);
So my question is, where did the "640" come from in the Simple_BLE example. How/where was this set.
I know that if I go to the Bootloadable component in TopDesign and change the "Checksum exclude size (bytes)" to 640 it does work and I can build my project.
But still no idea why.
Any advice will be greatly appreciated.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This error occur when you update both BLE and cy_boot component from Project > Update Components in Simple_BLE project.
The latest BLE component places cyBle_flashStorage in cy_checksum_exclude section by default. Please refer to BLE_gatt.c for more details.
#if(CYBLE_MODE_PROFILE)
#if defined(__ARMCC_VERSION)
CY_ALIGN(CYDEV_FLS_ROW_SIZE) const CY_BLE_FLASH_STORAGE cyBle_flashStorage CY_SECTION(".cy_checksum_exclude") =
#elif defined (__GNUC__)
const CY_BLE_FLASH_STORAGE cyBle_flashStorage CY_SECTION(".cy_checksum_exclude")
CY_ALIGN(CYDEV_FLS_ROW_SIZE) =
#elif defined (__ICCARM__)
#pragma data_alignment=CY_FLASH_SIZEOF_ROW
#pragma location=".cy_checksum_exclude"
const CY_BLE_FLASH_STORAGE cyBle_flashStorage =
#endif /* (__ARMCC_VERSION) */
{
.....
};
#endif /* (CYBLE_MODE_PROFILE) */
#endif /* (CYBLE_MODE_PROFILE) && (CYBLE_BONDING_REQUIREMENT == CYBLE_BONDING_YES) */
cy_boot component checks whether required and provided cy_checksum_exclude sizes mach, if not throws an error (cm0gcc.ld).
/* Bootloadable applications only: verify that size of the data in the section is within the specified limit. */
cy_checksum_exclude_size = (CY_APPL_LOADABLE == 1) ? SIZEOF(.cy_checksum_exclude) : 0;
ASSERT(cy_checksum_exclude_size <= CY_CHECKSUM_EXCLUDE_SIZE, "CY_BOOT: Section .cy_checksum_exclude size exceedes specified limit.")
cyBle_flashStorage requires 0x285 bytes and linker file allocates 640 bytes in a BLE project by default. Once you add atleast 1 byte in the checksum exclude size (bootloadable configuration window), one flash row will be added and cyBle_flashStorage can be placed in cy_checksum_exclude section successfully (Simple_BLE.map).
.cy_checksum_exclude
0x0001fc80 0x285
*(.cy_checksum_exclude)
.cy_checksum_exclude
0x0001fc80 0x285 .\CortexM0\ARM_GCC_541\Debug\Simple_BLE.a(BLE_gatt.o)
0x0001fc80 cyBle_flashStorage
0x00000285 cy_checksum_exclude_size = (CY_APPL_LOADABLE == 0x1)?SIZEOF (.cy_checksum_exclude):0x0
0x00000001 ASSERT ((cy_checksum_exclude_size <= CY_CHECKSUM_EXCLUDE_SIZE), CY_BOOT: Section .cy_checksum_exclude size exceedes specified limit.)
0xf0000000 cyloadermeta_start = (cy_project_type_bootloader || cy_project_type_app_for_stack_and_copier)?(LENGTH (rom) - CY_METADATA_SIZE):0xf0000000
ccy_chcy_checksum_exclude ecksum_excludey_checksum_exclude