[Icc-avr] Placing text in an absolute locations in the AT90CAN128 Boot Loader?

Milender, Jeff Jeff.Milender at goodrich.com
Thu Feb 7 11:34:02 PST 2008


I'm having difficulty with the same problem I resolved yesterday but now
in Boot Code. (Compiler Options/ Program Type / Boot Loader)
 
I assumed that I would use the same approach as with the Application
code, the compiler does not complain about this approach but it also
does not utilize "mytext" defined area.
 
Is there something different I will have to do to place things in
absolute locations in Boot Code? (Compiler Options/ Program Type / Boot
Loader)
 
I would expect to see BOOT_CHECKSUM_VALUE located at 0x01e100 but the
MAP files shows it at 0x1E136  
 
Same with BOOT_CRC_VALUE; expect 0x01e102 map shows 1E138 and so on.
 
 
C Source
// ---------------------------------------------------- //
// START - FLASH Assignment of Absolute Addresses       //
// ---------------------------------------------------- //
#pragma text:mytext
const INT16U BOOT_CHECKSUM_VALUE = 0x01234;
const INT16U BOOT_CRC_VALUE = 0x0ABCD; 
const INT32U BOOT_END_ADDRESS = 0x01FFFF;
const INT8U BootCodeSWPartNumber[21] =  {"787S005-004"};
#pragma text:text
// -------------------------------------------------- //
// END - FLASH Assignment of Absolute Addresses       //
// -------------------------------------------------- //
 
Compiler Options / Other Options
-bmyBootData:0x300.0x301 -bdata:0x100.0x2ff:0x302.0x10ff
-bmytext:0x1e100.0x1e11d -bfunc_lit:0x1e11e.0x20000
 
 
MP file
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
       1E138  _BOOT_CRC_VALUE
       1E13A  _BOOT_END_ADDRESS
       1E13E  _BootCodeSWPartNumber
       1E153  __lit_end
Area                               Addr   Size   Decimal Bytes
(Attributes)
--------------------------------   ----   ----   ------- -----
------------
                      myBootData   0300   0001 =      1. bytes
(rel,con,ram)
 
       Addr  Global Symbol
      -----  --------------------------------
       0300  _JmpToBootFlag
       0301  __myBootData_end
 
User Base Address Definitions
 
vector = 0x1e000
func_lit = 0x1e11e
data = 0x100
eeprom:1.4096
myBootData = 0x300
mytext = 0x1e100
 
 
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
www.goodrich.com
 
 
 
-----Original Message-----
From: icc-avr-bounces at imagecraft.com
[mailto:icc-avr-bounces at imagecraft.com] On Behalf Of Richard Man
Sent: Tuesday, February 05, 2008 3:08 PM
To: Discussion list for ICCAVR and ICCtiny Users. You do NOT need
tosubscribe to icc-announce if you are a member of this.
Subject: RE: [Icc-avr] Placing text in an absolute locations in the
AT90CAN128
 
Yup, this will work, since the -bfunc_lit you 
added effectively overrides the one from the IDE.
 
At 12:44 PM 2/5/2008, you wrote:
 
>Not sure way but this seems to work if I add the 
>-bfunc_lit:0x100.20000 after "my areas" with the setting still as
AT90CAN128.
> 
>-bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000
> 
>With this in main.c
>// FLASH Assignment of Absolute Addresses
>// "mytest" is placed at 0x50 in the AVR project file <Other Options>
>// -bmytext:0x50.0x6f -bmytext1:0x70.0xff -bfunc_lit:0x100.0x20000
>#pragma text:mytext
>// located @ 0x050
>const INT16U APP_CHECKSUM_VALUE = 0x01234;
>// located @ 0x052
>const INT16U APP_CRC_VALUE = 0x0ABCD;
>// located @ 0x054 {((0x01FFFF - 0x0100) + 1) + ((0x04F - 0x00) + 1)}
>const INT32U APP_LENGTH = 0x01FF50;
>#pragma text:text
> 
>#pragma text:mytext1
>// Located @ 0x070
>const INT8U SWPartNumber[24] =  {"GCP787S014-001"};
>#pragma text:text
> 
>The map is then
>Area                               Addr   Size   Decimal Bytes
(Attributes)
>--------------------------------   ----   ----   ------- -----
------------
>                           mytext   0050   0008 =      8. bytes
(rel,con,rom)
> 
>        Addr  Global Symbol
>       -----  --------------------------------
>        0050  _APP_CHECKSUM_VALUE
>        0052  _APP_CRC_VALUE
>        0054  _APP_LENGTH
>        0058  __mytext_end
> 
>Area                               Addr   Size   Decimal Bytes
(Attributes)
>--------------------------------   ----   ----   ------- -----
------------
>                          mytext1   0070   0018 =     24. bytes
(rel,con,rom)
> 
>        Addr  Global Symbol
>       -----  --------------------------------
>        0070  _SWPartNumber
>        0088  __mytext1_end
> 
>I guess I will have to get the bootloader updated and try this.
> 
>Thanks
>Jeff
> 
 
// richard (This email is for mailing lists. To 
reach me directly, please use richard at imagecraft.com) 
 
 
_______________________________________________
Icc-avr mailing list
Icc-avr at imagecraft.com
http://dragonsgate.net/mailman/listinfo/icc-avr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080207/90781aca/attachment-0001.html


More information about the Icc-avr mailing list