Go Down

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


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));

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


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

Code: [Select]

works like a charm


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.


nothing but a guess, but isnt it possible to make aliases in make files?

Go Up