alon barnoy

a problem with saving  data on the eeprom 4k

Discussion created by alon barnoy on Dec 25, 2008
Latest reply on Jan 7, 2009 by alon barnoy

Hallow

I M having a problem with saving  data on the eeprom 4k

I m succeeding in the saving process but when I go beyond address 0X0800 the system crashes

I have discovered that my program is using address 0X0800 and on.

I thought it is my linker.prm.

 

----------

NAMES

END

 

SECTIONS

 

    RAM = READ_WRITE 0x1000 TO 0x3FFF;

    /* unbanked FLASH ROM */

    ROM_4000 = READ_ONLY  0x4000 TO 0x7FFF;

    ROM_C000 = READ_ONLY  0xC000 TO 0xFEFF;

    /* banked FLASH ROM */

    PAGE_20 = READ_ONLY  0x208000 TO 0x20BFFF;  

    PAGE_21 = READ_ONLY  0x218000 TO 0x21BFFF;  

    PAGE_22 = READ_ONLY  0x228000 TO 0x22BFFF;  

   .

   .

   .    

    PAGE_3C = READ_ONLY  0x3C8000 TO 0x3CBFFF;  

    PAGE_3D = READ_ONLY  0x3D8000 TO 0x3DBFFF;  

/*    PAGE_3E = READ_ONLY  0x3E8000 TO 0x3EBFFF; not used: equivalent to ROM_4000 */ 

/*    PAGE_3F = READ_ONLY  0x3F8000 TO 0x3FBFFF; not used: equivalent to ROM_C000 */ 

END

 

PLACEMENT

    _PRESTART, STARTUP,

    ROM_VAR, STRINGS,

    VIRTUAL_TABLE_SEGMENT,

    NON_BANKED, COPY            INTO  ROM_C000, ROM_4000;

    DEFAULT_ROM                     INTO  PAGE_20,PAGE_21,PAGE_22,PAGE_23,PAGE_24,PAGE_25,PAGE_26,PAGE_27,

                                                                PAGE_28,PAGE_29,PAGE_2A,PAGE_2B,PAGE_2C,PAGE_2D,PAGE_2E,PAGE_2F,

                                                                PAGE_30,PAGE_31,PAGE_32,PAGE_33,PAGE_34,PAGE_35,PAGE_36,PAGE_37,

                                                                PAGE_38,PAGE_39,PAGE_3A,PAGE_3B,PAGE_3C,PAGE_3D;

    DEFAULT_RAM                      INTO  RAM;

END

 

STACKSIZE 0x100

---------------------

 

But I have no Idea how to prevent my program from using this region.

 

I tried to define

 

EEPROM = NO_INIT 0x0400 TO 0x0FEF;

 

and  added the line

 

EEPROM_DATA                                                     INTO  EEPROM;

 

But it didn’t do any good.

 

 

 

 

Outcomes