Im using a bootloader to boot the FreeRTOS with. Therefore I cannot use the LDR PC, from the startup.s file, because that is relative to the program counter (PC). The reason is that the application will be compiled to 0x5100 and VicVectAddr can not be addressed with an offset relative to PC (since vector originally located at 0x18
is now at 0x5118 in the application downloaded by the bootloader).
I have therefore written my own IRQ handler to get the correct adress from VivVector
void IRQ_Handler (void) __irq
unsigned int vector;
VICVectAddr = 0;
I then use this in my Startup.s file instead:
LDR PC, IRQ_Addr
IRQ_Addr DCD IRQ_Handler
But for testing I haven’t build the application with any flash offset. Just to test the IRQ handler
But doing this doesn’t work. If I set a breakpoint in the IRQ_Handler the correct ISR is called. But after that one IRQ FreeRTOS crashes and CPU is in Undefined exception.
So my question:
Is this not possible with FreeRTOS or have I done something wrong?
Cannot se way this crashes FreeRTOS.
Using LPS2478 and FreeRTOS 5.1.2