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

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

Re: [avr-gcc-list] How to define a ROM data in a perticular address?


From: Ruwan Jayanetti
Subject: Re: [avr-gcc-list] How to define a ROM data in a perticular address?
Date: Mon, 24 Apr 2006 19:16:17 +0530

Hi,

I tried this before trying .org but failed. I may be doing something wrong.

In Makefile added:
LDFLAGS += -Wl,--section-start=.flashparams=0x100

In the program C code:
uint8_t fFlashParams[]  __attribute__ ((section (".flashparams"))) =
"Hello World";

@ compilation it fails:
....
\WinAVRnew\bin\..\lib\gcc\avr\3.4.3\..\..\..\..\avr\bin\ld.exe: section .text [0
0000000 -> 000001b3] overlaps section .flashparams [00000100 -> 0000010b]
make: *** [demo.elf] Error 1

Complaining my memory section is overlapping with .text. I need my
memory location to be fixed within .text. Your wisdom needs in here!

TIA (Tanks In Advance),

Ruwan



On 4/24/06, Schwichtenberg, Knut <address@hidden> wrote:
> Ruwan,
> forget .org. Define a special segment and place your data into this
> segment. This will be done within the source code. Extend the linker
> command within the makefile to address the this segment (like the
> addresses for text and data segment).
>
> You will find more detailed information within the avr-libc
> documentation and also if you search for absoule adddress here.
>
> Cheers
>
> Knut
>
> > -----Original Message-----
> > From:
> > address@hidden
> > g
> > [mailto:address@hidden
> > ongnu.org] On Behalf Of Ruwan Jayanetti
> > Sent: Monday, April 24, 2006 2:53 PM
> > To: address@hidden
> > Subject: [avr-gcc-list] How to define a ROM data in a
> > perticular address?
> >
> > Hi,
> >
> > I need to define some data in a particular address in ROM (flash). Any
> > idea how can I do this?
> >
> > I tried including an assembler file:
> >
> > .org 0x80
> >
> >  .byte 0xaa
> >  .byte 0x55
> >
> > But compiler / linker don't seems to care about .org directive. The
> > bytes are getting in with other program strings defined in C, but
> > leaving a gap of 0x80.
> >
> > Thanks in advance,
> >
> > Ruwan
> >
> >
> > _______________________________________________
> > AVR-GCC-list mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> >
>




reply via email to

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