I have problem, which I'm trying to solve.
+ I use Keil uVision with ARM-GCC;
+ I use SPIFI lib to get data from ext. flash (QSPI);
+ I have HW setup :
+ Ext. Flash - icons, sounds, texts; Ext. RAM - frame buffers for TFT;
+ I have internal flash and ram in my uC, but internal flash (only for code) run out.
+ I know that LPC18xx has boot ROM feature, but in my scenerio I can't use it. Guy from NXP told me that, code execution from ext flash (via qspi) is to slow to our application. It means, that I should execute my code from external RAM. This code has to come from external flash (via QSPI).
+ I need a support for doing this scenario:
1) program code and data for GUI (icons, sounds) in ext. flash memory + small piece of code to internal flash;
2) at startup of uC - init QSPI and EMC controller and copy all code from ext. flash to ext. RAM;
3) start executing from ext. RAM (with some critical things in internal RAM);
+ We should remember that all the time :
Ext. Flash is for icons, sounds, texts;
Ext. RAM is for frame buffers for TFT;
+ How do it properly?
I think that I should manually setup linker to do this kinds of things:
* reserve memory area to execution code in ext. RAM (it is visible in our memory region at 0x2000 0000 address) - only reserve, because at startup there is no code inside;
* setup linker to write initial code ("small piece of code") to internal flash (e.g. to bank A);
* This initial code should init flash an RAM controllers, and copy code from ext. flash to ext. RAM;
* Start execution from ext. RAM;
+ Do you have any other idea, about what I should do to get my My proposal?