4
\$\begingroup\$

I am using the the Atmega328 (not the Atmega328P that is standard with Arduino) on a breadboard version of the Arduino. I am able to get the bootloader on the Atmega328 using these instructions. In summary, you add a new entry for the 328 to the avrdude.conf file and the boards.txt file.

Then, I am able to get my program on the chip by going to Tools>Board and setting it to Arduino Uno w/ ATmega328 (non-P) then burning the bootloader on the chip using the 328 config files with the AVR Pocket Programmer. Then I go to Tools>Board and switch it to Arduino Uno and upload the program using the normal USB connection.

Now, my question is about using the File>Upload Using Programmer functionality. When I do this for the the Atmega328p on a fresh chip everything works. However, when I try it for the Atmega328, with the IDE set to upload to Arduino Uno it throws the error:

avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.`

Is there another config file that has to be changed to enable the "Upload Using Programmer" functionality on other chips? If anyone has some tips on where to look it would be greatly appreciated!

Edit1:

I also tried setting the IDE to Arduino Uno w/ ATmega328 (non-P) and it throws this error:

unknown MCU 'atmega328' specified
Known MCU names:
 avr2
 at90s2313
 at90s2323
 at90s2333
 at90s2343
 attiny22
 attiny26
 at90s4414
 at90s4433
 at90s4434
 at90s8515
 at90c8534
 at90s8535
 avr25
 attiny13
 attiny13a
 attiny2313
 attiny24
 attiny44
 attiny84
 attiny25
 attiny45
 attiny85
 attiny261
 attiny461
 attiny861
 attiny43u
 attiny48
 attiny88
 at86rf401
 avr3
 at43usb320
 at43usb355
 at76c711
 avr31
 atmega103
 avr35
 at90usb82
 at90usb162
 attiny167
 avr4
 atmega8
 atmega48
 atmega48p
 atmega88
 atmega88p
 atmega8515
 atmega8535
 atmega8hva
 at90pwm1
 at90pwm2
 at90pwm2b
 at90pwm3
 at90pwm3b
 avr5
 atmega16
 atmega161
 atmega162
 atmega163
 atmega164p
 atmega165
 atmega165p
 atmega168
 atmega168p
 atmega169
 atmega169p
 atmega32
 atmega323
 atmega324p
 atmega325
 atmega325p
 atmega3250
 atmega3250p
 atmega328p
 atmega329
 atmega329p
 atmega3290
 atmega3290p
 atmega406
 atmega64
 atmega640
 atmega644
 atmega644p
 atmega645
 atmega6450
 atmega649
 atmega6490
 atmega16hva
 at90can32
 at90can64
 at90pwm216
 at90pwm316
 atmega32m1
 atmega32c1
 atmega32u4
 atmega32u6
 at90usb646
 at90usb647
 at94k
 avr51
 atmega128
 atmega1280
 atmega1281
 atmega1284p
 at90can128
 at90usb1286
 at90usb1287
 avr6
 atmega2560
 atmega2561
 avrxmega4
 atxmega64a3
 avrxmega5
 atxmega64a1
 avrxmega6
 atxmega128a3
 atxmega256a3
 atxmega256a3b
 avrxmega7
 atxmega128a1
 avr1
 at90s1200
 attiny11
 attiny12
 attiny15
 attiny28
Blink:-1: error: MCU 'atmega328' supported for assembler only

Edit2: Here is another person with the same problem but without an answer.

stevenvh
147k21 gold badges464 silver badges672 bronze badges
asked Aug 17, 2012 at 14:38
\$\endgroup\$
6
  • \$\begingroup\$ This error is from avr-gcc. You may be able to find a version which supports the 328; otherwise the differences are quite minor so you might be able to tell avr-gcc that you have a 328p, and either tell avrdude the truth, or use the -F flag so it doesn't fail when the signature mismatches. \$\endgroup\$ Commented Aug 17, 2012 at 22:10
  • \$\begingroup\$ Hi Chris thank you for your help! Is there a way for me to get the Arduino IDE to tell me what command it is running? Or to just get more info about what it is doing behind the curtain so that I might be able to reconfigure it? I have been able to get things working by using the command line with avrdude. To get this working I modified the avrdude.conf file then fed in the program outputted by the Arduino IDE. It worked! But it would be better if could get it working in the IDE... \$\endgroup\$ Commented Aug 18, 2012 at 2:04
  • \$\begingroup\$ To get it working, I did download a new version of avrdude and did not use the one that seems to be bundled with Arduino \$\endgroup\$ Commented Aug 18, 2012 at 2:05
  • \$\begingroup\$ Sorry, I rarely use the IDE \$\endgroup\$ Commented Aug 18, 2012 at 2:07
  • \$\begingroup\$ Do you mostly use avrdude in the command line? Do you happen to know the commands that the IDE is using? I tried the "verify button" + "shift key" to get verbose but it doesn't work for me. \$\endgroup\$ Commented Aug 18, 2012 at 2:11

2 Answers 2

1
\$\begingroup\$

You could possibly solve the problem by trying the following variant of your approach:

Edit avrdude.conf (located in \hardware\tools\avr\etc) by going to the Atmega328P entry and then replacing "0x1e 0x95 0x0F" with "0x1e 0x95 0x14".

In other words, REPLACE Atmega328P's expected signature with that of Atmega328 (i.e., NOT make a separate entry, but instead actually replace... so as to essentially attempt to trick the IDE).

Be sure to restart the Arduino IDE after saving the .conf file.

Now, continue with "Upload using programmer", with Atmega328P board (i.e., the original) selected.

If that fails, you may instead use an FTDI board/cable to upload, if circumstances allow.

answered Aug 24, 2012 at 16:19
\$\endgroup\$
0
\$\begingroup\$

I think I have arrived too late (like 10 years) but maybe this will be useful in the future. There is an interesting library for this job:

https://github.com/MCUdude/MiniCore

This library lets you many flashing options (different crystals, mcus, BDO, etc).

answered Jan 28, 2022 at 14:50
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.