this was how I did things on a slightly working dragon setup I had, more or less.
But when it didn't work and I get the dreaded "programmer is not responding" no matter when I push the reset button, it occurred to me that maybe the -e option flashed the chip and effectively destroyed the arduino. Or maybe it is programmed st this doesn't happen?
If anyone can tell me I'd appreciate it. I'd hate to fiddle more with a chip that I have stupidly broken.
Correct, the -e option to ARVDUDE tells it to bulk erase the chip before burning the program into the chip. This has the effect of removing the bootloader code from the chip. So the chip is not destroyed just lacks the bootloader code needed to work with the Arduino IDE.
So you have two choices, buy or build a hardware programmer and reload the bootloader from the Arduino IDE. Or you can purchase a new AVR processor chip from a vendor that loads the Arduino bootloader into the chip. Here is one source:
I may have been saved by a simultaneous other problem (with the baud
rate, which I had wrong). One the bad options were removed and the
baud rate set and the reset button pushed at the right time, I got a
successful upload message out of avrdude.
Does this mean I didn't manage to erase the bootloader code? Your comment above that I would probably have to buy or build a bootloader
suggests that since avrdude works now, the erase must not have taken. But I'm not certain of the best way to tell, short of trying -e again with the correct baud rate
Ha ha ha ha well I may not have gotten it before but I sure did
subsequently by using -U (which erases first). At least I don't have to
push the button to upload anymore.
I may not care though. I like the open hardware and schematics and
such, but have not intention of using the IDE or language parts. So
what is there in the firmware that I care about?
I would just like to get to the point where the chip is talking on the
UART so I can do prinf-evidence based debugging as usual. I'm not
sure what is in the shipping firmware that helps with this?
Is there anyone else using arduino in this way who has their own little library of C code set up st everything required is just uploaded
each time?
Is there anyone else using arduino in this way who has their own little library of C code set up st everything required is just uploaded each time?
Um, that's pretty much what I use arduino for. They have done a good job of trimming down the usual huge mass of libraries to a useful core... I won't necessarily use the IDE for editing, don't care much about the C++ extensions, and like the convenience of being able to plug the board directly into a USB port without messing with a programmer board/dongle/etc (my other programmer is a STK500, which can be pretty painful.)
Why are you so resistant to using the arduino libraries?
I'm not resistant to the C libraries, just C++ and wires stuff and IDE.
Once I found the C libraries in arduino-0017/hardware/cores/arduino
I was happy as a clam with the libraries.
But I first wasted some time fixing stuff from the code linked on this page: http://arduino.cc/en/Hacking/CommandLine
which seems to just have the same subdir from 0011, with maybe some
mac stuff. I'm going to go try creating an account and editing that page now...