How to install AVR assembler AVRA on Linux (Ubuntu)

In this article I’d like to show how to install AVRA – an opensource version of assembler for ATMEL (currently MICROCHIP) chips on Linux (Ubuntu). Please note that AVRA is not a part of AVR-GCC and uses different directives.

1. Install AVRA

sudo apt-get install avrdude avra

2. Compile and flash example program (ATtiny13)

Clone repository from GitHub

cd $HOME
git clone https://github.com/lpodkalicki/blog.git

Compile example program

cd $HOME/blog/avr/attiny13/043_blinky_with_delay_function_asm
make

Burn the code

cd $HOME/blog/avr/attiny13/043_blinky_with_delay_function_asm
make flash

3. References

6 thoughts on “How to install AVR assembler AVRA on Linux (Ubuntu)

  1. Hallo all,
    one thing is not clear for me !
    wich programmer I have to use to upload the compiled Programm.
    Regards
    Juergen

    • Hi, the result of compilation proces is a bytecode that you can use to flash this particular MCU. So, any programmer that is suitable to this MCU family would work (i.e. cheap USBAsp programmer which works very well on both Linux and Windows).
      /L

  2. I think my attempts to load AVRA were faulty. And, I’m a fish out of the water.. My Puppy Linux would do a “global search” (and, actually find stuff) while the Ubuntu Linux can’t find anything.. –Maybe, AVRA isn’t installed..?!?!
    Lukasz- Thanks for the help!
    I have a “tar.gz” file in my downloads for AVRA. Don’t know how up-to-date it is.. I’d like to just click an icon to start writing some assembler code.. –What do I do with the tar file..?
    –Thanks!–

    • Matthew,
      it should go easly, like this:

      $ sudo apt-get install avrdude avra

      $ avra –version
      AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010)
      Copyright (C) 1998-2010. Check out README file for more info

      AVRA is an open source assembler for Atmel AVR microcontroller family
      It can be used as a replacement of ‘AVRASM32.EXE’ the original assembler
      shipped with AVR Studio. We do not guarantee full compatibility for avra.

      AVRA comes with NO WARRANTY, to the extent permitted by law.
      You may redistribute copies of avra under the terms
      of the GNU General Public License.
      For more information about these matters, see the files named COPYING.

  3. “Burn the Code” should have a warning that if a programmer isn’t installed, your computer freezes over.
    I haven’t checked yet but it appears that “avrdude” is installed when the avra is installed. If avrdude is installed then, there should be a “time-out” for “programmer not installed” when avrdude is activated. Sorry this sounds negative. –I’ll keep trying. (I’m new to ubuntu)..

    • That’s interesting. It calls a system process which should not hang your computer doing this way. Hope you managed it.

      Regarding “avrdude” – your sugestion is right. Avrdude is not AVRA dependency. it’s a separete project of user choice (avrdude, avrp, avrprog, etc.). I just added it to the “install” section as I use it in an example later on. Hope it’s clear now. Thanks!

      /L

Leave a Comment