SETTING UP TOOL CHAIN FOR ATMEGA48-20PU ON LINUX UBUNTU

Go To Last Post
53 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello folks I am trying to setup tool chain for 8 bit avr ATMEGA48-20PU on ubuntu I am using the avr dragon as my programmer

i found somewhere this command for linux

"sudo aptitude install avrdude avrdude-doc binutils-avr avr-libc gcc-avr gdb-avr" i was wondering would this work if i am using avr dragon as programmer as i realise the command has avrdude in it

 

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wouldn't use the distro's toolchain.  Atmel have provided their own toolchain which is likely to have better support for newer devices:

http://www.atmel.com/tools/atmelavrtoolchainforlinux.aspx

The one you want is probably Atmel AVR 8-bit Toolchain 3.5.4 - Linux 32-bit or Atmel AVR 8-bit Toolchain 3.5.4 - Linux 64-bit.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:
The one you want is probably [...]

+1

 

I don't trust the Linux distros repositories very much when it comes to "exotic" software like AVR-GCC/avrlibc or AVRDUDE.

 

I'm running the Atmel-built toolchain (64-bit) with success on Mint 18.1. Get it from the link Joey provided above.

Unpack to a fitting directory and add the bin directory to your path.

 


 

semed wrote:
would this work if i am using avr dragon as programmer as i realise the command has avrdude in it

AVRDUDE does not come with the Atmel-built toolchain. You need to download, build and install it separately. Depending on "things" you might need to download/install 3rd party libraries. I have sloppy notes on how I did that. I am in the (slow) process of cleaning them up to a shape that will be fit for the public. If I find the time and mood I might take a stab at it over the week-end.

 

Short version is:

 

   

  1. Download sources from 

    http://download.savannah.gnu.org/releases/avrdude/

    Get the latest avrdude-major.minor.tar.gz e.g. avrdude-6.3.tar.gz.
    Extract to a directory under your home, and cd into that directory.

  2. Do a first run of the configure script:
       ./configure
    The configure script tests your environment for stuff it needs. You will likely miss some libraries, which you need to install, e.g. libelf, libusb, libusb_1_0, libftdi1, libftdi, libhid. I managed to install missing libraries with sudo apt get install libelf-dev (I think I suffixed all missing libs with "-dev" to get right). Run the configure script again after each install to make sure you got each lib right.

  3. When there are no missing libraries left (and no other configure errors) you can build AVRDUDE:
       make

  4. You can now test-run AVRDUDE: 
       ./avrdude parameters and options
    Make sure you can get the help and list known programming hardware.
    Try an actual programming session - a read of fuses should reveal that everything works all the way to the target AVR.

  5. When you're satisfied, you can install:
       make install
    After this you should be able to run AVRDUDE from any directory.

  6. Where did the install put the AVRDUDE executable? Ask like this
       which avrdude
    I would expect the executable to end up in something like /usr/local/bin and that directory should be in your PATH, so that you don't need to be explicit with the path to it when you run it. The config file(s) probably ends up in something like /usr/local/etc .

 

As you can see from the above, you need to be reasonably comfortable with working on the command line / terminal. Mint and Ubuntu ar eclose enough that I am confident the above procedure is close to what you need. Still, there will probably be minor differences in how your and mine system is configured and set up.

 

I am assuming that you have a GCC compiler targeting Linux already installed. (If not then the configure script will protest!).

 

Good luck, and let us know how it works out for you!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Fri. Nov 24, 2017 - 07:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks joey

i installed the tool chain from atmel website

but now when i try to produce elf file from my c file using this command avr-gcc -mpart=atmega48 -std=gnu99 -O2 -Wall main.c -o main.elf

i get this error avr-gcc: error: unrecognized command line option '-mpart=atmega48'

seems like the mpart  is not right for the device i am using the ATMEGA48-20PU

would anyone know what the correct mpart is for the device

thanks

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

semed wrote:
but now when i try to produce elf file from my c file using this command

avr-gcc -mpart=atmega48 -std=gnu99 -O2 -Wall main.c -o main.elf

i get this error avr-gcc: error: unrecognized command line option '-mpart=atmega48'

The option is not (and never has been) named 'mpart', it should be 'mmcu'. Try this:

avr-gcc -mmcu=atmega48 -std=gnu99 -O2 -Wall main.c -o main.elf 

 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks Johan

i am now able to produce an elf file and from that a hex file

to burn code onto avr chip would i gather i need avrdude?

 can i install it with sudo apt install avrdude on ubuntu? 

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

semed wrote:
 can i install it with sudo apt install avrdude on ubuntu? 

Asking that? Really?

 

Why did I spend 20-30 minutes, going through my notes and typing in the bulk of post #3 above?

 

You obviously didn't read it. Sloppy, lazy or spoiled - the net result is the same: My time down the drain.

 

Just try the sudo approach. If it does not work: Read #3. Search the net. Whatever..

 

I'm out.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Sat. Nov 25, 2017 - 12:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An older version of avrdude will lack support for the latest chips.  Frankly, using an ATmega48 and a Dragon, the package-manager-installed version should be fine, because those are both pretty "mature" bits of tech...

 

Is "aptitude" the standard package manager these days?   One of the things to watch out for is old tutorials based on someone's relatively-random customization of a outdated OS version.  If you start running multiple package managers, things can get weird :-(

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah Johan i read your earlier instructions its just i got stuck on step two i downloaded avr dude 6.3 and i extracted to a directory but when i try the ./configure command i get this error

 bash: ./configure: No such file or directory

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you sure you downloaded the source tarball and not the documentation tarball?
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz
If so, are you sure you cd'd into the source directory before running ./configure ?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks yes i am sure i downloaded the tar ball i extracted it and moved it to another directory "avr8-tools"

this is what shows when i ls in that directory

 

semed@ubuntu:~/avr8-tools$ ls
avr                                                    avrdude-6.3.tar.gz  include  lib64    main.elf  share
avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz  bin                 info     libexec  main.hex  x86_64-pc-linux-gnu
avrdude-6.3                                            doc                 lib      main.c   man

 

when i 

semed@ubuntu:~/avr8-tools$ ./configure

bash: ./configure: No such file or directory

 

i ve been googling around to no avail

someone help

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Like I said:

If so, are you sure you cd'd into the source directory before running ./configure ?

But you didn't:

semed@ubuntu:~/avr8-tools$ ls
avr                                                    avrdude-6.3.tar.gz  include  lib64    main.elf  share
avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz  bin                 info     libexec  main.hex  x86_64-pc-linux-gnu
avrdude-6.3                                            doc                 lib      main.c   man

 

when i 

semed@ubuntu:~/avr8-tools$ ./configure

bash: ./configure: No such file or directory

Yes, you downloaded avrdude-6.3.tar.gz.  Yes, you moved it into ~/avr8-tools.  Yes, you extracted it to avrdude-6.3.

 

No, you didn't cd into that directory before running ./configure.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes thanks  you are right i didnt cd into the avrdude-6.3 directory

i did that and now i am able to configure

i get this

 

 

Configuration summary:
----------------------
DON'T HAVE libelf
DON'T HAVE libusb
DON'T HAVE libusb_1_0
DON'T HAVE libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    pthread
DISABLED   doc
ENABLED    parport
DISABLED   linuxgpio

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use synaptic or similar to look up all those and get their "-dev" variants. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i tried sudo apt get install libelf-dev

and i get this error 

 E: Invalid operation get

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i tried again with 

 

 sudo apt install libelf-dev "with no get"

 

and then i run configure again and i get this

 

Configuration summary:
----------------------
DO HAVE    libelf
DON'T HAVE libusb
DON'T HAVE libusb_1_0
DON'T HAVE libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    pthread
DISABLED   doc
ENABLED    parport
DISABLED   linuxgpio

i am assuming its safe to do the same for all the other dont haves

is this correct?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like you are confusing the "get" operation of the "apt" command with the "apt-get" command.  Try this: sudo apt install libelf-dev or this: sudo apt-get install libelf-dev.  One or both of them should work.

 

EDIT: whoops, too slow...

Greg Muth

Portland, OR, US

Atmel Studio 7 (Version: 7.0.1652) on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

Last Edited: Sat. Nov 25, 2017 - 08:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am assuming its safe to do the same for all the other dont haves

You don't have to do them individually.  You can include all on the same command line.

Greg Muth

Portland, OR, US

Atmel Studio 7 (Version: 7.0.1652) on Windows 10

Xplained/Pro/Mini Boards mostly

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks Greg

i have them all installed except for libhid

i tried both 

sudo apt-get install libhid-dev

 

and 

sudo apt install libhid-dev

 

i get this error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libhid-dev

 

when i run ./configure i get this

 

Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DO HAVE    libftdi (but prefer to use libftdi1)
DON'T HAVE libhid
DO HAVE    pthread
DISABLED   doc
ENABLED    parport
DISABLED   linuxgpio

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

also do i need to enable the libraries that say disable like the "linuxgpio" and "doc"?

if so how would i do that 

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
$ apt-cache search libhid
libhidapi-dev - Multi-Platform library for communication with HID devices (development files)
libhidapi-hidraw0 - Multi-Platform library for communication with HID devices (hidraw backend)
libhidapi-hidraw0-dbg - Debugging symbols for libhidapi-hidraw0
libhidapi-libusb0 - Multi-Platform library for communication with HID devices (libusb backend)
libhidapi-libusb0-dbg - Debugging symbols for libhidapi-libusb0
libhidrd0 - runtime library for parsing and generating USB HID reports
libhidrd0-dbg - detached debugging symbols for libhidrd0
libhidrd0-dev - development files for parsing and generating USB HID reports
python-hidapi - Python bindings for the HID API
python3-hidapi - Python bindings for the HID API

Probably the orange one.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks Joey

semed@ubuntu:~$  apt-cache search libhid libhidapi-dev
libhidapi-dev - Multi-Platform library for communication with HID devices (development files)

 

 

then sudo apt-get install libhidapi-dev

 

forgot to cd into avrdude-6.3 directory

when i tried again in avrdude-6.3 directory

 

libhidapi-dev is already the newest version (0.8.0~rc1+git20140818.d17db57+dfsg-1).
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-62 linux-headers-4.4.0-62-generic linux-headers-4.4.0-64
  linux-headers-4.4.0-64-generic linux-image-4.4.0-62-generic
  linux-image-4.4.0-64-generic linux-image-extra-4.4.0-62-generic
  linux-image-extra-4.4.0-64-generic
Use 'sudo apt autoremove' to remove them.

 

then when i configure

 

Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DO HAVE    libftdi (but prefer to use libftdi1)
DON'T HAVE libhid
DO HAVE    pthread
DISABLED   doc
ENABLED    parport
DISABLED   linuxgpio

 

libhid is still showing as DON'T HAVE

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Curious. I must admit I've not built it myself, so I'm not sure how to proceed. Check the docs. Perhaps there will be some insight as to how to deal with that. Perhaps there is a build option which can be switched off.
You could also just proceed to the next step of building with 'make' and see if it complains.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks Joey

 

i proceeded to make and this is what i get

semed@ubuntu:~/avr8-tools/avrdude-6.3$ make
make  all-recursive
make[1]: Entering directory '/home/semed/avr8-tools/avrdude-6.3'
Making all in .
make[2]: Entering directory '/home/semed/avr8-tools/avrdude-6.3'
make[2]: Leaving directory '/home/semed/avr8-tools/avrdude-6.3'
make[1]: Leaving directory '/home/semed/avr8-tools/avrdude-6.3'

 

 

and then to test

 

semed@ubuntu:~/avr8-tools/avrdude-6.3$ ./avrdude parameters and options
avrdude: can't open config file "/usr/local/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "/usr/local/etc/avrdude.conf"

i get error about config 

any suggestions?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to sudo make install

Have you read the installation docs?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Re libhid, browse this thread. Search it for 'libhid' and read all mentions of it.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

still getting errors when i run make install

 

semed@ubuntu:~/avr8-tools/avrdude-6.3$  make install
make  install-recursive
make[1]: Entering directory '/home/semed/avr8-tools/avrdude-6.3'
Making install in .
make[2]: Entering directory '/home/semed/avr8-tools/avrdude-6.3'
make[3]: Entering directory '/home/semed/avr8-tools/avrdude-6.3'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libavrdude.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libavrdude.so.1.0.0 /usr/local/lib/libavrdude.so.1.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libavrdude.so.1.0.0': Permission denied
Makefile:740: recipe for target 'install-libLTLIBRARIES' failed
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory '/home/semed/avr8-tools/avrdude-6.3'
Makefile:2339: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: Leaving directory '/home/semed/avr8-tools/avrdude-6.3'
Makefile:2030: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/semed/avr8-tools/avrdude-6.3'
Makefile:2333: recipe for target 'install' failed
make: *** [install] Error 2

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

semed wrote:

still getting errors when i run make install

 

semed@ubuntu:~/avr8-tools/avrdude-6.3$  make install

 

joeymorin wrote:

You need to sudo make install

Have you read the installation docs?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks Joey  i read the document finally got it install but when i try to flash the mcu with

 

semed@ubuntu:~/avr8-tools$ avr-gcc -mmcu=atmega48 -std=gnu99 -O2 -Wall baby_steps.c -o baby_steps.elf

 

i get 

 

baby_steps.c:2:20: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>

 

doesnt seem to find the include statements

 

help

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, that won't flash the mcu, it will only compile your .c file into a .elf file.

 

Have you added the Atmel toolchain into your path?

 

Show the results of this:

echo $PATH

... and this:

which -a avr-gcc

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

as always much thanks Joey

 

i checked the path

 

semed@ubuntu:~/avr8-tools/avrdude-6.3$ echo $PATH
/home/semed/bin:/home/semed/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

semed@ubuntu:~/avr8-tools/avrdude-6.3$ which -a avr-gcc 
/usr/bin/avr-gcc

 

when i try to compile i get

 

semed@ubuntu:~/avr8-tools/avrdude-6.3$ avr-gcc -mmcu=atmega48 -std=gnu99 -O2 -Wall babySteps.c -o babySteps.elf
babySteps.c:2:20: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>
                    ^
compilation terminated.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have not added the Atmel toolchain directory to your PATH. I'm not at a computer so I won't give you detailed instructions on how to do so. Google add path Ubuntu.
The spoon feeding is going to stop soon.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As I read the above:

 

  • The avr-gcc is found and executes.
  • The built-in include directories are not found.

 

It seems to me that the OP unpacked the file in the toolchain bin directory directly into /usr/bin , which is not at all a good idea.

 

Where the toolchain lib directory (which has include files under it, in lib/gcc/avr/version/include ) and the avr directory (which has include files under it, in avr/include ) went is not clear, but if the structure in the tarball from Atmel was preserved they went into /lib and /avr (yes, directly under the root, again not a good thing). Maybe they weren't extracted at all?

 

Two reasonable places to unpack the whole tarball, preserving its directory structure, are:

  1. If this is a one-user machine the whole tarball cloud have been unpacked to a directory under ~  (e.g. ~/avr8-gnu-toolchain-linux_x86_64) thus avoiding any file rights problems.
  2. For a cleaner setup, usable on a multi-user machine, it might go into a directory /opt/avr8-gnu-toolchain-linux_x86_64, and then set file access permissions.

 

In any case the bin directory is then added to PATH, and avr-gcc will climb up and down the file system from there to the include directories.

 

I'm actually still on a setup as in alternative #1 above. Here's what my avr-gcc says about include directories:

 

johan@Mint-Latitude-E6330 ~ $ avr-gcc -xc -E -v -
Using built-in specs.
Reading specs from /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/device-specs/specs-avr2
COLLECT_GCC=avr-gcc
Target: avr
Configured with: /home/toolsbuild/workspace/avr8-gnu-toolchain/src/gcc/configure LDFLAGS=-L/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64-hostlibs/lib CPPFLAGS= --target=avr --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64 --libdir=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-avrlibc=yes --with-mpfr=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64-hostlibs --with-gmp=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64-hostlibs --with-mpc=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64-hostlibs --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.5.4_1709 --with-bugurl=http://www.atmel.com
Thread model: single
gcc version 4.9.2 (AVR_8_bit_GNU_Toolchain_3.5.4_1709) 
COLLECT_GCC_OPTIONS='-E' '-v' '-specs=device-specs/specs-avr2'
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../libexec/gcc/avr/4.9.2/cc1 -E -quiet -v -iprefix /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/ - -mn-flash=6 -mskip-bug
ignoring nonexistent directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/../../../../avr/sys-include"
ignoring duplicate directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/include"
ignoring duplicate directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/include-fixed"
ignoring nonexistent directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/../../../../avr/sys-include"
ignoring duplicate directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/../../../../avr/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/include
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/include-fixed
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/../../../../avr/include

End of search list.

 

The things to note are in bold red.

 


 

@semed: You probably isn't experienced enough to fiddle around with "manual installs" on Linux. It's sad that there is no easy way to just install a current avr-gcc using a packet manager, but that's the way it is. 

 

Fiddling directly with the file system (specifically things like /usr) might lead to disasters if you don't know what you're doing (and if you don't take full system/disk backups).

 

I recommend you find someone in your vicinity that knows GNU/Linux at this level and ask for help. Giving a Linux system maintenance course here in the forum isn't feasible.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Sun. Nov 26, 2017 - 06:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan, check #12 & #32. I'd guess the the OP hasn't yet even extracted the toolchain anywhere, and that (s)he has previously apt installed the disto's toolchain.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Sun. Nov 26, 2017 - 06:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But he claims...

semed@ubuntu:~/avr8-tools/avrdude-6.3$ which -a avr-gcc 
/usr/bin/avr-gcc

...and this seems to me to invoke the compiler executable with success...

semed@ubuntu:~/avr8-tools/avrdude-6.3$ avr-gcc -mmcu=atmega48 -std=gnu99 -O2 -Wall babySteps.c -o babySteps.elf
babySteps.c:2:20: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>
                    ^
compilation terminated.

...although it fails to find <avr/io.h>

 

I still think he unpacked the tarball in a bad way and/or place.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:

But he claims...

semed@ubuntu:~/avr8-tools/avrdude-6.3$ which -a avr-gcc 
/usr/bin/avr-gcc

...and this seems to me to invoke the compiler executable with success...

 

Yup:

 

joeymorin wrote:

(s)he has previously apt installed the disto's toolchain.

 

JohanEkdahl wrote:

...although it fails to find <avr/io.h>

Which is curious.

 

I still think he unpacked the tarball in a bad way and/or place.

I think it hasn't been unpacked at all.

 

I guess we'll have to wait for the OP to reappear.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:
I think it hasn't been unpacked at all.

Then how on earth can he get avr-gcc to execute?!? If the tarball has not been unpacked to somewhere, how can which find avr-gcc.exe?!? Etc.. (I'm missing something obvious you're thinking/seeing.)

 

joeymorin wrote:
JohanEkdahl wrote: ...although it fails to find Which is curious.

My hypothesis is that he unpacked the tarball without preserving it's directory structure, and thus the relative paths in the binaries point to directories that does not exists.

 

Issuing

echo | avr-gcc -Wp,-v -x c - -fsyntax-only

 

in a terminal will reveal the situation. I get

 

johan@Mint-Latitude-E6330 ~ $ echo | avr-gcc -Wp,-v -x c - -fsyntax-only
ignoring nonexistent directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/../../../../avr/sys-include"
ignoring duplicate directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/include"
ignoring duplicate directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/include-fixed"
ignoring nonexistent directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/../../../../avr/sys-include"
ignoring duplicate directory "/home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/../../lib/gcc/avr/4.9.2/../../../../avr/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/include
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/include-fixed
 /home/johan/bin/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/4.9.2/../../../../avr/include
End of search list.

If I fiddle with one of the valid paths (e.g. rename "include" folder to "includex") it pops up as an "ignoring nonexistent .." instead.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Mon. Nov 27, 2017 - 06:32 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Then how on earth can he get avr-gcc to execute?!?

As I said, I believe the OP has previously installed avr-gcc from the distro's repository.  This was his original plan from #1:

"sudo aptitude install avrdude avrdude-doc binutils-avr avr-libc gcc-avr gdb-avr"

It is where you would expect it to be had (s)he done so.  From #32:

semed@ubuntu:~/avr8-tools/avrdude-6.3$ which -a avr-gcc 
/usr/bin/avr-gcc

Mind you, this doesn't explain why avr/io.h cannot be found.

 

The OP has only stated:

i installed the tool chain from atmel website

But it is unclear whether the OP understands what 'install' means, and (s)he may be conflating 'install' with 'download'.  I suspect it has only been downloaded.  From #12

semed@ubuntu:~/avr8-tools$ ls
avr                                                    avrdude-6.3.tar.gz  include  lib64    main.elf  share
avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz  bin                 info     libexec  main.hex  x86_64-pc-linux-gnu
avrdude-6.3                                            doc                 lib      main.c   man

Note how the tarball is present, but there's no evidence that it has been extracted anywhere. 

 

Had the OP unpacked it and put it somewhere else, I think it would be unlikely (given the aptitude demonstrated thus far) they would drill down to the location of the gcc executable within the tarball (./avr8-gnu-toolchain-linux_x86_64/bin/avr-gcc) and then copy/move that to /usr/bin/avr-gcc.  It seems more likely to me that the distro's package was previously installed and that the Atmel toolchain tarball has not been touched since it was downloaded.  Although, given that avr/io.h cannot be found, perhaps this is exactly what (s)he has done.

 

We can keep guessing, but I think:

we'll have to wait for the OP to reappear.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am so lost

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you need to explain what you've done.  For example, when you said in #4:

i installed the tool chain from atmel website

What >>exactly<< did you do?  Everything.  Every click.  Every command line.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can anyone recommend a step by step guide to setting up a tool chain for AVRs

one thats relatively easy to follow for linux?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simple answer: don’t use Linux! If there was a ‘simple’ answer then you most likely would’ve got it by now.
If you’re not skilled with building stuff under linux, then you’re going to have ‘fun’.
You might find someone has a step by step guide for the raspberry pi. Even that is fraught with danger. Seems all these ‘expert’ bloggers just reblog the same stuff that they got from ‘somewhere’ complete with defects!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PlatformIO has a minimal essential AVR toolchain on Linux for a subset of AVR.

https://github.com/platformio/platformio-examples/tree/develop/atmelavr/atmelavr-native-blink

PlatformIO Do or Do not. That's the question.

https://www.avrfreaks.net/forum/platformio-do-or-do-not-thats-question

 

For all AVR :

http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.6.1/SOURCES.README

...

 

HOW TO BUILD?
=============

...

via http://www.microchip.com/avr-support/avr-and-arm-toolchains-(c-compilers)

 

IIRC, FSF AVR GCC 8 adds tinyAVR 1-series :

https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html

...

avrxmega3

“XMEGA” devices with up to 64 KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
mcu = attiny1614, attiny1616, attiny1617, attiny212, attiny214, attiny3214, attiny3216, attiny3217, attiny412, attiny414, attiny416, attiny417, attiny814, attiny816, attiny817.

https://gcc.gnu.org/gcc-8/changes.html

...

 

AVR

The AVR port now supports the following XMEGA-like devices:

ATtiny212, ATtiny214, ATtiny412, ATtiny414, ATtiny416, ATtiny417, ATtiny814, ATtiny816, ATtiny817, ATtiny1614, ATtiny1616, ATtiny1617, ATtiny3214, ATtiny3216, ATtiny3217

The new devices are listed under -mmcu=avrxmega3.

(2 features of these)

Edits: FSF AVR GCC 8, its changes

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 4, 2018 - 02:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Simple answer: don’t use Linux! If there was a ‘simple’ answer then you most likely would’ve got it by now.

+0.5

 

The process could be viewed as a two-step one:

  1. Get the toolchain and unpack it to somewhere reasonable in the file system. This is the easy part. Get the toolchain tarball from Atmel/Microchip. Pack it up to a reasonable place. What is reasonable depends on i) What Linux variant you're using, and ii) Possibly your preferences.
  2. "Make the toolchain known" so that you can execute it regardless of current directory, and possibly for several users. This is not that hard if you are comfortable with system administration on Linux. If you aren't then there's a learning curve ahead for you. It involves things like adding directories to your system PATH variable etc.

 

If you run Linux Mint, then you might be in luck since I have set up the avr-gcc tooolchain on such a system a few months ago and might have reasonably good notes for memory. Ask and I can see if I can dig out something usable.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd have said the first step would always be to get Atmel Toolchain for Linux. Only consider actually having to build one from source if the one Atmel built for you doesn't fit the bill. (unlikely unless trying to use a very recent AVR) 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

 Only consider actually having to build one from source if the one Atmel built for you doesn't fit the bill.

 

Or just for fun ... (and then get the hostlibs inside "prefix dir") , i never understood why Atmel didnt put those inside /usr/local/avr - So i did it my self to keep everything in there.

 

 $avr-gcc -v
Using built-in specs.
Reading specs from /usr/local/atmel-3.5.3/bin/../lib/gcc/avr/4.9.2/device-specs/specs-avr2
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/local/atmel-3.5.3/bin/../libexec/gcc/avr/4.9.2/lto-wrapper
Target: avr
Configured with: /home/bingo/1-Build-Avr-GCC/Atmel-3.5-3/builddir/src/gcc/configure LDFLAGS=-L/usr/local/avr/hostlibs/lib CPPFLAGS= --target=avr --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr/local/avr --libdir=/usr/local/avr/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-avrlibc=yes --with-mpfr=/usr/local/avr/hostlibs --with-gmp=/usr/local/avr/hostlibs --with-mpc=/usr/local/avr/hostlibs --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.5.3-Bingo_201607282101 --with-bugurl=http://www.atmel.com
Thread model: single
gcc version 4.9.2 (AVR_8_bit_GNU_Toolchain_3.5.3-Bingo_201607282101)

 

/Bingo

Last Edited: Wed. Dec 20, 2017 - 07:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ohh anyone knows why Atmel is pointing to the 3.5.4 version here :

http://www.atmel.com/tools/atmel...

 

When they have released 3.6.1 , at least as source

http://distribute.atmel.no/tools...

 

Why aren't they pointing to a 3.6.1 binary on their page.

 

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Asked many times. No answer forthcoming.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

joeymorin wrote:
Asked many times. No answer forthcoming.

 

Strange ...

 

Just built it from source , builds same way as 3.5.x

 

$ avr-gcc -v
Using built-in specs.
Reading specs from /usr/local/atmel-3.6.1/bin/../lib/gcc/avr/5.4.0/device-specs/specs-avr2
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/local/atmel-3.6.1/bin/../libexec/gcc/avr/5.4.0/lto-wrapper
Target: avr
Configured with: /home/bingo/1-Build-Avr-GCC/Atmel-3.6.1/Builddir/src/gcc/configure LDFLAGS=-L/usr/local/avr/hostlibs/lib CPPFLAGS= --target=avr --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr/local/avr --libdir=/usr/local/avr/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-avrlibc=yes --with-mpfr=/usr/local/avr/hostlibs --with-gmp=/usr/local/avr/hostlibs --with-mpc=/usr/local/avr/hostlibs --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.6.1-Bingo_201712202320 --with-bugurl=http://www.atmel.com
Thread model: single
gcc version 5.4.0 (AVR_8_bit_GNU_Toolchain_3.6.1-Bingo_201712202320)
$

 

/Bingo

 

 

AVR Assembler options:
  -mmcu=[avr-name] select microcontroller variant
                   [avr-name] can be:
                   avr1  - classic AVR core without data RAM
                   avr2  - classic AVR core with up to 8K program memory
                   avr25 - classic AVR core with up to 8K program memory
                           plus the MOVW instruction
                   avr3  - classic AVR core with up to 64K program memory
                   avr31 - classic AVR core with up to 128K program memory
                   avr35 - classic AVR core with up to 64K program memory
                           plus the MOVW instruction
                   avr4  - enhanced AVR core with up to 8K program memory
                   avr5  - enhanced AVR core with up to 64K program memory
                   avr51 - enhanced AVR core with up to 128K program memory
                   avr6  - enhanced AVR core with up to 256K program memory
                   avrxmega2 - XMEGA, > 8K, < 64K FLASH, < 64K RAM
                   avrxmega3 - XMEGA, > 8K, <= 64K FLASH, > 64K RAM
                   avrxmega4 - XMEGA, > 64K, <= 128K FLASH, <= 64K RAM
                   avrxmega5 - XMEGA, > 64K, <= 128K FLASH, > 64K RAM
                   avrxmega6 - XMEGA, > 128K, <= 256K FLASH, <= 64K RAM
                   avrxmega7 - XMEGA, > 128K, <= 256K FLASH, > 64K RAM
                   avrtiny   - AVR Tiny core with 16 gp registers
  -mall-opcodes    accept all AVR opcodes, even if not supported by MCU
  -mno-skip-bug    disable warnings for skipping two-word instructions
                   (default for avr4, avr5)
  -mno-wrap        reject rjmp/rcall instructions with 8K wrap-around
                   (default for avr3, avr5)
  -mrmw            accept Read-Modify-Write instructions
  -mlink-relax     generate relocations for linker relaxation (default)
  -mno-link-relax  don't generate relocations for linker relaxation.
  -mnon-bit-addressable-registers-mask=<32 bit mask>
                   Specify non bit addressable registers mask.
Known MCU names:
  avr1 avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1
  avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny
  at90s1200 attiny11 attiny12 attiny15 attiny28 at90s2313 at90s2323
  at90s2333 at90s2343 attiny22 attiny26 at90s4414 at90s4433 at90s4434
  at90s8515 at90c8534 at90s8535 ata5272 attiny13 attiny13a attiny2313
  attiny2313a attiny24 attiny24a attiny4313 attiny44 attiny44a attiny84
  attiny84a attiny25 attiny45 attiny85 attiny261 attiny261a attiny461
  attiny461a attiny861 attiny861a attiny87 attiny43u attiny48 attiny88
  attiny828 at86rf401 at43usb355 at76c711 atmega103 at43usb320 attiny167
  at90usb82 at90usb162 ata5505 atmega8u2 atmega16u2 atmega32u2 attiny1634
  atmega8 atmega8a ata6285 ata6286 ata6289 atmega48 atmega48a atmega48pa
  atmega48p atmega88 atmega88a atmega88p atmega88pa atmega8515 atmega8535
  atmega8hva at90pwm1 at90pwm2 at90pwm2b at90pwm3 at90pwm3b at90pwm81
  at90pwm161 ata5790 ata5795 atmega16 atmega16a atmega161 atmega162
  atmega163 atmega164a atmega164p atmega164pa atmega165 atmega165a
  atmega165p atmega165pa atmega168 atmega168a atmega168p atmega168pa
  atmega169 atmega169a atmega169p atmega169pa atmega32 atmega32a atmega323
  atmega324a atmega324p atmega324pa atmega325 atmega325a atmega325p
  atmega325pa atmega3250 atmega3250a atmega3250p atmega3250pa atmega328
  atmega328p atmega329 atmega329a atmega329p atmega329pa atmega3290
  atmega3290a atmega3290p atmega3290pa atmega406 atmega64rfr2
  atmega644rfr2 atmega64 atmega64a atmega640 atmega644 atmega644a
  atmega644p atmega644pa atmega645 atmega645a atmega645p atmega649
  atmega649a atmega649p atmega6450 atmega6450a atmega6450p atmega6490
  atmega6490a atmega6490p atmega64rfr2 atmega644rfr2 atmega16hva
  atmega16hva2 atmega16hvb atmega16hvbrevb atmega32hvb atmega32hvbrevb
  atmega64hve at90can32 at90can64 at90pwm161 at90pwm216 at90pwm316
  atmega32c1 atmega64c1 atmega16m1 atmega32m1 atmega64m1 atmega16u4
  atmega32u4 atmega32u6 at90usb646 at90usb647 at90scr100 at94k m3000
  atmega128 atmega128a atmega1280 atmega1281 atmega1284 atmega1284p
  atmega128rfa1 atmega128rfr2 atmega1284rfr2 at90can128 at90usb1286
  at90usb1287 atmega2560 atmega2561 atmega256rfr2 atmega2564rfr2
  atxmega16a4 atxmega16a4u atxmega16c4 atxmega16d4 atxmega32a4
  atxmega32a4u atxmega32c4 atxmega32d4 atxmega32e5 atxmega16e5 atxmega8e5
  atxmega32x1 attiny416 attiny417 attiny816 attiny817 atxmega64a3
  atxmega64a3u atxmega64a4u atxmega64b1 atxmega64b3 atxmega64c3
  atxmega64d3 atxmega64d4 atxmega64a1 atxmega64a1u atxmega128a3
  atxmega128a3u atxmega128b1 atxmega128b3 atxmega128c3 atxmega128d3
  atxmega128d4 atxmega192a3 atxmega192a3u atxmega192c3 atxmega192d3
  atxmega256a3 atxmega256a3u atxmega256a3b atxmega256a3bu atxmega256c3
  atxmega256d3 atxmega384c3 atxmega384d3 atxmega128a1 atxmega128a1u
  atxmega128a4u attiny4 attiny5 attiny9 attiny10 attiny20 attiny40

 

Pages