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

Question about "EMPTY" section in scatter file

Hi,

I am trying to define a 64 byte memory block in RAM to hold some variables that need to be initialised.
I would like to have the rest (unused) bytes of the 64 byte block to be "filled" with 0xFF.
The general idea is to have a RAM image of an EEPROM's data page.

I have checked things out and I think it should be possible using a custom scatterfile by using the "FILL" attribute.

However, I get an unexpected error message (see below).
From it I deduce it considers the "EEPROM_APP_PAGE_01" section to be "EMPTY" but I do not know why.
More importantly: I can't find how to tell it that the section in question should not be considered "EMPTY" but should be filled instead.

Does anyone have any suggestion(s) as to what I am doing wrong or overlooking ?

Any help much appreciated,
Filip

This is the "C" code to declare the variable(s) in the "app_eeprom_def.c" file.

//*************** EEPROM page 01: begin****************************************/
#pragma arm section rwdata = "EEPROM_APP_PAGE_01", zidata = "EEPROM_APP_PAGE_01"
unsigned short test = 0x55AA;
//*************** EEPROM page 01: end *****************************************/


This is the scatter file:

LR_IROM1 0x00000000 0x00040000
        {    ; load region size_region
        ER_IROM1 0x00000000 0x00040000
                {  ; load address = execution address
                *.o (RESET, +First)
                *(InRoot$$Sections)
                .ANY (+RO)
                }
        RW_IRAM1 0x10000000 0x00008000
                {  ; RW data
                .ANY (+RW +ZI)
                }
        RW_IRAM2 0x2007C000 0x00007AC0
                {  ; RW data
                .ANY (+RW +ZI)
                }
        EEPROM_APP_PAGE_01 0x20083AC0 FILL 0xFFFFFFFF 0x40
                {  ; RW data
                app_eeprom_def.o (EEPROM_APP_PAGE_01)
                }
        }


This the error I am getting:

.\Flash\Q1CMCDVB.sct(24): error: L6175E: EMPTY region EEPROM_APP_PAGE_01 cannot have any section selectors.