Go Down

Topic: hack that gets the AVR device, only works for mega (Read 487 times) previous topic - next topic

SuperCow

In the fileAvrdudeUploader.java,
the function: "public boolean avrdude(Collection params) throws RunnerException {"
Code: [Select]

// XXX: quick hack to chop the "atmega" off of "atmega8" and "atmega168",
   // then shove an "m" at the beginning.  won't work for attiny's, etc.
   commandDownloader.add("-pm" +
     Preferences.get("boards." + Preferences.get("board") + ".build.mcu").substring(6));
   commandDownloader.addAll(params);


This code only works for a atmega series
But if your using a other AVR, in my case at90can128
I get this error: avrdude: AVR Part "mn128" not found.

I have changed the "avrdude.conf" file the mcu id from c128 to mn128, and that works but its a very dirty hack.

Is it possible in a new release to make it support all AVR's?
Like adding in the file "boards.txt" a mcu id?
something like this:
Code: [Select]
commandDownloader.add("-p" +
     Preferences.get("boards." + Preferences.get("board") + ".build.mcuid"));

Or even nicer would be to get it out the "avrdude.conf" file

SuperCow

I have recompiled the arduino with the ID in the boards.txt file

Code: [Select]
at90can128.build.mcuid=c128

works like a charm

mellis

Issue created: http://code.google.com/p/arduino/issues/detail?id=130

Does anyone know if avr-gcc and avrdude can use the same names for the processors?  For example, right now, we're passing atmega328p to avr-gcc and m328p to avrdude.

Nachtwind

nothing but a guess, but isnt it possible to make aliases in make files?
Believe me, Mike, I calculated the odds of this succeeding against the odds I was doing something incredibly stupid[ch8230] and I went ahead

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy