avrdude: AVR Part "m328p" not found.

Hello,
i’ve just got my Duemilanove today together with “Getting Started with Arduino”.

I’m on Ubuntu Jaunty 9.04 with a 2.6.30 custom kernel. I installed the IDE through stephane brunner’s ppa on launchpad (sorry cannot post link on my first post) - that is arduino-0016

I correctly selected board and port in the IDE, however, when i try uploading the Blink example (compiling went fine) i get this:
Binary sketch size: 896 bytes (of a 30720 byte maximum)

avrdude: AVR Part “m328p” not found.

Valid parts are:
m6450 = ATMEGA6450 [hardware/tools/avrdude.conf:12304]
m3250 = ATMEGA3250 [hardware/tools/avrdude.conf:12115]
m645 = ATMEGA645 [hardware/tools/avrdude.conf:11926]
m325 = ATMEGA325 [hardware/tools/avrdude.conf:11737]
usb1287 = AT90USB1287 [hardware/tools/avrdude.conf:11549]
usb1286 = AT90USB1286 [hardware/tools/avrdude.conf:11360]
usb647 = AT90USB647 [hardware/tools/avrdude.conf:11171]
usb646 = AT90USB646 [hardware/tools/avrdude.conf:10981]
t84 = ATtiny84 [hardware/tools/avrdude.conf:10798]
t44 = ATtiny44 [hardware/tools/avrdude.conf:10616]
t24 = ATtiny24 [hardware/tools/avrdude.conf:10434]
m2561 = ATMEGA2561 [hardware/tools/avrdude.conf:10241]
m2560 = ATMEGA2560 [hardware/tools/avrdude.conf:10048]
m1281 = ATMEGA1281 [hardware/tools/avrdude.conf:9860]
m1280 = ATMEGA1280 [hardware/tools/avrdude.conf:9671]
m640 = ATMEGA640 [hardware/tools/avrdude.conf:9483]
t85 = ATtiny85 [hardware/tools/avrdude.conf:9302]
t45 = ATtiny45 [hardware/tools/avrdude.conf:9123]
t25 = ATtiny25 [hardware/tools/avrdude.conf:8943]
pwm3b = AT90PWM3B [hardware/tools/avrdude.conf:8762]
pwm2b = AT90PWM2B [hardware/tools/avrdude.conf:8579]
pwm3 = AT90PWM3 [hardware/tools/avrdude.conf:8396]
pwm2 = AT90PWM2 [hardware/tools/avrdude.conf:8212]
t2313 = ATtiny2313 [hardware/tools/avrdude.conf:8025]
m168 = ATMEGA168 [hardware/tools/avrdude.conf:7837]
m88 = ATMEGA88 [hardware/tools/avrdude.conf:7651]
m48 = ATMEGA48 [hardware/tools/avrdude.conf:7464]
t861 = ATTINY861 [hardware/tools/avrdude.conf:7276]
t461 = ATTINY461 [hardware/tools/avrdude.conf:7087]
t261 = ATTINY261 [hardware/tools/avrdude.conf:6898]
t26 = ATTINY26 [hardware/tools/avrdude.conf:6741]
m8535 = ATMEGA8535 [hardware/tools/avrdude.conf:6583]
m8515 = ATMEGA8515 [hardware/tools/avrdude.conf:6425]
m8 = ATMEGA8 [hardware/tools/avrdude.conf:6265]
m161 = ATMEGA161 [hardware/tools/avrdude.conf:6125]
m32 = ATMEGA32 [hardware/tools/avrdude.conf:5950]
m6490 = ATMEGA6490 [hardware/tools/avrdude.conf:5757]
m649 = ATMEGA649 [hardware/tools/avrdude.conf:5572]
m3290p = ATMEGA3290P [hardware/tools/avrdude.conf:5389]
m3290 = ATMEGA3290 [hardware/tools/avrdude.conf:5204]
m329p = ATMEGA329P [hardware/tools/avrdude.conf:5019]
m329 = ATMEGA329 [hardware/tools/avrdude.conf:4835]
m169 = ATMEGA169 [hardware/tools/avrdude.conf:4655]
m163 = ATMEGA163 [hardware/tools/avrdude.conf:4512]
m162 = ATMEGA162 [hardware/tools/avrdude.conf:4316]
m644p = ATMEGA644P [hardware/tools/avrdude.conf:4126]
m644 = ATMEGA644 [hardware/tools/avrdude.conf:3936]
m324p = ATMEGA324P [hardware/tools/avrdude.conf:3745]
m164p = ATMEGA164P [hardware/tools/avrdude.conf:3554]
m16 = ATMEGA16 [hardware/tools/avrdude.conf:3376]
c32 = AT90CAN32 [hardware/tools/avrdude.conf:3185]
c64 = AT90CAN64 [hardware/tools/avrdude.conf:2995]
c128 = AT90CAN128 [hardware/tools/avrdude.conf:2805]
m128 = ATMEGA128 [hardware/tools/avrdude.conf:2627]
m64 = ATMEGA64 [hardware/tools/avrdude.conf:2446]
m103 = ATMEGA103 [hardware/tools/avrdude.conf:2306]
8535 = AT90S8535 [hardware/tools/avrdude.conf:2185]
8515 = AT90S8515 [hardware/tools/avrdude.conf:2071]
4434 = AT90S4434 [hardware/tools/avrdude.conf:1988]
4433 = AT90S4433 [hardware/tools/avrdude.conf:1864]
2343 = AT90S2343 [hardware/tools/avrdude.conf:1740]
2333 = AT90S2333 [hardware/tools/avrdude.conf:1655]
2313 = AT90S2313 [hardware/tools/avrdude.conf:1542]
4414 = AT90S4414 [hardware/tools/avrdude.conf:1429]
1200 = AT90S1200 [hardware/tools/avrdude.conf:1314]
t15 = ATtiny15 [hardware/tools/avrdude.conf:1181]
t13 = ATtiny13 [hardware/tools/avrdude.conf:1008]
t12 = ATtiny12 [hardware/tools/avrdude.conf:875]
t11 = ATtiny11 [hardware/tools/avrdude.conf:811]

any ideas? In Synaptic i see i have avrdude 5.5-7; i’ll try installing 5.8 which seems the latest (any .deb of this somewhere?) and report back here if it’s working.

Renato

having trouble compiling avrdude 5.8. I'll ask for help on their mailing list

I have AVRDUDE 5.6 and the m328p is definitely on the list.

I have AVRDUDE 5.6 and the m328p is definitely on the list.

yep, found out that m328p is supported since version 5.6

managed to compile avrdude 5.8 (problem was i didn’t have ‘flex’ installed).

Now, when trying to upload the Blink example, I get this other error:

java.io.IOException: Cannot run program “hardware/tools/avrdude”: java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at processing.app.Uploader.executeUploadCommand(Uploader.java:123)
at processing.app.AvrdudeUploader.avrdude(AvrdudeUploader.java:170)
at processing.app.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:76)
at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:48)
at processing.app.Sketch.upload(Sketch.java:1632)
at processing.app.Sketch.exportApplet(Sketch.java:1701)
at processing.app.Editor$42.run(Editor.java:2016)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
… 17 more

java.io.IOException: Cannot run program "hardware/tools/avrdude": java.io.IOException: error=2, No such file or directory

The IDE expects AVRDUDE to be in the hardware/tools subdirectory. Just put a link to AVRDUDE in that directory, for example:

ln -s /usr/bin/avrdude /usr/local/arduino/hardware/tools

Substitute actual directories, of course.

yeah, thanks! had to relink avrdude.conf too finally it's working ;D

1) Hello, all (this is my first post)

2) I was going to post about a problem, but I happened upon this thread, and found enough clues to do some furhter investigating... and I may have a (partial, at least) solution to the problem I very nearly started to pose to this forum:

I discovered, remoting into my desktop system at home (running Fedora Core 8), that the arduino package installs a copy of avrdude in the arduino/hardware/tools/ directory, along with the avrdude.conf file.

There is also a /usr/bin/avrdude executable (on the path [!!!!], and installed by me from the Fedora repositories as I was following the walk-through guide on the arduino.cc site for my linux distro); its associated avrdude.conf file, in /etc/avrdude/ does [u]not[/u] contain "m328p" !!

[root@mitra avrdude]# grep "m328p" /home/brian/arduino-0016/hardware/tools/avrdude.conf
    id              = "m328p";
[root@mitra avrdude]# grep "m328p" /etc/avrdude/avrdude.conf
[root@mitra avrdude]#

I will test out whether correcting this will solve the issues I was seeing on my newly installed system when I get home from work this evening. I suppose I [u]could[/u] try it now... but I don't really want to do X-forwarding over an ssh tunnel into the little pipe we have here.. ;)

note to self: welcome to the forum, and I hope this fixes your problem. ;)

:( sadly, no. it could not be so simple.

although, I do get a different error message, now (well, from a different place).

basically, it boils down to erroring out trying to build the various modules every time I start up the IDE (and also if I test compile some simple program). ...and, the "m328p" not defined message is always playing a part in it. :(

I found that (by eliminating the libraries, one at a time) that I can eliminate the error on IDE startup by simply eliminating all of the libraries. ...hardly a workable solution.

as a guess, I would venture that the avr-gcc and avr-gcc-c++ and avrdude components in the Fedora 8 repositories are not up to date. if that's the case, then the "Fedora 8" section of the installation walkthrough needs some work... because following what is there definitely does not work. :(

the "Fedora 8" section of the installation walkthrough needs some work... because following what is there definitely does not work.

if you manage to solve your problem, you can edit it. I just updated the Ubuntu section, as anyone else with Jaunty and Duemilanove will have my same problem

heh. yeah, okay.

[u]Fedora 8 users[/u]

  1. Upgrade your Fedora installation to Fedora 9 or later

  2. Follow the installation instructions for that release...

::)

…but, of course, even that (as draconian as it may sound) isn’t really enough!

Yes… I did upgrade my system from Fedora 8 to Fedora 9, and it did solve a lot of the issues – but I was still not able to properly compile (let alone send to my Arduino!) any code. Even the latest/greatest available in the Fedora repositories is not late/great enough.

I ended up downloading the sources for avr-libc, avr-binutils, and avrdude, and compiling and installing them. I will update the wiki accordingly, if I have the time, tomorrow…

[Yes, in retrospect, I could have simply downloaded the source tarballs and done the build without upgrading to Fedora 9, but I was about due for an upgrade, anyway! …and my system seems to run a bit faster on F9 than it did under F8!]

:sunglasses: