2020-07-02 05:47 AM
Hi,
STM32f429ii. FreeRtos.
I have relocated my vector table from default address into 0x8008000 since my bootloader firmware is placed on in the default start address (0x8000000). I am using IAR workbench, i have modified the vector table address as 0x8008000 and ROM start address as 0x08008000 in the linker setting. I can view the the vector table address is relocated on the 0x08008000 address on the disassembly window. But once I start the debugger, it will stuck on out of the code memory. What will be the issue? Thank you.
Param.
2020-07-02 07:22 AM
It's not enough to just relocate the vectors. You have to point VTOR to it.
Or, the IAR debugger cannot guess where you vectors are and needs some startup command.
-- pa
2020-07-03 01:07 AM
Thank you so much.
Yes, once I defined the VTOR it is working fine.
#ifdef __ICCARM__
#define __Vectors __vector_table
#else
extern unsigned char __Vectors;
#endif
/*********************************************************************
*
* Local defines (sfrs used in RTOSInit.c)
*
**********************************************************************
*/
//#[define] NVIC_VTOR (*(volatile uint32_t*) (0xE000ED08uL))
//#[define] NVIC_HFSR (*(volatile uint32_t*) (0xE000ED2CuL))
//******************************************************************************
void RTOS_Config (void)
{
//
// Initialize NVIC vector base address. Might be necessary for RAM targets or application not running from 0
//
NVIC_VTOR = (uint32_t)&__Vectors;
//
}