Pages: [1]   Go Down
Author Topic: Loading Optiboot onto stock AtMega328  (Read 1288 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I essentially built my own Arduino Uno.  It has an AtMega8U2 which I was easily able to load the USB to serial firmware onto and it works great.

The main processor is an AtMega328 (not the 328p).  The difference between the 328 and 328p I believe is only the power usage and the device ID on the chip.

Using Atmel Studio I was able to read the AtMega328 chip ID, voltage, erase the chip, and read/write to fuses and lock bits.  I set the fuses on the chip to what I wanted and left the lock bits open.  Afterwards I was still able to see and erase the chip just fine.  However, no matter what I tried Optiboot would not load onto the chip.  I'd get errors saying it couldn't write the program, couldn't enter programming mode, etc.

I decided to try AVRDude on another computer (without Jungo drivers installed).  Unfortunately AVRDude only supports the 328p, but since they're basically the same chip I forced programming of Optiboot.  It wrote to the chip, but upon verification said there was a mismatch.  Now, going back to Atmel Studio, I can read the voltage and device ID but as soon as I try anything else (chip erase, read fuses, read lock bits), it throws an error and locks up.  I can no longer read the device ID until I do a reset to the chip.

Any idea what's happened here?  How can I recover from whatever AVRDude did to the chip and how can I successfully install Optiboot using Atmel Studio?

I believe the command I wrote to AVRDude was:

Code:
avrdude -p m328p -c avrispmkii -P usb -e -U flash:w:optiboot.hex -F

I'm using an AVRISP MkII programmer with external power supplied to the board.

Thanks for any help!
« Last Edit: September 29, 2013, 05:36:11 pm by monkey123 » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18810
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does this help?

http://www.gammon.com.au/forum/?id=11637

Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


That looks incredibly helpful!  Haven't read through it yet so I don't know if it's covered, but any advice how to get my 328 chip erased and working again to start fresh with the tutorial?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ran the Atmega chip detector on my AtMega328 (not 328p) and got this:

Code:
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 3D 02
Unrecogized signature.
LFuse = FF
HFuse = FF
EFuse = FF
Lock byte = FF
Clock calibration = 00

First 256 bytes of program memory:

0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
20: FF FF FF FF FF FF FF F8 F0 00 60 70 E0 C0 F8 F0
30: F7 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
60: FF 07 70 70 C2 C0 F0 F0 00 01 6D 7E FF FF FF FF
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
90: FF FF FF FF FF FF FF FF FF FF FF FF EF F8 F0 F0
A0: 40 40 78 78 DC DF FF FF FF FF FF FF FF FF FF FF
B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
D0: FF FF FF FF FF C0 F4 F8 00 C0 E0 60 C0 E0 F9 F1
E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Reset chip and board, reran and got this.  Seems to be different often.

Code:
Atmega chip detector.
Entered programming mode OK.
Signature = FF FF FF
Unrecogized signature.
LFuse = FF
HFuse = FF
EFuse = 40
Lock byte = 48
Clock calibration = FF

First 256 bytes of program memory:

0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0
20: 7D 40 70 70 C0 C4 F1 FB 6F FF FF FF FF FF FF FF
30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
50: FF FF FF FF FF FF FF FF F0 F0 F1 E9 F4 E1 F0 F8
60: 6C EE 7F FF FF FF FF FF FF FF FF FF FF FF FF FF
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
90: FF FF 70 79 71 C0 F0 F8 E0 E2 F9 E4 FF FF FF FF
A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
C0: FF FF FF FF FF FF FF FF FF FF FF FF FF F8 E1 FC
D0: 40 44 70 70 C4 F5 FF FF FF FF FF FF FF FF FF FF
E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
« Last Edit: September 30, 2013, 03:42:44 am by monkey123 » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And one last update...I added support for the AtMega328 to the device sketch.  Ran the sketch like 15 times, resetting the chip each time and finally got this:

Code:
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 14
Processor = ATmega328
Flash memory size = 32768
LFuse = FF
HFuse = FF
EFuse = FF
Lock byte = FF
Clock calibration = 0B
Bootloader in use: No
EEPROM preserved through erase: Yes
Watchdog timer always on: No
Bootloader is 2048 bytes starting at 7800

Bootloader:

7800: FF FF FF FF FF C7 FB FF 8F 43 F0 E0 F2 F9 FD FF
7810: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7820: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7830: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC
7840: 11 50 74 72 EB DD FF FF FF FF FF FF FF FF FF FF
7850: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7860: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7870: FF FF FF FF FF F0 F3 EF 9E 73 78 60 86 DB FD FE
7880: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7890: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
78A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8 EF
78B0: 33 40 7D 72 8F 9F FF FF FF FF FF FF FF FF FF FF
78C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
78D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
78E0: FF FF FF FF FF 8F F7 FF 2F 44 70 60 E6 DB FF FE
78F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7900: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7910: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FB EC
7920: 11 4A 70 77 C9 FF FF FF FF FF FF FF FF FF FF FF
7930: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7940: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7950: FF FF FF FF FF F8 F7 FF F6 C1 E9 E9 E3 F9 FC FF
7960: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7970: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7980: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F3 FF
7990: 39 48 60 63 DB CF FE FF FF FF FF FF FF FF FF FF
79A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
79B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
79C0: FF FF FF FF FF F8 FF FE 77 50 65 72 C2 FD FF FF
79D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
79E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
79F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F7 EC
7A00: 49 40 78 63 D9 EF FE FF FF FF FF FF FF FF FF FF
7A10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7A20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7A30: FF FF FF FF FF C7 F7 FE FF DA E0 F2 C1 AD FF FF
7A40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7A50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7A60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F2 FF
7A70: C4 44 62 63 CC EF FE FD FF FF FF FF FF FF FF FF
7A80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7A90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7AA0: FF FF FF FF FF F8 FF FF 72 0A 60 76 C9 FC FF FF
7AB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7AC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7AD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC E5
7AE0: 48 48 72 63 DD EF FF FF FF FF FF FF FF FF FF FF
7AF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B10: FF FF FF FF FF CB F7 FE F7 C8 E0 F6 C9 FC F7 FD
7B20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC EF
7B50: 62 40 79 71 FB FF FF FF FF FF FF FF FF FF FF FF
7B60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B80: FF FF FF FF FE FC F7 FF 7B C8 E4 72 E9 FC FF FF
7B90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7BA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7BB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF E3 EF
7BC0: 40 46 71 71 CC FF FF FF FF FF FF FF FF FF FF FF
7BD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7BE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7BF0: FF FF FF FF FE BC F7 FF 7B C1 65 72 C9 FE F7 FF
7C00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF E1 EF
7C30: 4C C6 F3 E1 CC FF FF FD FF FF FF FF FF FF FF FF
7C40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C60: FF FF FF FF FE E3 F7 FF 3B 4C 65 71 C9 CE F3 FF
7C70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F1 EF
7CA0: 44 46 79 71 CE FF FF FF FF FF FF FF FF FF FF FF
7CB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7CC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7CD0: FF FF FF FF FE E9 F7 FF 3F 40 65 73 CC FE FF FD
7CE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7CF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7D00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC FF
7D10: 66 42 71 64 CE BF FF FF FF FF FF FF FF FF FF FF
7D20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7D30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7D40: FF FF FF FF E6 FB F7 FF DD CE E1 F1 EC F6 FB FE
7D50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7D60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7D70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF CE EF
7D80: 26 42 71 74 CF FF FF FF FF FF FF FF FF FF FF FF
7D90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7DA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7DB0: FF FF FF FF CE C3 F3 FF BF E6 F0 E9 EC FF FB FE
7DC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7DD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7DE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F1 F7
7DF0: 32 42 79 72 C7 BB FF FF FF FF FF FF FF FF FF FF
7E00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E20: FF FF FF FF CE 0E F3 FF 0D 46 70 64 E4 F7 FB FE
7E30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF EB EF
7E60: 32 62 79 76 CF FF FF FF FF FF FF FF FF FF FF FF
7E70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E90: FF FF FF FF CC 0F F3 FF EC E7 F0 C9 E4 FB FF FE
7EA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7EB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7EC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF CF FF
7ED0: 32 52 71 72 E7 BF FF FF FF FF FF FF FF FF FF FF
7EE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7EF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F00: FF FF FF FF C7 8F F3 FF 8D E6 F2 E3 E6 FB FF FD
7F10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF CF EF
7F40: 32 53 79 76 E7 FF FF FF FF FF FF FF FF FF FF FF
7F50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F70: FF FF FF FF C7 8F F3 EF FD F7 F0 EB C6 DB FF FE
7F80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7FA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8 FF
7FB0: 33 48 FB 76 CF BF FF FF FF FF FF FF FF FF FF FF
7FC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7FD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7FE0: FF FF FF FF E3 8F FB FF 9E 22 72 79 E6 DB FF FE
7FF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

MD5 sum of bootloader = 22 86 AC 2D 5A C1 A0 0C DE 4B C7 78 86 74 6F 17

First 256 bytes of program memory:

0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10: FF FF FF FD C7 CF FB FD E6 E1 E1 D4 F7 FA FD FF
20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF CF
50: 77 64 73 78 A4 D3 FD FB FF FF FF FF FF FF FF FF
60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
80: FF FF FF FF FF FF FF FF CF 81 FB F4 FB E5 F8 F6
90: 73 7F 7F FF FF FF FF FF FF FF FF FF FF FF FF FF
A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
C0: FF DF C7 7E ED D7 F9 FC 43 04 7B 6E FF FF FF FF
D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
F0: FF FF FF FF FF FF FF FF FF FF FF FF FF BC FE FB

However, it is not a repeatable result and back to jibberish.  I have an XTAL installed, proper caps for everything, etc.  Again, I used to be able to read the device and erase it before using AVRDude...
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18810
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I ran the Atmega chip detector on my AtMega328 (not 328p) and got this:

Code:
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 3D 02
Unrecogized signature.

The signature for the Atmega328 is 1E 95 14, so there is something wrong.

Quote
... but any advice how to get my 328 chip erased and working again to start fresh with the tutorial?

The sketch erases the program memory.

You might have to show your circuit and maybe a photo. I suspect something electrical.
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The thing I can't figure out is that I was reading the device signature, erasing the chip and reading and programming the fuses over and over again all day, but couldn't get the bootloader on there.  Then I forced it with AVRDude and now I can't seem to do anything with it anymore.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18810
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Forced it, huh? You still need to show your circuit. Obviously it's unstable.
Logged


Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1726
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you connected a crystal to the chip?

I had this problem in the past when I inadvertently selected Crystal as the clock source (the circuit at the time should have been using the internal oscillation). Without the crystal it is not possible to program if crystal is selected as the clock source.
Logged

~Tom~

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Forced it, huh? You still need to show your circuit. Obviously it's unstable.

This exact circuit: http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

Minus the pin headers and USB power circuitry.  I power the board externally.

I don't get what could have caused it to "die" after the AVRDude update.  Beforehand I could read and erase it over and over again.
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1793
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
no matter what I tried Optiboot would not load onto the chip.  I'd get errors saying it couldn't write the program, couldn't enter programming mode, etc.

I suspect that you have a noise problem ... Noise can cause such strange behavior on homebrew and breadboard designs.  Noise can come from wireruns, testleads, AC fluorescent lightning, LED lightning, non-lab power supplies, or even your PC.

Now, you may be able to recover the 328, you may find that you accidentally set the lock fuse, or you may have things so messed up that you need a HV-programmer.  Or, just plot down $2 for a new chip.

You have done so much to the poor uC that it borders on chip-abuse  smiley-mr-green
There is simply too many things that can go wrong when one purposefully force an override of built-in safeguards.

Ray
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Update:

I've discovered that I can do 1 "action" to the chip in Atmel Studio before needing to reset it.  For example, I read the lock bits and all were stock and not set.  Reset the power to the chip.  Read the fuses.  Reset the chip.  Set the fuses to stock.  Reset the chip.  Read the chip again.

If I try to do two "actions" the second says unable to enter programming mode, or wrong device ID.  I am still unable to erase the chip - unable to enter programming mode.

I would be inclined to also say it's a noise issue, but the thing I can't get over is that I USED to be able to always read the device, set fuses, etc.  Just having trouble with the bootloader.  Now it seems crippled though.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Another update:

I've concluded that AVRDude *DID* mess up the chip somehow, possibly setting an incorrect fuse such as reset disable.  Initially I could read/erase the chip several times in Atmel Studio, but after the AVRDude fiasco it would no longer work.

I tried a new AtMega328 chip and was able to immediately load up optiboot without a problem.
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1793
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@monkey123:

AVRDUDE can surely "mess up an AVR" but that is the power of the runline and the reason that Arduino elected to hide this little workhorse from the average user.

Whenever I flash a chip, I ALWAYS set the fuses first and make any singular changes at the end.  I have a CMD template that sets the proper tools environment in the path, mucks around with the fuses, flashes, and then wraps up and provides a full logfile for me in Notepad.  You do not need anything so complex, but I would strongly suggest you create a script to do the work for you and make certain the script is applying the correct fuse settings.  Give the scripts nice long, descriptive names.  Using the command line does not mean that you have to type every time.

Ray
Logged

Pages: [1]   Go Up
Jump to: