[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] progmem and section attributes
From: |
Lars Noschinski |
Subject: |
Re: [avr-gcc-list] progmem and section attributes |
Date: |
Thu, 17 Jun 2010 12:46:29 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* Stu Bell <address@hidden> [10-06-10 09:23]:
> Lars Noschinski wrote:
> >
> > I've got an array which I want to be stored at a specific
> > place in the flash memory. Currently, this variable is marked
> > with the progmem attribute, but this is not compatible with
> > using the section attribute.
> > Does using the section attribute to place the variable
> > outside of the .data section imply the effects of the progmem
> > attribute?
> >
>
> Before I asnwer your question, I have a couple of my own (and I'll
> explain below why I need the answers): What AVR processor is this?
> Where do you plan on putting the table with respect to the rest of the
> code?
ATmega 16 and 162, so no problems w.r.t flash size.
> #define BOOTSTRING_SECTION __attribute__ ((section (".bootstring")))
>
> const char boot_Version [] BOOTSTRING_SECTION = "1.1";
> const char boot_Monitor [] BOOTSTRING_SECTION = "DPHIMON ";
>
> Then, in the LDFLAGS in my makefile:
>
> LDFLAGS += -Wl,--section-start=.bootstring=0x3FA00
Ok, that's the way I did it, too.
-- Lars.