AVRDUDE.CONF has moved?

I have installed the new Boards library for the A-Star 328PB. Following this I notice that I am using the Pololu AVRDUDE config file. Which of course, is fine for the 328PB.


However, when switching back to a non-328PB system, I do not get my old avrdude.conf file back.


Can anyone point to where this setting is set?

Regards, Martin

Hello, Martin.

The A-Star add-on for the Arduino IDE does not provide a file named avrdude.conf. We only provide a simple 6-line file called extra_avrdude.conf to make AVRDUDE recognize the ATmega328PB. The two files you mentioned are both provided by the Arduino IDE.

I think the difference between the two avrdude.conf files you found is that the one in /opt was installed as part of the Arduino IDE installation, and the one in packages was installed by the Boards Manager some time later. If you open the Boards Manager from the Tools > Board menu, you can see what version of the “Arduino AVR Boards” package you are using and install a different version if you want to. If it says “Built-In”, then it means the version of the package you are using was installed as part of the Arduino IDE installation and was not downloaded by the Boards Manager. It sounds like you were using the built-in version earlier, and now you have switched to using a different version. You can try switching to earlier versions until you figure out which version is the built-in one, or look for the Arduino AVR Boards version number in /opt/arduino-1.8.4/hardware/package_index_bundled.json.


Hi David,
Thank you for explaining this for me. I think I made the classic mistake of assuming that the last action was the cause of the observed symptoms! Not been able to work out what had happened, but I’ll not worry about it.

However, I though your extra-avrdude.conf was interesting. Can I use a similar technique to help prevent the nausea of having to fudge the chip signatures when I am using an UNO with a non-P chip on board?

How is the extra-avrdude.conf fitted into the “tree”? Does it just have to be in the Package folder?

Regards, Martin

In platform.txt, we define a tool called avrdudecustom which uses extra_avrdude.conf.

The other advantage of the custom tool definition is that we want to tell AVRDUDE we are programming an ATmega328PB even if the compiler was configured to compile for the ATmega328P. So instead of using build.mcu, the custom tool uses a new variable we made up called upload.mcu. Therefore, any board that we define in our boards.txt which uses the custom tool can specify separate MCUs for building and uploading.

For programming your ATmega328 (non-P) boards, if you haven’t tried it yet, you might want to try defining your own board by copying the official definition of the Arduino Uno and changing the build.mcu variable. You shouldn’t need the extra AVRDUDE configuration file because AVRDUDE should already know about the ATmega328. If you encounter code that doesn’t compile for the ATmega328 but does compile for the ATmega328P, you might benefit from the upload.mcu feature, since you could compile the code for the ATmega328P and then upload it to an ATmega328. On the other hand, it might be easier to just edit the code.


Hi David,

Dho… I’m getting seriously confused here! I thought that it was all working beautifully. Just select an A_Star board and the signature for my 329PB would validate within AVRDUDE. But no. Is “gone south” and is throwing errors again?
I have attached my Arduino program log. I think I can see (despite the very long lines) that I am starting off in the right direction:
Using board 'a-star328PB-16mhz' from platform in folder: /home/mprowe/.arduino15/packages/pololu-a-star/hardware/avr/3.1.0
But the AVRDUDE line does not have atmega328PB reference?
/home/mprowe/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/mprowe/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v2 -Pusb -Uflash:w:/tmp/arduino_build_238351/myMultiSerial.ino.hex:i

What have I done?

Regards, Martin

log.txt (8.9 KB)

From the information you posted, it looks like you have an AVRISP mkII programmer. Are you trying to use that programmer to upload sketches to your A-Star using the 2x3-pin ISP header, or are you trying to use the 1x6-pin serial interface and the bootloader?

The usual way to program an A-Star 328PB from the Arduino environment is to connect a serial adapter to its 1x6 serial header and upload programs via the bootloader. If that is what you are trying to do, make sure you are not holding the “Shift” key when you click “Upload”, or else the Arduino IDE will try to upload your sketch using a programmer.

If you want to program the A-Star using an ISP programmer instead of using the bootloader, we recommend using the Pololu USB AVR Programmer v2 for that purpose, but you should be able to get the AVRISP mkII working if you edit some configuration files, and I can help you figure that out if that is what you are trying to do.


Hi David,
Yes, I am using the AVRISP2 programmer on the ICSP (2*3pin) port. I have two reasons for this:

  1. This will be the only programming interface on the final(custom) PCB. Better to make my mistakes now, rather than then?
  2. I would like as much memory as I can get. So loose the bootloader.

The position I would like to get to is:
To be able to switch between programming the A-Star (328PB) and custom boards with either the 328 or 328P by just switching the “Board” in Tools menu. I am using this package for the raw ATMega chips.
At the moment I have to keep editing the avrdude.conf file to fudge the signature. Doable … but a pain!

Regards, Martin

To upload sketches to your A-Star 328PB using an AVRISP mkII programmer, you should add the following lines to the programmers.txt file that comes with the A-Star package. For you, the right file to edit would be /home/mprowe/.arduino15/packages/pololu-a-star/hardware/avr/3.1.0/programmers.txt.

avrispmkiifor328PB.name=AVRISP mkII for 328PB

Then restart the Arduino IDE, select the new “AVRISP mkII for 328PB” entry in the Programmers menu, select the right A-Star 328PB board, and upload your sketches using the “Upload using Programmer” command in the “Sketch” menu.

For programming your ATmega328 or ATmega328P boards, you might consider editing the boards.txt file that comes with the A-Star package. You would copy one of the A-Star 328PB boards entries in that file, change the name, and change any other important properties to be correct. If you configure this correctly, you won’t need to edit avrdude.conf.


Thank you David,

Of course, that worked a treat! So I think this topic is done.

But… It does raise even more questions.

Regards, Martin