View previous topic :: View next topic |
Author |
Message |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
PCD #rom() syntax changed |
Posted: Mon Nov 28, 2011 3:28 am |
|
|
Hello,
by failure of a previous working application, I became aware of an undocumented change to the #rom syntax of PCD.
While the below code was O.K. to place data into the lower 16 bit of two consecutive 24 bit instruction words up to V4.121
Code: | #rom APP_BASE+4 = {0x1234,0,HEXVERSION,0} |
it needed to be changed to the below syntax with V4.124 and later
Code: | #rom APP_BASE+4 = {0x1234,HEXVERSION} |
The #rom syntax for EEPROM initialization of respective PIC24 has been kept. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19518
|
|
Posted: Mon Nov 28, 2011 4:27 am |
|
|
Try:
Code: |
#rom int16 APP_BASE+4 = {0x1234,0,HEXVERSION,0}
|
I'd guess that what has happened, is that they have switched the default 'cell size' for the program memory, to an instruction word, instead of int16. Explicitly defining the size might well generate the old behaviour (if needed).
Haven't got PCD with me, so can't check if this does work though.
Best Wishes |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Nov 28, 2011 8:56 am |
|
|
Yes, exactly. In contrast specifying int32 type makes the new syntax (without zero fill) work with the older compiler versions as well.
Many thanks |
|
|
|