Re: Support for ATtiny416/417/816/817 ?

Georg-Johann Lay <[email protected]> Fri, 5 May 2017 11:12:44 +0200
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <[email protected]>
On 05.05.2017 07:53, Pitchumani Sivanupandi wrote:
> On Wednesday 03 May 2017 08:01 PM, Georg-Johann Lay wrote:
>> Hi, the devices in $subject are not yet supported by the tools, mainly
>> because of missing Binutils support.
>>
>> Are there plans to add the needed emulation to Binutils?
>
> These devices are belongs to existing avrxmega2 family.

This emulation might be used but will result in suboptimal code.

For the mentioned devices, we want .rodata to be *not* a part of
data because just like avrtiny, what's definitely preferred is

 From avrtiny.x:

__RODATA_PM_OFFSET__ = DEFINED(__RODATA_PM_OFFSET__) ? 
__RODATA_PM_OFFSET__ : 0x4000;

...

   .text :
   {
     ...
   }  > text

   .rodata  ADDR(.text) + SIZEOF (.text) + __RODATA_PM_OFFSET__ :
   {
     *(.rodata)
     *(.rodata*)
     *(.gnu.linkonce.r*)
   } AT> text

   .data :
   {
     PROVIDE (__data_start = .) ;
     *(.data)
     *(.data*)
     *(.gnu.linkonce.d*)
     . = ALIGN(2);
     _edata = . ;
     PROVIDE (__data_end = .) ;
   } > data AT> text


whereas avrxmega2 reads:


   .text :
   {
     ...
   }  > text

   .data :
   {
      PROVIDE (__data_start = .) ;
     *(.data)
     *(.data*)
     *(.rodata)  /* We need to include .rodata here if gcc is used */
     *(.rodata*) /* with -fdata-sections.  */
     *(.gnu.linkonce.d*)
     . = ALIGN(2);
     _edata = . ;
     PROVIDE (__data_end = .) ;
   } > data AT> text


This part of avrtiny.x is what we also want to use for ATtiny816 and
friends, and the canonical way to provide it is to supply a new
emulation for "avrxmega2 + .rodata in flash".


Or are you saying that avrxmega2 like ATXmega16A4 also come with a
linear memory?  I skimmed the data sheet but I found no reference
to that feature.  Maybe the data sheets are outdated or bogus?

The data sheet I found is from June 2013.

Johann