jawher / xavr

An AVR C project template for XCode
MIT License
68 stars 18 forks source link

avrdude says AVR Part not found. #3

Open Hipska opened 10 years ago

Hipska commented 10 years ago

When creating new Xcode project, I can select "atmega88a" from MCU list, but avrdude complains: avrdude: AVR Part "atmega88a" not found. and gives a list with valid parts, where I see the following MCU's:

...
  m8       = ATmega8
  m8515    = ATmega8515
  m8535    = ATmega8535
  m88      = ATmega88
  m88p     = ATmega88P
  m8u2     = ATmega8U2
...

So it seems that the drop down list is not compatible with avrdude supported items.

avrdude: Version 6.0.1, compiled on Mar 23 2014 at 11:59:27
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/Cellar/avrdude/6.0.1/etc/avrdude.conf"
         User configuration file is "/Users/Hipska/.avrduderc"

Maybe something to take care of.

Hipska commented 10 years ago

BTW, I could program my ATmega88a perfectly when I added part definition in my .avrduderc file.

jawher commented 10 years ago

As you may have noticed already, xavr passes the GCC MCU as is to avrdude, which works 99.99% of the time.

Do you have any ideas on how to handle such cases ? The only thing I can think of is to hard code a mapping for the cases where it doesn't work in the makefile.

Hipska commented 10 years ago

In any case, the command avrdude -p ? gives a list of known parts for AVRdude.

There are some options what could be done.

  1. Shrink the Microcontroller MCU list to match all items in the list to be avr-gcc and avrdude compatible.
  2. Same as above + Generate a second AVR template without avrdude/programming support.
  3. Leave the list as is, but make a visible note to the user that the selected MCU is currently not supported by avrdude. Maybe add something like "(not programmable)" to the list item.
  4. Leave the list as is, but remove 'program' target from 'all' target of makefile, when an unsupported MCU is selected.

Do you like any of these options?

jawher commented 10 years ago

I looked into this issue and it appears to be a more general issue: according to my tests, there are 123 parts supported by gcc but not by avrdude (atmega649p, attiny2313a, atmega169p, etc.).

I could detect those during the template generation but:

Which leaves up with your suggestion number 2, which is doable.

Hipska commented 10 years ago

I made a test with the TemplateInfo.plist file and it works if you replace <key>at43usb320</key> with for example <key>at43usb320 # not programmable</key>. Building works, programming not. This leaves option 3 open.

I could not find any documentation on how this plist should be formatted.

Also, while searching for template documentation, I figured out that you can have 1 parent project template and have for example 1 template generated for every mcu as child of the master template with own settings (and a note if it is programmable by avrdude)

martin-badin commented 3 years ago

Hi. This problem still persist. Any solution for this one?