[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] constant strings in FLASH
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] constant strings in FLASH |
Date: |
Wed, 10 Oct 2001 12:39:44 +0200 (MET DST) |
Tim Lapawa <address@hidden> wrote:
> After compiling and uploading it to a at90s8515.
> The string is stored at the beginning of the FLASH at address $00000.
You must have done something wrong, but you didn't write how you
created your ELF (and then binary) file.
I recently posted the URL of a minimalistic AVR C file set, the file
demo.c there also contains strings in flash -- and they work as they
ought to.
$ avr-nm -n demo.out | grep ' [tT] '
00000000 t .__start_of_init__
0000001c T greeting
00000052 T quit_serial
00000080 T hello_serial
00000109 T watchdog
00000126 T snooze
00000136 T ee_done
00000148 t .__c_startup__
00000148 T _real_init_
....
As you can see, the first 0x1c bytes are being spared for the
interrupt vectors, followed by the __attribute__ ((progmem)) strings,
then the regular program text (i. e., executable code).
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/