LPC4330 SPIFI - prevent reloading a large constant data structure into SPIFI during debug

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4330 SPIFI - prevent reloading a large constant data structure into SPIFI during debug

568 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by eamonnh on Thu Apr 24 04:44:17 MST 2014
Hi All,
I have a 4330 with 4MB Spifi attached. I have a small application ~64kB and a large constant data table ~2MB which I can park in SPIFI. The data table never changes.

Is there a way to program the data table into some area of SPIFI once, so that I don't have to download it every time I debug?
I can easily partition the 4MB spifi into say, 1MB and 3MB areas in the linker script, so I have clear demarcation between my code and the data table.

It would save a lot of time if I don't have to erase/reprogram the 2MB table every time I debug.

Thanks for any suggestions
-Eamonn
0 Kudos
Reply
1 Reply

559 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by eamonnh on Thu Apr 24 05:06:50 MST 2014
Ok - it looks like it can be done by adding in a NOLOAD attribute into the linker command file for the section containing the large data table, after it has been programmed. It won't be programmed in the next debug session, saving a lot of download time.

Excerpt from MEMORY definition in linker script:
  Flash_00 (rx) : ORIGIN = 0x14000000, LENGTH = 0x100000 /* 4096k Flash7*/
  Flash_01 (rx) : ORIGIN = 0x14100000, LENGTH = 0x300000 /* 4096k Flash7*/

Excerpt from SECTIONS definition in linker script:
/*--------------------------------------------------------------------------*/
/* SPECIAL FLASH LOCATION FOR BIG DATA and other rarely changed data.*/
/*--------------------------------------------------------------------------*/
    .BIGDATAINFLASH (NOLOAD): ALIGN(4)   
    {
*(.bigdata.$Flash_01*)
        . = ALIGN(4);
    }> Flash_01

If there's a better way, please let me know.
Thanks - Eamonn
0 Kudos
Reply