I am working on a FreeRTOS port on an old Cirrus Logic EP7212-based board I had lying around. The issue I am having is that the flash is mapped to 0x00000000 and that’s where the vectors lie. There is a bootloader in flash that allows one to load program in RAM starting at 0xc0000000. The problem is that when i enable a timer tick, the cpu is presumably vectoring to the vectors in flash rather than the ones in memory. My question is, would i need to enable MMU and remap the FreeRTOS vectors to 0x0 ??? That seems to be the only way to me but i wanted to ask more experienced people out there… TIA
Dont know anything about EP7212 - but normally you can place the vectors section any place you want. The question is though - when you are running from RAM are the vectors remapped by the processor to 0c0000000? Or are they still loaded from flash at 0x00000000?
Take a look at your linker script to see how it places the vector table. You might want to have two copies even - a reset copy that contains the addresses of the boot loader etc, and an application copy used once the boot loader has completed. This depends on how the processor itself knows where to look for the vectors. I think some processors such as the Stellaris and SAM7 have registers on the processor itself to remap.
The exception vector in the ARM7 is always at 0x00000000.
The particular chip must provide a way to change what is present at that address (eg: sram, flash, external bus…)
When you enable the interrupt, the external interrupt controller rises and irq or fiq exception, and arm reads the exception at address 0x14 (more or less…) or 0x1C, so you must provide a valid branch to an appropriate handler, wherever it resides.