Hello
I have the exactly same need.
I'm using the Tower K70f120m 1M under MQX 4.0.
My software is to manage an LCD panel (800x480) by using PEG library. Then I have some big picture to store in memory flash.
Then I followed the AN4498. But when I start the debug by downloading the software into the target, the loading never ends. It remains long loading.
You will find bellow the steps that I followed:
1- Configuration of MQX : set BSPCFG_ENABLE_NADFLASH to true.
2- Modify linker file (.lcf file):
a - add in "MEMORY" section this line :
extrom (RW): ORIGIN = 0x60000000, LENGTH = 0x08000000 # ExternFLash - RW data
b- add in "SECTIONS" part:
.my_section:
{
. = ALIGN (0x10);
*(.relocate_const)
} > extrom
3 - In the code (PEG ressources.cpp file) add following line:
#pragma define_section relocate_const ".relocate_const" ".relocate_const" ".relocate_const" far_abs R
#define __relocate_const__ __declspec(relocate_const)
and then relocate my big constant:
__relocate_const__ const PEGUSHORT bitmaps_TOUCH_CAL_TARGET_BitmapData[400] = {....
That all modification that I made.
Then the .xmap generated contains this add:
....
# .my_section
60000000 00000000 .relocate_const .relocate_const (resources_cpp.obj)
60000000 00000320 .relocate_const bitmaps_TOUCH_CAL_TARGET_BitmapData (resources_cpp.obj)
{...}
60000000 60000000 00000320 .my_section extrom
I don't know if my modifications are all correct or if I have forgot something?
Please help me.
Thanks:smileyhappy: