AVR development environment, configured using Vagrant. Includes:
- avr-gcc
- avrdude
Configured to use the USBTiny ISP. Update the Vagrantfile to support different ISPs.
- Install VirtualBox with the extension pack (required for USB).
- Create a directory
avr_development
at the same level as theavr_toolchain
project. This is a shared directory for any code files. vagrant up
vagrant ssh
- Verify communication with USBtiny
- Unplug/plug USBtiny
avrdude -c usbtiny -p m328p
- Verify output is
avrdude: initialization failed, rc=-1
, which indicates communication with programmer.
Compile to hex:
// Compile
avr-gcc -g -Os -mmcu=atmega328p -c myfile.c
// Link
avr-gcc -g -mmcu=atmega328p -o myfile.elf myfile.o
// Load File
avr-objcopy -j .text -j .data -O ihex myfile.elf myfile.hex
avrdude -p m328p -c usbtiny -F -U flash:w:myfile.hex:i