I have to qualify my expertise by saying I'm a new Mac user. I am successfully programming OpenEVSE within the Arduino IDE which runs the avrdude command. Here is a copy and paste from the log when the Arduino environment runs avrdude successfully programming my kit.
avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbasp -Pusb -Uflash:w:/var/folders/l8/3xv3gg314szdq1zq0qhwgp200000gn/T/build4057303063183718273.tmp/open_evse.cpp.hex:i
I hope that helps a bit.
-Craig K.
Thanks - I don't have the same setup with an Arduino IDE on my Mac, but maybe I'll try some of those parameters/arguments you are using.
it seems like my installation of AVRDude is old and just doesn't include the m328p profile. But I'm having a heck of a time finding the updated version for a Mac.
I'm not sure it this will help or not. You can install the Arduino IDE for free. It includes Avrdude. I just poked around my Mac and found the path is
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin
Keep in mind I'm new to Mac, but I'm an old-school-UNIX-fart so I feel comfortable poking around with the Mac Terminal tool.
I imagine you could install Arduino. Then open from the Launchpad the Terminal tool. Then cd /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin Then you can run avrdude from there from the command line. You can type ./avrdude -help when you get to that directory. To run avrdude from the command line when you are in that directory you can put ./ in front of it since that directory is not in your command path. ./ says "look right here" instead of looking elsewhere in the command path.
I'm sorry my advice is not totally turn-key simple. I'm new to Mac but liking it a lot so far.
Let me know if I can offer more advice,
Craig K.
Are you still having problems with avrdude on mac? I use Mac for all my openEVSE development, have tried different ID platforms and use avrdude without any problems. If you are still having problems, I will investigate it further and help solving it with you
regards,
Ragnar
When I am done the device still shows as being on 3.1 firmware....what am I missing.
$ ./avrdude -c USBasp -C /Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -P usb -p atmega328p -u flash:/Users/username/Downloads/open_evse.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/username/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/username/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : USBasp
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude done. Thank you.
Yes.
I looked at your bat file and adapted the commands I missed.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -c USBasp -p m328p -V -U lfuse:w:0xFF:m -U hfuse:w:0xDF:m -U efuse:w:0x05:m
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -c USBasp -p m328p -V -B0.5 -U flash:w:/Users/username/Downloads/open_evse.hex
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -c USBasp -p m328p -V -U eeprom:w:/Users/username/Downloads/eeprom_24.bin
Now it says it is 4.8.0.
OpenEVSE Support
>>>I received a question from a Mac User, Does anyone know the answer to John's Question?
I have a Mac, so I can't follow the Windows instructions exactly, though I tried to use the commands in the flash.bat file:
avrdude -c USBasp -p m328p -U flash:w:open_evse-390.hex
I got this error below. Is there another part number that I can use?
Thanks,
John
avrdude: AVR Part "m328p" not found.
Valid parts are:
m6450 = ATMEGA6450 [/usr/local/etc/avrdude.conf:10774]
m3250 = ATMEGA3250 [/usr/local/etc/avrdude.conf:10585]
m645 = ATMEGA645 [/usr/local/etc/avrdude.conf:10396]
m325 = ATMEGA325 [/usr/local/etc/avrdude.conf:10207]
usb1287 = AT90USB1287 [/usr/local/etc/avrdude.conf:10019]
usb1286 = AT90USB1286 [/usr/local/etc/avrdude.conf:9830]
usb647 = AT90USB647 [/usr/local/etc/avrdude.conf:9641]
usb646 = AT90USB646 [/usr/local/etc/avrdude.conf:9451]
t84 = ATtiny84 [/usr/local/etc/avrdude.conf:9268]
t44 = ATtiny44 [/usr/local/etc/avrdude.conf:9086]
t24 = ATtiny24 [/usr/local/etc/avrdude.conf:8904]
m2561 = ATMEGA2561 [/usr/local/etc/avrdude.conf:8711]
m2560 = ATMEGA2560 [/usr/local/etc/avrdude.conf:8518]
m1281 = ATMEGA1281 [/usr/local/etc/avrdude.conf:8330]
m1280 = ATMEGA1280 [/usr/local/etc/avrdude.conf:8141]
m640 = ATMEGA640 [/usr/local/etc/avrdude.conf:7953]
t85 = ATtiny85 [/usr/local/etc/avrdude.conf:7772]
t45 = ATtiny45 [/usr/local/etc/avrdude.conf:7593]
t25 = ATtiny25 [/usr/local/etc/avrdude.conf:7413]
pwm3 = AT90PWM3 [/usr/local/etc/avrdude.conf:7231]
pwm2 = AT90PWM2 [/usr/local/etc/avrdude.conf:7047]
t2313 = ATtiny2313 [/usr/local/etc/avrdude.conf:6860]
m168 = ATMEGA168 [/usr/local/etc/avrdude.conf:6672]
m88 = ATMEGA88 [/usr/local/etc/avrdude.conf:6486]
m48 = ATMEGA48 [/usr/local/etc/avrdude.conf:6299]
t861 = ATTINY861 [/usr/local/etc/avrdude.conf:6111]
t461 = ATTINY461 [/usr/local/etc/avrdude.conf:5922]
t261 = ATTINY261 [/usr/local/etc/avrdude.conf:5733]
t26 = ATTINY26 [/usr/local/etc/avrdude.conf:5576]
m8535 = ATMEGA8535 [/usr/local/etc/avrdude.conf:5418]
m8515 = ATMEGA8515 [/usr/local/etc/avrdude.conf:5260]
m8 = ATMEGA8 [/usr/local/etc/avrdude.conf:5100]
m161 = ATMEGA161 [/usr/local/etc/avrdude.conf:4960]
m32 = ATMEGA32 [/usr/local/etc/avrdude.conf:4785]
m6490 = ATMEGA6490 [/usr/local/etc/avrdude.conf:4592]
m649 = ATMEGA649 [/usr/local/etc/avrdude.conf:4407]
m3290 = ATMEGA3290 [/usr/local/etc/avrdude.conf:4224]
m329 = ATMEGA329 [/usr/local/etc/avrdude.conf:4039]
m169 = ATMEGA169 [/usr/local/etc/avrdude.conf:3859]
m163 = ATMEGA163 [/usr/local/etc/avrdude.conf:3716]
m162 = ATMEGA162 [/usr/local/etc/avrdude.conf:3520]
m644 = ATMEGA644 [/usr/local/etc/avrdude.conf:3330]
m324 = ATMEGA324 [/usr/local/etc/avrdude.conf:3138]
m164 = ATMEGA164 [/usr/local/etc/avrdude.conf:2946]
m16 = ATMEGA16 [/usr/local/etc/avrdude.conf:2768]
c128 = AT90CAN128 [/usr/local/etc/avrdude.conf:2577]
m128 = ATMEGA128 [/usr/local/etc/avrdude.conf:2399]
m64 = ATMEGA64 [/usr/local/etc/avrdude.conf:2218]
m103 = ATMEGA103 [/usr/local/etc/avrdude.conf:2078]
8535 = AT90S8535 [/usr/local/etc/avrdude.conf:1957]
8515 = AT90S8515 [/usr/local/etc/avrdude.conf:1843]
4434 = AT90S4434 [/usr/local/etc/avrdude.conf:1760]
4433 = AT90S4433 [/usr/local/etc/avrdude.conf:1636]
2343 = AT90S2343 [/usr/local/etc/avrdude.conf:1512]
2333 = AT90S2333 [/usr/local/etc/avrdude.conf:1427]
2313 = AT90S2313 [/usr/local/etc/avrdude.conf:1314]
4414 = AT90S4414 [/usr/local/etc/avrdude.conf:1201]
1200 = AT90S1200 [/usr/local/etc/avrdude.conf:1086]
t15 = ATtiny15 [/usr/local/etc/avrdude.conf:953]
t13 = ATtiny13 [/usr/local/etc/avrdude.conf:780]
t12 = ATtiny12 [/usr/local/etc/avrdude.conf:647]
t11 = ATtiny11 [/usr/local/etc/avrdude.conf:583]