avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] constant in bootloader section of program space


From: pfaff - Markus Pfaff
Subject: [avr-libc-dev] constant in bootloader section of program space
Date: Mon, 29 Sep 2003 13:38:58 +0200

Hi,

if you want a constant in bootloader (or other special) section of
program space you cannot use the PROGMEM attribute with which the
constant ends up in the application memory. Thanks to some ideas from
Eric I was able to find the following simple code that worked for me:

// Program constant section in the bootloader section.
#define BOOTLOADER_CONST_SECTION __attribute__ ((section
(".bootldpgmconst")))

// This constants should be placed in a section inside of the
bootloader.
const char BootloaderPlacedString[] BOOTLOADER_CONST_SECTION =
"Hi, I'm a string in bootloader section.";

The strange thing is that I cannot find the constant in the .lss file
generated by the avrgcc although every other constant in program memory
will be correctly listed. The symbol exists in the symbol file and the
string can be found in the .hex file.

Any idea on this behavior?

Markus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]