This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/LAUNCHXL-CC2640R2: Program won't fit in FLASH - Placement/Alignment issue with section ".cinit"

Part Number: LAUNCHXL-CC2640R2


Tool/software: Code Composer Studio

Hi

My .cinit section is causing the linker to throw an "program will not fit into available memory" error (error #10099-D)

This is the message from the linker:

"C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/common/cc26xx/ccs/cc26xx_app.cmd", line 277: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".cinit" size 0x1397 . Available memory ranges:
FLASH size: 0x1f000 unused: 0x2374 max hole: 0x1370
FLASH_LAST_PAGE size: 0x1000 unused: 0xfa8 max hole: 0xfa8
error #10010: errors encountered during linking; "ble5_simple_peripheral_cc2640r2lp_app.out" not built

I tried a few things before posting this question.

1) I grouped the global variables into a structure and used the structure method to access the variables in different places in my program but that didn't help.

2) I placed the global variables in a separate header file and used the #pragma SET_DATA_SECTION therein to prevent data blocking on the global variables but that didn't help either. 

I looked at a few e2e solutions to similar problems but none of those solutions helped solve mine.

Tushar