View previous topic :: View next topic |
Author |
Message |
avatarengineer
Joined: 13 May 2013 Posts: 51 Location: Arizona
|
No compiler error using #ROM beyond Data EEROM space |
Posted: Sat Jun 29, 2019 2:23 pm |
|
|
Compiler = PICC 5.085
Device = 16F1788 with 256 bytes of EEROM
Interest is to preload EEROM space with data;
Code:
#DEFINE EEMEMSTART getenv("EEPROM_ADDRESS")
#DEFINE EESTATMEM EEMEMSTART+300
#ROM EESTATMEM={0xF,0xF}
------
Start address of Data EEROM (0xF000) + 300
is obviously more than 256 bytes
therefore a compiler error should be reported
when I attempt to compile 2 bytes at 0xF12C
...but it doesn't.
Any comments on this?
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Sun Jun 30, 2019 4:39 am |
|
|
I'll take a 'stab' at it....
I downloaded the datasheet and the 256 bytes of EEPROM are accessed differently than 'regular' memory according to section 3.0 'memory organization. To access the 256 bytes of DATA EEPROM, you need to see section 12.
The address you post 0xF000 is within the 'normal' memory map (see figure 3.8). It's the Program Flash memory section. As such it's a valid address.
Only had 1 coffee so far, so I might be wrong.. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jun 30, 2019 11:39 am |
|
|
If you want an error message over this, email CCS and ask them to
put it in. But be aware that there will be some bugs introduced, at least
initially, if they do this. Some PICs will throw an error if you do correctly.
Then you'll have to report it, and wait for the next revision or maybe
get a temporary DLL fix.
I don't think it's worth it. Just read the data sheet carefully. |
|
|
|