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.

CC2540 XDATA Memory Space Linker Error

Hi, I have a CC2540-based prototype that encounters this error regarding the available amount of XDATA memory:
Error[e104]: Failed to fit all segments into specified ranges. Problem discovered in segment XDATA_N. Unable to place 4 block(s) (0xa02 byte(s) total) in 0x99f byte(s) of memory. The problem occurred while processing the segment placement command "P(XDATA)XDATA_N=_XDATA_BEG_XDATA_END", where at the moment of placement the available memory ranges were "XDATA:1561-1eff"
From this error I can see that there is insufficient XDATA memory available. I can "band-aid" the issue by decreasing the XDATA Stack Size in settings from 0x280 down to 0x200. This is definitely not ideal though and I have to keep decreasing the stack size as the code size increases.
What does the XDATA_N segment correspond to and how can I reduce its size (currently 0x99E in the above error)? What parts of my code (variables, constants, etc.) are placed in XDATA? Is there a practical solution that will leave me with ample space?
I am comfortable making changes to the linker configuration file if needed.