Hello,
I'm using uVision 4.20 and an LPC1788 development board.
The development board has external NOR flash at CS0 (0x80000000). I am able to download code to the external NOR flash using and INI setup file but I can't seem to write the VTOR register with 0x80000000.
The exact code and setup modified to run from iRAM works without issue (@ 0x10000000).
Does anyone have any ideas why I cant write VTOR with 0x80000000?
(Note the code runs until there is any interrupt and than crashes)
Thanks.
Mac
Vector Table can be used only for Code & SRAM region in Cortex-M cores (addresses 0x00000000 .. 0x3FFFFFFF).
Bits 31..30 in VTOR register are not used and writing 0x80000000 will NOT set VTOR to 0x80000000.
So you can't put the vector table in External memory.
Thanks for you reply.
That's what I was afraid of.
What is the general strategy then when the user code is larger than the devices (LPC1788) internal flash.
Do I need to split my user application binary into two (using scatter file) so that I can load one into iRAM and the other into SDRAM?
Basically I have a setup on an LPC2478 where I copy the entire user application into SDRAM and remap the ARM7 vectors using the MEMMAP register of that device.
I guess there is no way of doing this same strategy on the LPC1788 so I'm wondering what do people do normally?
M
I fail to see the problem. Why not have the vector table in the internal flash or the internal RAM?
Do you really want to _physically_ separate the vector table from the rest of the program? what if the NOR flash needs to be replaced (assuming it does not carry code)?
what if the NOR flash is somehow deleted (assuming it does not carry code)? You're 100% toast, as is your program...
View all questions in Keil forum