Adding support for the 328PB in avr-gcc toolchain

A project log for Atmega328PB Target

Based on my Atmega328P Target board, this one allows one to use the two new I/O pins (that are power and ground pins on the 328P)

mcu_nerdmcu_nerd 09/26/2020 at 13:490 Comments

For some reason avr-gcc toolchain builds still doesn't have the Atmega328PB, but it's easy to add. I followed the guide below with some minor deviations such as for the io.h entry I did this instead:

 #elif defined (__AVR_ATmega328PB__)
 #  include 

The version of avrdude I have already includes support for the 328PB, so I didn't need to make any changes there.  For Linux Mint, the avr directory is located under /lusr/lib.  Another thing to note is that after the changes are made, the 328PB is still not shown with avr-gcc --target-help but it does work.