This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Fill unused sector in flash with random value

Hi Guys,

I have a LPC2292 system and i use a linker file to flash the FLASH / ROM on the board. The FLASH is totally 256KB divided into a number of sectors. My code is around 31KB and occupied the sectors 0,1,2,& 3 . Each of these sectors are 8KB each .

My requirement is that i pad the remaining 1KB space left in sector 3 with some default value.

ARMLINK: FILL UNUSED FLASH CONTENT WITH PREDEFINED VALUE : http://www.keil.com/support/docs/3407.htm

Seems to be the way to go about it . However END_OF_BLOCK (END_ADR - START_ADR) FIXED EMPTY 0x0 {} seems to substract the START_ADR from the END_ADR and i get an error;

Here is my linker file :

; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x00000000 0x00040000  {    ; load region size_region
  ER_IROM1 0x00000000 0x00040000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_RAM1 0x80000000 0x00100000  {  ; RW data
   .ANY (+RW +ZI)
  }
  RW_RAM2 0x81000000 UNINIT 0x00020000  {
   .ANY (+RW +ZI)
  }
  RW_IRAM1 0x40000000 0x00004000  {

    Startup.o (+ZI +RW)
    RTX_Config.o ( +RW)
    checksum.o (+ZI +RW )
   .ANY (+RW +ZI)
  }
 END_OF_BLOCK 0x00008000 - 0x00007EFC FIXED EMPTY 0x0 {}
}

Error :

.\Obj\TL100-V069.axf: Error: L6291E: Cannot assign Fixed Execution Region END_OF_BLOCK Load Address:0x00000104. Load Address must be greater than or equal to next available Load Address:0x00007fe8.

Is there something silly that I am doing here ? Is this the best way to pad my sector. In other words i want to ensure i use up all the sector 3.

Parents Reply Children
No data