I'm working on a XMC1100 Cortex-M0 device which stores some clock initialization information for the startup software inside the unused values of the exception table.
Going through the cortex-m-rt source code, The reserved values in __EXCEPTIONS do not look like they can be overridden in any way. I tried duplicating the exception table with the required values and added a /DISCARD/ section to my memory.x, but I cannot seem to get the match correct.
Current memory.x
MEMORY
{
FLASH (RX) : ORIGIN = 0x10001000, LENGTH = 64K
RAM (!RX) : ORIGIN = 0x20000000, LENGTH = 16K
}
_stack_start = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
/DISCARD/ :
{
*cortex_m_rt* (__EXCEPTIONS)
}
}
Is it possible to override or discard just the exception table from the cortex-m-rt? Or should I just create a new link.x?