|
From: | Eivind Sivertsen |
Subject: | Re: [avr-gcc-list] initialized progmem data at fix address |
Date: | Thu, 14 Apr 2005 10:15:09 +0200 |
User-agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Hi,I dont know if the #pragma option works, but I know you can do this (e.g. in your main .c file):
// 1) Define the segment. #define FLASHDATA __attribute__ ((section (".flashdata"))) // 2) Declare the data array.const unsigned char data_array[] FLASHDATA = {0xd9, 0xce, 0xe3, ..., ...etc, etc};
Then add this linker command under the others in the makefile: LDFLAGS += -Wl,--section-start=.flashdata=0x1E800 Cheers, Eivind
Hi, use: #pragma yoursection="ANYNAME" then in your makefile write: ANYNAME_ADDRESS = 8000 LDFLAGS += -Wl,--section-start=.text=$(ANYNAME_ADDRESS) Attention: gcc understands 8000 as BYTE address!hi, how can i create an initialized progmem data at fix address in program flash in C? ie.: bootloader version number: uint16_t version; // at address 0x1E800 thanks: Andras _______________________________________________ AVR-GCC-list mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/avr-gcc-list_______________________________________________ AVR-GCC-list mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
[Prev in Thread] | Current Thread | [Next in Thread] |