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

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

[avr-gcc-list] Re: "progmem_far" attribute


From: Anatoly Sokolov
Subject: [avr-gcc-list] Re: "progmem_far" attribute
Date: Sun, 20 Jul 2008 19:40:38 +0400

Hi.

The patch add "progmem_far" attribute in GCC.

Anatoly.

----- Original Message ----- 
From: "Anatoly Sokolov" <address@hidden>
To: "avr-GCC" <address@hidden>
Cc: "Anatoliy Sokolov" <address@hidden>
Sent: Friday, May 02, 2008 8:36 PM
Subject: "progmem_far" attribute


> Hello.
> 
>  Now GCC have "progmem" attribute to place data in the '.progmem' section.
> The 'avr-libc' have set of '*_P' string functions for access to "progmem"
> data. But pointer operand in  '*_P' functions is 16-bit size and hence size
> of data in  '.progmem' section it is limited by about 64KB.
> 
>  This restriction was rare a source of problem for 128K devices but is very
> hard for 256K and up devices.
> 
>  I suggest to add "progmem_far" attribute, and place data defined with it
> attribute in the new '.progmem_far' section place it in end of '.text'
> section after ".fini0" (It is some section which should be located in low
> 128K ".trampolines*" and ".lowtext*"). For access to data in this section
> to use set of  '*_PF' string functions (patch #6352: Far pointer library).
> 
>  Now the programmer can define often used data with "progmem" attribute and
> define seldom used data with  "progmem_far" attribute.
> 
>  Yes I understand what to have two similar sets of attributes and functions
> is error prone, but it is necessary to allow to the programmer to store more
> them 64KB data in program memory, not forcing it to write the linker script.
> 
> For 'xmega' devices it is necessary to add  '.apptable' section which is
> located in the top 8(4)KB of FLASH.
> 
> What your opinion on this offer? 
> 
> Anatoly.
>

Attachment: binutils-progmem_far.diff
Description: Binary data

Attachment: gcc-progmem_far.diff
Description: Binary data


reply via email to

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