Device PCB was designed using KiCAD 5.1. For more info visit KiCAD website kicad.org
sudo apt-get install gcc-avr binutils-avr avr-libc gdb-avr avrdudeNote:
ATMega328PBis new revision from 2017. avr-libc may not have support for this device. To add support please see how its done in .devcontainer/Dockerfile.
cd firmware
makeFlashing the device using AVR Dragon ISP:
make programSet fuses this is done only once:
make program-fusesNote:
makewill internally runavrdudewith correct atributes.
Bare avrdude flashing command:
avrdude -p atmega328pb -P usb -c dragon_isp -U flash:w:luncheonmeat.hex -U eeprom:w:luncheonmeat.eepGenerating defines.h file:
cd firmware/bootloader
./preprocessor.sh atmega328pb 2048 PORTB PINB0 8000000 19200
make
make program
make program-fusesReading target fuses:
avrdude -p atmega328pb -P usb -c dragon_isp -U efuse:r:-:hTo enter bootloader hold ''5'' button and reset the device.