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

Richard Man richard-lists at imagecraft.com
Tue Feb 5 13:07:54 PST 2008


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) 




More information about the Icc-avr mailing list