For backward compatibility (and other) reasons, the exception table is required to be at the same flash address as the older generation hardware. The problem is that flash on the newer hardware (also for compatibility reasons) was expanded upwards (i.e, additional flash bank was placed before existing flash, not after, to form one contiguous flash segment) This means flash now starts at a lower address than before, and the exception table must be located at the older flash start address.
For example, older flash start = 0x10040000, size = 0x40000. Newer flash start = 0x10000000, size = 0x80000. The exception table must be maintained at old flash start, 0x10040000.
To do this, the .vector section must be inserted inside the .text section at address 0x10040000. Can this be done via the linker script without creating two .text sections?
User contributions licensed under CC BY-SA 3.0