avr-gcc and avrdude
1. AVR-GCC: The Compiler for AVR Microcontrollers
avr-gcc is a compiler based on the GNU Compiler Collection (GCC) tailored for AVR microcontrollers, such as those made by Microchip. It translates C code into machine code specific to the AVR architecture, enabling the programming of microcontrollers like the ATmega328P and ATtiny series.
2. Setting Up avr-gcc
-
To begin programming with
avr-gcc, ensure the following software is installed:
2.2 Adding avr-gcc and avrdude for compiling and uploading to your PATH
- Add either of the following to your
~/.bashrcfile
-
If you are on a university PC then:
-
If you are on a on your own windows PC then:
export PATH=$PATH:"/c/users/yourusername/AppData/Local/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin" export PATH=$PATH:"/c/users/yourusername/AppData/Local/Arduino15/packages/arduino/tools/avrdude/8.0.0-arduino1/bin"