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

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

Re: [avr-gcc-list] Table in bootloader section


From: Theodore A. Roth
Subject: Re: [avr-gcc-list] Table in bootloader section
Date: Wed, 22 Oct 2003 10:18:48 -0700 (PDT)


On Wed, 22 Oct 2003, E.Weddington wrote:

> > On Wed, 22 Oct 2003, Marko Panger AGB Lab wrote:
> >
> > > Hello !
> > >
> > > I have already posted this but nobody solved this, so I am
> > > trying once again:
> > >
> > > I would like to put an pre-defined array in the bootloader
> > > section. I know how to place code in the bootloader section, but
> > > I am unable to put an array in the same section.
> > >
> > > prog_char table[] __attribute__ ((section (".bootloader"))) =
> > > {1,2,3,4,5};
> > >
> > > The file compile well, but the table is not in the supposed
> > > section.
> >
> > Did you try specifying where the .bootloader section starts ...
>
> The issue is that table is not in the section .bootloader,
> but is automatically put into the .progmem.data section. If
> I understand it correctly, the OP wants to put the data in
> a seperate section in program memory and then relocate that
> section (to any address). Correct me if I'm wrong, but the
> __progmem__ attribute (specified with the prog_char
> typedef) does not allow arbitrary section names.

You are correct. I did a test after posting and saw that mixing
.progmem.data and other sections does not work.

My comment about the dox needing an update explaning that you need to
tell the linker where to put the .bootloader section still holds
though. If you don't do that, the .booloader section will be placed
after the .text section, which is not likely to be in the device's
bootloader area.

Ted Roth


reply via email to

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