Hi @Alice_Yang ,
thanks for the quick reply,
Unfortunately, I can not upload the full project but the function that copies the vector table from flash to RAM is the following.
#define VTABLE_USER_RAM_MODE (0x01)
#define APP_START_ADDR 0x00003000
#define REMAP_VECTOR_COUNT (52)
static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));
static void RemapVectorTable(void)
{
UINT16 unIndex = 0;
UINT32 *punFlashVectTable = (UINT32 *)APP_START_ADDR;
/* Disable interrupts before re-mapping interrupt vector table */
__disable_irq();
/* Copy the interrupt vector table to RAM */
for (unIndex = 0; unIndex < REMAP_VECTOR_COUNT; unIndex++)
{
aunRamVectTable[unIndex] = punFlashVectTable[unIndex];
}
/* Indicate that the vector table has been remapped to SRAM */
LPC_SYSCON->SYSMEMREMAP = VTABLE_USER_RAM_MODE;
/* Re-enable interrupts */
__enable_irq();
}
Like I said above that the project is fully working with LPCXpresso v7.7.2_379 and also up to LPCXpresso v8.0.0_526 and stop working with LPCXpresso v8.1.0_597 and afterward.
One more thing I have observed that in the map file generated by MCUXpresso IDE v11.1 the vtable section is not mapped to address 0x10000000 plus also the size of .data (0x20) shows that the "aunRamVectTable" is not mapped correctly.

Whereas in the map generated by LPCXpresso v7.7.2 they look correctly mapped.

Any suggestion why vtable is not mapped correctly anymore?
Is there any mistake in the following declaration? which may expose with the latest GCC version?
static UINT32 aunRamVectTable[REMAP_VECTOR_COUNT] __attribute__ ((section ("vtable")));