-
Download ATmega's support pack from Microchip's website
-
Unzip the relevant files
unzip -j Atmel.ATmega_DFP.x.y.zzz.atpack \ gcc/dev/atmega328pb/avr5/crtatmega328pb.o \ gcc/dev/atmega328pb/avr5/libatmega328pb.a \ include/avr/iom328pb.h
-
Place the
.o
and.a
files in/usr/avr/lib/avr5/
-
Place the
.h
file in/usr/avr/include/avr/
-
Add the following to
/usr/avr/include/avr/io.h
#elif defined (__AVR_ATmega328PB__) || defined (__AVR_ATmega328__) # include <avr/iom328pb.h>
All set. Ready to compile.
Add the following to /etc/avrdude.conf
, right below the definition for ATmega328P
.
part parent "m328"
id = "m328pb";
desc = "ATmega328PB";
signature = 0x1e 0x95 0x16;
ocdrev = 1;
;
Happy flashing!
Hi TM-Sanjay,
Yes it will work. Support for atmega324pb is included in the " Atmel ATmega Series Device Support (1.6.364)" Pack via the link to Microchip's website in the instructions above.
You'll have to modify the avrdude configuration that is given above. Change occurrences of 328 to 324 and insert the correct signature bytes. These can be found in the datasheet or, alternatively, just run it with the wrong ones and then avrdude will fail to connect and then tell you what it found instead. Then modify the config file a second time, substituting those bytes.
Good luck!