avr-libc-dev
[Top][All Lists]
Advanced

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

[patch #9543] Add avrxmega3 devices.


From: wasti
Subject: [patch #9543] Add avrxmega3 devices.
Date: Tue, 1 Dec 2020 03:06:58 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

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 <avr/io.h>
int
main(void)
{
        while (1);
}" >> main.c

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



  

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9543>

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




reply via email to

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