avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] initialized progmem data at fix address


From: Edomer
Subject: Re: [avr-gcc-list] initialized progmem data at fix address
Date: Thu, 14 Apr 2005 17:51:33 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Eivind Sivertsen wrote:

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

Thanks,

works fine. Similar was my first idea before i wrote my email, but i forgot to copy this section to the srec file with objcopy, and so i thought that the compiler, linker, processor, ... etc. is bad, and my section remained uninitialised, but i was too forgetful again.

Andras






reply via email to

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