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

Compile example program

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

Burn the code

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

3. References

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

  1. AVRA project, after a long time sleeping, was revived and is now at its version 1.42 since 25/02/2019. It has got a number of MCU its is supporting now, such like ATmega1284p or ATmega2560. The best way on Linux is to get the source package on github and compile it wit GCC. The link is . It compiles easily on 64 bits as well as 32 bits. I did it and have absolutely no problems compiling to ATmega2560.
    There is also GAVRASM (CLI) and AVR_sim (simulator) both for Linux and Windows, which work fine in version 4.8/2.2, it is open source and written in Feepascal (and Lazarus for the simulator). Advantage: GAVRASM knows almost all the AVR units since their equates are compleely included in the executables after compile, so no need to search for the Atmel definition files (but you can also use the ones you have if you need to.
    Link is:

  2. Hi,
    I have a problem using AVRA for the atmega328p in an Arduino UNO
    When i want run the example blink the terminal said ”
    Avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor=…”
    Error 1 make flash
    I have lubuntu 20.04

    What can i do?

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

    • 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).

  4. 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..?

    • 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.

  5. “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!


Leave a Comment