I've done my best searching for an answer to this question:
I am using avrdude for Mac using Crosspack.
I have added the atmega328 to my config file, and when I ask avrdude what micros it knows, the 328 appears at the top of the list.
avrdude -p? Valid parts are: m328 = ATMEGA328 [/usr/local/etc/avrdude.conf:10964] m6450 = ATMEGA6450 [/usr/local/etc/avrdude.conf:10774] m3250 = ATMEGA3250 [/usr/local/etc/avrdude.conf:10585] m645 = ATMEGA645 [/usr/local/etc/avrdude.conf:10396] ...
I am able to program to the chip. I know my hardware is good. The board works (mostly) when programmed by the original creator of the project, but I cannot change the code and compile. When I try, I get the "unknown MCU" message and the 328 doesn't appear among the known MCUs.
avr-gcc -g -Wall -O2 -mmcu=atmega328 -fno-exceptions -ffunction-sections -fdata-sections -I.././lunchbeat-pcb -c lunchbeat-pcb.c unknown MCU 'atmega328' specified Known MCU names: avr2 at90s2313 at90s2323 at90s2333 ...
Anybody have any suggestions for something to try?