[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] memory sections
From: |
Theodore A. Roth |
Subject: |
Re: [avr-gcc-list] memory sections |
Date: |
Wed, 1 Oct 2003 08:47:50 -0700 (PDT) |
On Wed, 1 Oct 2003, Iztok Zupet wrote:
> Hello all,
>
> I would like to define a section of external memory at 0x8000 like that:
>
> #define NVRAM __attribute__((section(".nvram")))
>
> and use it like
>
> typedef struct _Nvram {
> unsigned int seq;
> unsigned int time;
> unsigned char data[48];
> } Nvram;
>
> Nvram nvram NVRAM;
>
> What's the most convinient way to do it without mingling with the default LD
> scripts?
Add "-Wl,--section-start=.nvram=0x808000" to your link command.
It's in the users manual here:
http://savannah.nongnu.org/download/avr-libc/doc/avr-libc-user-manual/mem_sections.html
Ted Roth