[patch #9543] Add avrxmega3 devices.

2021-11-23 Thread Balint Cristian
Follow-up Comment #34, patch #9543 (project avr-libc):

Updated avrxmega3-v12.diff.xz:
  * Update wdt.h, sleep.h (based on avr8-toolchain-3.6.2.1778).

Thanks,
~Cristian.


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-23 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v12.diff.xz  Size:92 KB
   




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-23 Thread Joel Holdsworth
Follow-up Comment #33, patch #9543 (project avr-libc):

wdt.h seems to have some issues that need fixing up. The wdt_enable() and
wdt_disable() macros seem are completely inapplicable to the ATtiny416.

There seem to be similar issues in sleep.h

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-16 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v11.diff.xz  Size:91 KB
   




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-16 Thread Balint Cristian
Follow-up Comment #32, patch #9543 (project avr-libc):

Updated avrxmega3-v11.diff.xz with latest AVR8X devices.
Rebased on latest *.ATDF (AVR8X only entries):
 Atmel.ATtiny_DFP.1.10.348.atpack
 Atmel.ATmega_DFP.1.7.374.atpack
Header generator error fixed for DWORD types (size=4).
Add FUSELOCK_DEFAULT values (as per newer original *.h)
New devices:
 attiny424, attiny426, attiny427,
 attiny824, attiny826, attiny827,
 attiny1624, attiny1626, attiny1627,
 attiny3224, attiny3226, attiny3227.


Tested it against SVN master.

Let me know about any help needed to merge this.


Thank you,
~Cristian.


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-16 Thread Joel Holdsworth
Follow-up Comment #31, patch #9543 (project avr-libc):

Is it possible to cut the Gordian knot? This patch applies cleanly and works
perfectly - as far as I can tell from my testing. I see no reason why it's
necessary for it to be tangled up with these other long-standing issues. I
would imagine this patch could be applied, and a release made in a couple of
hours work.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-15 Thread Joel Holdsworth
Follow-up Comment #30, patch #9543 (project avr-libc):

What would it take to get all these changes merged?

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-15 Thread Georg-Johann Lay
Follow-up Comment #29, patch #9543 (project avr-libc):

This patch is best integrated after the changes from


https://savannah.nongnu.org/bugs/?49567

and

https://savannah.nongnu.org/bugs/?57071

which will greatly reduce the number of conflicts. 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2021-11-15 Thread Joel Holdsworth
Follow-up Comment #28, patch #9543 (project avr-libc):

Can we have this patch integrated and released? I have used it for a complex
project on the ATtiny416, and have found no issues.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2020-12-01 Thread Balint Cristian
Follow-up Comment #27, patch #9543 (project avr-libc):

[comment #26 comment #26:]
> Great work all. As I am not so knowlegable@Linux, it took me a while to get
that running, lots of compile problems, try and error, so I wanted to share
what finally worked for me.
> 


Thank you Wasti !
One issue as you pointed out is community support. We do best what we can,
each person within their own area of expertise, but proper documentation and
promotion is always an issue.
* Also I recommend gcc 8.0.0 (very fist gcc8 release) for proper LTO (-Os,
smallest possible size) working, anything >gcc8.0.0 will lead to 30% increase
of binary (in some corner cases).* Spent a lot of time tracking down issues
(by tracking commits) with LTO across gcc8 then gcc9 up to gcc10 and now with
a list of commits/reverts I found hard even to raise the issue to the GCC
community.





> # Other than in the manual below, I did install everything into the default
path. No PREFIX, as prefixing did not work on my environment.
> #
https://www.nongnu.org/avr-libc/user-manual/install_tools.html#install_avr_gcc
> 
> # The following process did work for me.
> cat /proc/version
> #Linux version 5.4.0-52-generic (buildd@lgw01-amd64-060) (gcc version 9.3.0
(Ubuntu 9.3.0-17ubuntu1~20.04))
> 
> sudo apt remove gcc-avr binutils-avr avr-libc
> 
> # Important: close teminal and reopen to remove cached links to the
binaries
> 
> #set up directory
> mkdir ~/libc-compile
> cd ~/libc-compile
> 
> #
> #compile and install binutils
> #
> 
> wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.34.90.tar.xz
> tar -xf binutils-2.34.90.tar.xz
> cd binutils-2.34.90
> 
> mkdir obj-avr
> cd obj-avr
> ../configure --target=avr --disable-nls
> make
> sudo make install
> 
> #check version
> avr-ld --version
> 
> #
> #compile and install GCC, this takes a wile, have lunch...
> #
> 
> cd ~/libc-compile
> 
> git clone -b releases/gcc-10.1.0 --single-branch
git://gcc.gnu.org/git/gcc.git
> ./contrib/download_prerequisites
> 
> cd gcc
> 
> mkdir obj-avr
> cd obj-avr
> ../configure --target=avr --enable-languages=c,c++ --disable-nls
--disable-libssp --with-dwarf2
> make
> sudo make install
> 
> #check version
> avr-gcc --version
> 
> #
> #patch, compile and install avr-libc
> #
> cd ~/libc-compile
> 
> svn co svn://svn.savannah.nongnu.org/avr-libc/trunk
> cd trunk/avr-libc/
> 
> wget -O - -q https://savannah.nongnu.org/patch/download.php?file_id=48974 >>
avrxmega3-v10.diff.xz
> xz --decompress avrxmega3-v10.diff.xz
> 
> patch -p0 < avrxmega3-v10.diff
> ./bootstrap
> ./configure --build=`./config.guess` --host=avr
> make
> sudo make install
> 
> ###
> #now test if it compiles
> ###
> 
> mkdir ~/libc-compile/test-program
> cd ~/libc-compile/test-program
> 
> echo "#define __AVR_ATtiny1604__
> #include 
> int
> main(void)
> {
> while (1);
> }" >> main.c
> 
> avr-gcc -std=c99 -Wall -g -Os -mmcu=avrxmega3 -DF_CPU=120 -I.  -o
main.bin main.c
> avr-objcopy -j .text -j .data -O ihex main.bin main.hex
> 
> 
> 
>   

[comment #26 comment #26:]
> Great work all. As I am not so knowlegable@Linux, it took me a while to get
that running, lots of compile problems, try and error, so I wanted to share
what finally worked for me.
> 
> # Other than in the manual below, I did install everything into the default
path. No PREFIX, as prefixing did not work on my environment.
> #
https://www.nongnu.org/avr-libc/user-manual/install_tools.html#install_avr_gcc
> 
> # The following process did work for me.
> cat /proc/version
> #Linux version 5.4.0-52-generic (buildd@lgw01-amd64-060) (gcc version 9.3.0
(Ubuntu 9.3.0-17ubuntu1~20.04))
> 
> sudo apt remove gcc-avr binutils-avr avr-libc
> 
> # Important: close teminal and reopen to remove cached links to the
binaries
> 
> #set up directory
> mkdir ~/libc-compile
> cd ~/libc-compile
> 
> #
> #compile and install binutils
> #
> 
> wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.34.90.tar.xz
> tar -xf binutils-2.34.90.tar.xz
> cd binutils-2.34.90
> 
> mkdir obj-avr
> cd obj-avr
> ../configure --target=avr --disable-nls
> make
> sudo make install
> 
> #check version
> avr-ld --version
> 
> #
> #compile and install GCC, this takes a wile, have lunch...
> #
> 
> cd ~/libc-compile
> 
> git clone -b releases/gcc-10.1.0 --single-branch
git://gcc.gnu.org/git/gcc.git
> ./contrib/download_prerequisites
> 
> cd gcc
> 
> mkdir obj-avr
> cd obj-avr
> ../configure --target=avr --enable-languages=c,c++ --disable-nls
--disable-libssp --with-dwarf2
> make
> sudo make install
> 
> #check version
> avr-gcc --version
> 
> #
> #patch, compile and install avr-libc
> #
> cd ~/libc-compile
> 
> svn co svn://svn.savannah.nongnu.org/avr-libc/trunk
> cd trunk/avr-libc/
> 
> wget -O - -q https://savannah.nongnu.org/patch/download.php?file_id=48974 >>
avrxmega3-v10.diff.xz
> xz --decompress avrxmega3-v10.diff.xz
> 
> patch -p0 < avrxmega3-v10.diff
> ./bootstrap
> ./configure 

[patch #9543] Add avrxmega3 devices.

2020-12-01 Thread wasti
Follow-up Comment #26, patch #9543 (project avr-libc):

Great work all. As I am not so knowlegable@Linux, it took me a while to get
that running, lots of compile problems, try and error, so I wanted to share
what finally worked for me.

# Other than in the manual below, I did install everything into the default
path. No PREFIX, as prefixing did not work on my environment.
#
https://www.nongnu.org/avr-libc/user-manual/install_tools.html#install_avr_gcc

# The following process did work for me.
cat /proc/version
#Linux version 5.4.0-52-generic (buildd@lgw01-amd64-060) (gcc version 9.3.0
(Ubuntu 9.3.0-17ubuntu1~20.04))

sudo apt remove gcc-avr binutils-avr avr-libc

# Important: close teminal and reopen to remove cached links to the binaries

#set up directory
mkdir ~/libc-compile
cd ~/libc-compile

#
#compile and install binutils
#

wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.34.90.tar.xz
tar -xf binutils-2.34.90.tar.xz
cd binutils-2.34.90

mkdir obj-avr
cd obj-avr
../configure --target=avr --disable-nls
make
sudo make install

#check version
avr-ld --version

#
#compile and install GCC, this takes a wile, have lunch...
#

cd ~/libc-compile

git clone -b releases/gcc-10.1.0 --single-branch
git://gcc.gnu.org/git/gcc.git
./contrib/download_prerequisites

cd gcc

mkdir obj-avr
cd obj-avr
../configure --target=avr --enable-languages=c,c++ --disable-nls
--disable-libssp --with-dwarf2
make
sudo make install

#check version
avr-gcc --version

#
#patch, compile and install avr-libc
#
cd ~/libc-compile

svn co svn://svn.savannah.nongnu.org/avr-libc/trunk
cd trunk/avr-libc/

wget -O - -q https://savannah.nongnu.org/patch/download.php?file_id=48974 >>
avrxmega3-v10.diff.xz
xz --decompress avrxmega3-v10.diff.xz

patch -p0 < avrxmega3-v10.diff
./bootstrap
./configure --build=`./config.guess` --host=avr
make
sudo make install

###
#now test if it compiles
###

mkdir ~/libc-compile/test-program
cd ~/libc-compile/test-program

echo "#define __AVR_ATtiny1604__
#include 
int
main(void)
{
while (1);
}" >> main.c

avr-gcc -std=c99 -Wall -g -Os -mmcu=avrxmega3 -DF_CPU=120 -I.  -o main.bin
main.c
avr-objcopy -j .text -j .data -O ihex main.bin main.hex



  

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2020-11-08 Thread Tom Li
Follow-up Comment #25, patch #9543 (project avr-libc):

[comment #22 comment #22:]
> When I attempt to apply any of them to libc-2.0.0, I get lots of complaints
about missing files, e.g. "devtools/generate_iosym.sh". That file doesn't
exist in libc-1.8.1 either.

Same problem here. It says "devtools/gen-avr-lib-tree.sh" cannot be found,
even if the file is right here. After some head scratching, I realized the
patch must be applied as level "-p0". Instead of "patch < avrxmega3-v10.diff",
it should be "patch -p0 < avrxmega3-v10.diff". I've successfully applied the
patch to SVN trunk r2551. 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2020-04-30 Thread Balint Cristian
Follow-up Comment #24, patch #9543 (project avr-libc):

* Updated avrxmega3-v10.diff.xz with latest AVR8X devices.
* Rebased on *.ATDF (AVR8X only) from latest:
 Atmel.ATtiny_DFP.1.4.310.atpack
 Atmel.ATmega_DFP.1.4.351.atpack
* Header generator updated to python3
* Update FUSE generation in header (as per original *.h)
* New devices: 
 atmega808,atmega809,
 atmega1608,atmega1609,
 atmega4808,atmega4809
* GCC 9.3.1 is needed for newer devices


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2020-04-30 Thread Balint Cristian
Follow-up Comment #23, patch #9543 (project avr-libc):


[comment #22 comment #22:]
> I would like to use those new ATtiny devices. It would be great if those
newer devices were supported, and I am willing to help with that.
> People here seem to have successfully used the patches here, but I seem
unable to find where to apply them: Do we need just the last once (v9)? Or do
we need to apply them in order? What version of libc do they apply to? Do they
apply before or after bootstrap/configure/build/install?
> When I attempt to apply any of them to libc-2.0.0, I get lots of complaints
about missing files, e.g. "devtools/generate_iosym.sh". That file doesn't
exist in libc-1.8.1 either.
> 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2020-04-30 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v10.diff.xz  Size:78 KB




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




Re: [patch #9543] Add avrxmega3 devices.

2020-04-22 Thread Cristian Balint
Be back with updated patch new dev support. Need to rewrite generator in
py3 for that. Will also include a  doc with the steps.

On Wed, 22 Apr 2020, 15:46 Yves Delley,  wrote:

> Follow-up Comment #22, patch #9543 (project avr-libc):
>
> I would like to use those new ATtiny devices. It would be great if those
> newer
> devices were supported, and I am willing to help with that.
> People here seem to have successfully used the patches here, but I seem
> unable
> to find where to apply them: Do we need just the last once (v9)? Or do we
> need
> to apply them in order? What version of libc do they apply to? Do they
> apply
> before or after bootstrap/configure/build/install?
> When I attempt to apply any of them to libc-2.0.0, I get lots of complaints
> about missing files, e.g. "devtools/generate_iosym.sh". That file doesn't
> exist in libc-1.8.1 either.
>
>
> ___
>
> Reply to this item at:
>
>   
>
> ___
>   Message sent via Savannah
>   https://savannah.nongnu.org/
>
>


[patch #9543] Add avrxmega3 devices.

2020-04-22 Thread Yves Delley
Follow-up Comment #22, patch #9543 (project avr-libc):

I would like to use those new ATtiny devices. It would be great if those newer
devices were supported, and I am willing to help with that.
People here seem to have successfully used the patches here, but I seem unable
to find where to apply them: Do we need just the last once (v9)? Or do we need
to apply them in order? What version of libc do they apply to? Do they apply
before or after bootstrap/configure/build/install?
When I attempt to apply any of them to libc-2.0.0, I get lots of complaints
about missing files, e.g. "devtools/generate_iosym.sh". That file doesn't
exist in libc-1.8.1 either.


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[patch #9543] Add avrxmega3 devices.

2019-11-18 Thread Georg-Johann Lay
Follow-up Comment #21, patch #9543 (project avr-libc):

FYI, support for devices from the 0-series like ATmega4808 (also filed under
avrxmega3) has been added to avr-gcc:

https://gcc.gnu.org/PR92545

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/




[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2019-03-12 Thread Paul Evans
Follow-up Comment #20, patch #9543 (project avr-libc):

I too have successfully used this patch to add support for ATtiny814 to my
avr-libc. Can it be considered for mainline merging sometime please? This
would help improve the uptake of these new chips.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-12-25 Thread Balint Cristian
Follow-up Comment #18, patch #9543 (project avr-libc):

* Updated avrxmega3-v9.diff.bz2 with latest AVR8X devices.
* Rebased on .ATDF from latest Atmel.ATtiny_DFP.1.3.229.atpack

The python header generator still generate 1:1 as upstream. Validated against
latest (9/28/2018) avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz by
DIFF-ing, and difference is cosmetic only.


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-12-25 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v9.diff.bz2  Size:454 KB


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-07-01 Thread Balint Cristian
Follow-up Comment #17, patch #9543 (project avr-libc):

* Updated avrxmega3-v8.diff.bz2 with latest AVR8X devices.
* Rebased on .ATDF from latest Atmel.ATtiny_DFP.1.3.172.atpack.zip

  

(file #44476)
___

Additional Item Attachment:

File name: avrxmega3-v8.diff.bz2  Size:456 KB


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-03-30 Thread Balint Cristian
Follow-up Comment #15, patch #9543 (project avr-libc):

Jan,

* Can try v7 of patch ?

  I missed a # sign in header generator, included a fix for generator and also
reincluded generated header files. It was my mistake during assamble of V6
patch.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-03-30 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v7.diff.bz2  Size:292 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-03-30 Thread jan de kruyf
Follow-up Comment #14, patch #9543 (project avr-libc):

Cristian, hello.

I just tried to compile avr-libc svn2546 with patches from
avrxmega3-v6.diff.bz2. compiler gcc8.0.1 built for avr.

I get some errors which are at least partly from this patch.
I did not get any strange messages before this just some warnings.
Also the last time I built it without the patch it looked right.
 
Could you have a look at it? 


In file included from ../../../../include/avr/io.h:456,
 from ../../../../libc/misc/eewr_block_xmega.c:4:
../../../../include/avr/iotn1614.h:5623:1: error: unknown type name 'define'
 define PERIOD0  (unsigned char)~_BV(0)  /* Watchdog Timeout Period Bit 0 */
 ^~
../../../../include/avr/iotn1614.h: In function 'PERIOD0':
../../../../include/avr/iotn1614.h:5623:32: error: expected declaration
specifiers before '~' token
 define PERIOD0  (unsigned char)~_BV(0)  /* Watchdog Timeout Period Bit 0 */
^
In file included from ../../../../include/avr/io.h:626,
 from ../../../../libc/misc/eewr_block_xmega.c:4:
../../../../include/avr/fuse.h:234:3: error: expected declaration specifiers
before '__fuse_t'
 } __fuse_t;
   ^~~~
In file included from ../../../../include/stdlib.h:48,
 from ../../../../include/assert.h:65,
 from ../../../../libc/misc/eewr_block_xmega.c:8:
/home/jan/programs-8/avrada/lib/gcc/avr/8.0.1/include/stddef.h:216:23: error:
storage class specified for parameter 'size_t'
 typedef __SIZE_TYPE__ size_t;
  ^~
/home/jan/programs-8/avrada/lib/gcc/avr/8.0.1/include/stddef.h:328:24: error:
storage class specified for parameter 'wchar_t'
 typedef __WCHAR_TYPE__ wchar_t;
^~~
In file included from ../../../../include/assert.h:65,
 from ../../../../libc/misc/eewr_block_xmega.c:8:
../../../../include/stdlib.h:73:3: error: storage class specified for
parameter 'div_t'
 } div_t;
   ^
../../../../include/stdlib.h:79:3: error: storage class specified for
parameter 'ldiv_t'
 } ldiv_t;
   ^~
../../../../include/stdlib.h:82:15: error: storage class specified for
parameter '__compar_fn_t'
 typedef int (*__compar_fn_t)(const void *, const void *);
   ^
../../../../include/stdlib.h:116:13: error: storage class specified for
parameter 'abort'
 extern void abort(void) __ATTR_NORETURN__;
 ^
../../../../include/stdlib.h:121:12: error: storage class specified for
parameter 'abs'
 extern int abs(int __i) __ATTR_CONST__;
^~~
../../../../include/stdlib.h:130:13: error: storage class specified for
parameter 'labs'
 extern long labs(long __i) __ATTR_CONST__;
 ^~~~
../../../../include/stdlib.h:153:61: error: expected declaration specifiers or
'...' before 'size_t'
 extern void *bsearch(const void *__key, const void *__base, size_t __nmemb,
 ^~
../../../../include/stdlib.h:154:8: error: expected declaration specifiers or
'...' before 'size_t'
size_t __size, int (*__compar)(const void *, const void *));
^~
../../../../include/stdlib.h:162:14: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'div'
 extern div_t div(int __num, int __denom) __asm__("__divmodhi4")
__ATTR_CONST__;
  ^~~
../../../../include/stdlib.h:168:15: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'ldiv'
 extern ldiv_t ldiv(long __num, long __denom) __asm__("__divmodsi4")
__ATTR_CONST__;
  ^~~~
../../../../include/stdlib.h:185:33: error: expected declaration specifiers or
'...' before 'size_t'
 extern void qsort(void *__base, size_t __nmemb, size_t __size,
 ^~
../../../../include/stdlib.h:185:49: error: expected declaration specifiers or
'...' before 'size_t'
 extern void qsort(void *__base, size_t __nmemb, size_t __size,
 ^~
../../../../include/stdlib.h:186:5: error: expected declaration specifiers or
'...' before '__compar_fn_t'
 __compar_fn_t __compar);
 ^
../../../../include/stdlib.h:218:13: error: storage class specified for
parameter 'strtol'
 extern long strtol(const char *__nptr, char **__endptr, int __base);
 ^~
../../../../include/stdlib.h:252:22: error: storage class specified for
parameter 'strtoul'
 extern unsigned long strtoul(const char *__nptr, char **__endptr, int
__base);
  ^~~
../../../../include/stdlib.h:264:13: error: storage class specified for
parameter 'atol'
 extern long atol(const char *__s) __ATTR_PURE__;
 ^~~~
../../../../include/stdlib.h:264:1: warning: 'pure' attribute ignored
[-Wattributes]
 extern long atol(const char *__s) __ATTR_PURE__;
 ^~
../../../../include/stdlib.h:276:12: error: storage class specified for
parameter 'atoi'
 extern int atoi(const char *__s) __ATTR_PURE__;

[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-23 Thread Balint Cristian
Follow-up Comment #13, patch #9543 (project avr-libc):

The avrxmega3-v6.diff.bz2 includes a ATDF parser for AVR8X.


- The new parser addition does:
* Generates iotn*.h just from atdf schema.
* Parse only AVR8X family types (constrained in script).
* Adds few alieases (hardcoded) as older coding-style.
* Headers generated are functional the same as Atmel's 3.6.1.
* Parser license is BSD (the very avr-libc one).


- BTW, One of main difference BSD vs Apache would be that Apache license
grants patents (patents will not circumvent the license terms). But I am not
lawyer.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-23 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v6.diff.bz2  Size:292 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-19 Thread Joerg Wunsch
Follow-up Comment #12, patch #9543 (project avr-libc):

Mixing the licenses is doable, it's just a little cumbersome
since we need to LICENSE documents then at the toplevel.

If #b is not too much work, it would be my personally preferred
solution, as it makes us completely independent from Microchip.
They've chosen to distribute their own version of the headers
independently from us anyway.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-19 Thread Balint Cristian
Follow-up Comment #11, patch #9543 (project avr-libc):



* The Apache license on io*.h might expose a problem.


- Some possible solutions.

  a) Mchip/Atmel right now mixes BSD+Apache in their packages, so avr-libc
could do it too ? (not a lawyer).

  b) Make new headers from scratch based from docs. A simple one (no fancy
struct), just simple enumerations.


* I incline to choose #b, and i am willing to do the task if You all here
agree. Probably wise would be to have a common avr8x.h and some alias files
that adds extras for each particular devices.




___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Balint Cristian
Follow-up Comment #9, patch #9543 (project avr-libc):

Johann,

Uploaded avrxmega3-v5.diff.bz2 .

* Add _PROTECTED_WRITE_SPM in xmega.h (as per Atmel's upstream 3.6.1).


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v5.diff.bz2  Size:284 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Georg-Johann Lay
Follow-up Comment #8, patch #9543 (project avr-libc):

There must still be missing something, at least _PROTECTED_WRITE_SPM.  Apart
from a build warning for a missing prototype, it's neither resolved by a macro
nor my a symbol:


$ echo 'int main(){}' | avr-gcc -xc - -Wl,-u,eeprom_write_block
-mmcu=attiny1616
/srv/local/gnu/install/gcc-8/bin/../lib/gcc/avr/8.0.1/../../../../avr/lib/avrxmega3/libattiny1616.a(eewr_block_xmega.o):
In function `eeprom_write_block':
eewr_block_xmega.c:(.text.avr-libc+0x80): undefined reference to
`_PROTECTED_WRITE_SPM'
collect2: error: ld returned 1 exit status




___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Balint Cristian
Follow-up Comment #7, patch #9543 (project avr-libc):

Johann,


- Thank you for the quick review.
- I believe your proposed changes are fine.

* The task presented here is fairly easy to do, all basic ingredients are
Atmel's upstream stuff. Not sure why they are not collaborating with you guys.
They started to keep lots of changes on their own fork (their changes have no
logs or names).

* Perhaps migrating to a more collaborative platform like github would help
this project a lot.

* I attached outputs of a sample main() program for atn1616 target that looks
good to me [attiny16161-disasm.txt.bz2]. Cannot validate yet on real device
(waiting for real chip samples) .

* I am working on avrdude & USBASP-firmware too for support UPDI 
 too (is quite similar to TPI). As reference for UPDI there is
https://github.com/mraardvark/pyupdi, you probably already know that.



___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: attiny16161-disasm.txt.bz2 Size:1 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Georg-Johann Lay
Follow-up Comment #6, patch #9543 (project avr-libc):

Thanks, I can build avr-libc now and a quick test looks good.

Regarding the changes to eewr_block_xmega.c, maybe it's clearer to
special-case the different NVM flavours instead of #define + #undef + #define
chains?

I allowed me to attach a respective patch as avrxmega3-v4.diff.bz2


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-18 Thread Georg-Johann Lay
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v4.diff.bz2  Size:283 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Balint Cristian
Follow-up Comment #5, patch #9543 (project avr-libc):

* Compiles with avrxmega3-v3.patch.bz2 .
+ Backports changes from Atmel 3.6.1 [1] toolchain:

  - eedef.h
  - eewr_block_xmega.c
  - eewr_byte.S

[1]
http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.6.1/


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v3.patch.bz2 Size:284 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Georg-Johann Lay
Follow-up Comment #4, patch #9543 (project avr-libc):

With that patch, avr-libc fails to build:

++
Making all in avrxmega3
make[4]: Entering directory
'/srv/local/gnu/build/avrlibc-trunk/avr/lib/avrxmega3'
Making all in attiny1614
make[5]: Entering directory
'/srv/local/gnu/build/avrlibc-trunk/avr/lib/avrxmega3/attiny1614'
/local/gnu/install/gcc-8/bin/avr-gcc -DHAVE_CONFIG_H -I.
-I../../../../../../source/avrlibc-trunk/avr/lib/avrxmega3/attiny1614
-I../../../..  -I../../../../../../source/avrlibc-trunk/common
-I../../../../../../source/avrlibc-trunk/include -I../../../../include  -Wall
-W -Wstrict-prototypes -mmcu=attiny1614  -mcall-prologues -Os  -MT
eewr_block_xmega.o -MD -MP -MF .deps/eewr_block_xmega.Tpo -c -o
eewr_block_xmega.o
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c: In
function 'eeprom_write_page':
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c:26:13:
error: 'NVM' undeclared (first use in this function)
   } while ((NVM.STATUS & NVM_NVMBUSY_bm) == NVM_NVMBUSY_bm);
 ^~~
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c:26:13:
note: each undeclared identifier is reported only once for each function it
appears in
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c:26:26:
error: 'NVM_NVMBUSY_bm' undeclared (first use in this function); did you mean
'RTC_CMPBUSY_bm'?
   } while ((NVM.STATUS & NVM_NVMBUSY_bm) == NVM_NVMBUSY_bm);
  ^~
  RTC_CMPBUSY_bm
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c:58:13:
error: 'NVM_CMD_ERASE_WRITE_EEPROM_PAGE_gc' undeclared (first use in this
function)
   NVM.CMD = NVM_CMD_ERASE_WRITE_EEPROM_PAGE_gc;
 ^~
../../../../../../source/avrlibc-trunk/libc/misc/eewr_block_xmega.c:59:29:
error: 'NVM_CMDEX_bm' undeclared (first use in this function); did you mean
'TCD_CMPDEN_bm'?
   ccp_write_io (, NVM_CMDEX_bm);
 ^~~~
 TCD_CMPDEN_bm
Makefile:632: recipe for target 'eewr_block_xmega.o' failed
--

Notice that avr-gcc defines AVR_XMEGA for these devices (in case that
matters).

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Balint Cristian
Follow-up Comment #3, patch #9543 (project avr-libc):

Johann, Joerg,

  * Attached avrxmega3-v2.patch.bz2 to add ChangeLog as new file.




___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Balint Cristian
Additional Item Attachment, patch #9543 (project avr-libc):

File name: avrxmega3-v2.patch.bz2 Size:284 KB


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Georg-Johann Lay
Follow-up Comment #1, patch #9543 (project avr-libc):

> Changed files: [...] ChangeLog 

The delta to ChangeLog is not reasonable, too much lines affected.

Usually, ChangeLog is prone to conflicts as each push is touching it; hence it
might be more comfortable to supply it as plain text snipped and leave it out
of the patch.


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev


[avr-libc-dev] [patch #9543] Add avrxmega3 devices.

2018-01-17 Thread Balint Cristian
URL:
  

 Summary: Add avrxmega3 devices.
 Project: AVR C Runtime Library
Submitted by: cbalint
Submitted on: Wed 17 Jan 2018 03:29:03 PM UTC
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

* This patch adds support for avrxmega3 devices already supported by latest
gcc8 compiler:

attiny1614, attiny1616, attiny1617, attiny212, attiny214, 
attiny3214, attiny3216, attiny3217, attiny412, attiny414, 
attiny416, attiny417, attiny814, attiny816, attiny817 .

* New files:

  - attinny*.S are generated from latest Atmel.ATtiny_DFP.1.3.169.atpack.zip
.xml (.atdf) files.

  - iotn*.h are from latest
avr8-gnu-toolchain-osx-3.6.1.495-darwin.any.x86_64.tar.gz (
http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.6.1/ ).

  - ChangeLog-2017

* Changed files:
   - include/avr/io.h
   - include/avr/Makefile.am
   - devtools/generate_iosym.sh
   - devtools/gen-avr-lib-tree.sh
   - avr-libc/configure.ac
   - ChangeLog




___

File Attachments:


---
Date: Wed 17 Jan 2018 03:29:03 PM UTC  Name: avrxmega3.patch.bz2  Size: 285KiB
  By: cbalint
Add avrxmega3 devices.


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.nongnu.org/


___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev