[Icc-avr] const Placement at ABS mem location in BOOT of AT90CAN128

Milender, Jeff Jeff.Milender at goodrich.com
Fri Feb 8 06:16:18 PST 2008


How do I place "const" at absolute Memory Addresses in Boot?
 
This works for the Application but it refuses to for the Boot.
In Source:
#pragma text:mytext
// located @ 0x0E100
const INT16U BOOT_CHECKSUM_VALUE = 0x01234;
// located @ 0x0E102
const INT16U BOOT_CRC_VALUE = 0x0ABCD; 
#define END_EXCLUDE_AREA 0x0E103
// located @ 0x0E104
const INT32U BOOT_END_ADDRESS = 0x0FFFF;
// Located @ 0x0E108
const INT8U BootCodeSWPartNumber[21] =  {"787S005-004"};
#pragma text:text


In Compiler Option / Other Options
-bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000
 
MAP Result of above?
 
Area                               Addr   Size   Decimal Bytes
(Attributes)
--------------------------------   ----   ----   ------- -----
------------
                             lit   1E11E   0035 =     53. bytes
(rel,con,rom)

       Addr  Global Symbol
      -----  --------------------------------
       1E11E  __lit_start
       1E11E  _BootReqID
       1E122  _FlashDataID
       1E126  _BootAckID
       1E12A  _HWPNMsgID
       1E12E  _SWPNMsgID
       1E132  _HWSNMsgID
       1E136  _BOOT_CHECKSUM_VALUE <-- should be in "mytest @ 0x1e100
       1E138  _BOOT_CRC_VALUE <-- should be in "mytest @ 0x1e102
       1E13A  _BOOT_END_ADDRESS <-- should be in "mytest @ 0x1e104
       1E13E  _BootCodeSWPartNumber <-- should be in "mytest @ 0x1e108
       1E153  __lit_end


 
 
User Base Address Definitions

vector = 0x1e000
func_lit = 0x1e11e <-- This is correct.
data = 0x100
eeprom:1.4096
myBootData = 0x300
mytext = 0x1e100 <-- Recognizes mytext area 


Func_lit start where is should but the compiler just ignores the
"mytext" assignment.
If I place a "dummy" function in mytext space that is handled correctly
but my consts are still not!
 
Source Code:
#pragma text:mytext
// located @ 0x0E100
const INT16U BOOT_CHECKSUM_VALUE = 0x01234;
// located @ 0x0E102
const INT16U BOOT_CRC_VALUE = 0x0ABCD; 
#define END_EXCLUDE_AREA 0x0E103
// located @ 0x0E104
const INT32U BOOT_END_ADDRESS = 0x0FFFF;
// Located @ 0x0E108
const INT8U BootCodeSWPartNumber[21] =  {"787S005-004"};
VOID DummyFucntionInMyTextSpace(VOID)
{
}
#pragma text:text


In Compiler Option / Other Options
-bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000
 
MAP Results
Area                               Addr   Size   Decimal Bytes
(Attributes)
--------------------------------   ----   ----   ------- -----
------------
                             lit   1E11E   0035 =     53. bytes
(rel,con,rom)

       Addr  Global Symbol
      -----  --------------------------------
       1E11E  __lit_start
       1E11E  _BootReqID
       1E122  _FlashDataID
       1E126  _BootAckID
       1E12A  _HWPNMsgID
       1E12E  _SWPNMsgID
       1E132  _HWSNMsgID
       1E136  _BOOT_CHECKSUM_VALUE <-- should be in "mytest @ 0x1e100
       1E138  _BOOT_CRC_VALUE <-- should be in "mytest @ 0x1e102
       1E13A  _BOOT_END_ADDRESS <-- should be in "mytest @ 0x1e104
       1E13E  _BootCodeSWPartNumber <-- should be in "mytest @ 0x1e108
       1E153  __lit_end


Area                               Addr   Size   Decimal Bytes
(Attributes)
--------------------------------   ----   ----   ------- -----
------------
                          mytext   1E100   0002 =      2. bytes
(rel,con,rom)

       Addr  Global Symbol
      -----  --------------------------------
       1E100  _DummyFucntionInMyTextSpace <-- This is correct
       1E102  __mytext_end


User Base Address Definitions

vector = 0x1e000
func_lit = 0x1e11e <-- This is correct.
data = 0x100
eeprom:1.4096
myBootData = 0x300
mytext = 0x1e100 <-- Recognizes mytext area


This is driving me nuts, all I want to do is place a few consts at Well
Known Locations!
Thanks
Jeff
Jeff Milender
Systems Engineer
Cargo Systems
Goodrich Interiors
2604 Highway 20 North
Jamestown, ND 58401
Tel: 701-253-7569
jeff.milender at goodrich.com <mailto:jeff.milender at goodrich.com> 
www.goodrich.com <http://www.goodrich.com/> 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080208/c1d940e2/attachment-0001.html


More information about the Icc-avr mailing list