Go Down

Topic: Need help burning Arduino bootloader using STK500 (Read 2875 times) previous topic - next topic


Dec 17, 2010, 08:11 pm Last Edit: Dec 17, 2010, 08:19 pm by pannaguma Reason: 1
Hi guys,

I am into microcontrollers since 5 months or so, and well to be frank Arduino has spoilt me a bit. Because, although I am already into my third microcontroller based project, and I still dont know much about bootloader burning: lock bits, fuses, etc.

I have half a dozen Atmega328s lying around without a bootloader. I also have a STK500 with me which I have hardly touched, and was searching for ways to burn the Arduino bootloader onto the 328s, using the STK500 but could find anything, other than unanswered queries similar to mine.

(I did try the Arduino as an ISP with internal clock method, twice, but it didnt seem to work:http://arduino.cc/en/Tutorial/ArduinoToBreadboard)

Also one thing I found was this:http://www.design.ucla.edu/senselab/node/390
But unfortunately an important link on that page is dead, making it more or less useless.

Please help me out, since my hands are getting tied relying on a single bootloaded 328. Also out of fear of bricking 328s, I have not tried the hands-on approach, and instead was waiting to find a step-by-step tutorial...but haven't found any. :(

Thanks for reading.

Coding Badly

Work up to the bootloader.  Start with just the STK500 and a '328.  Ensure the hardware is working correctly by reading the fuses using AVRDUDE from the command-line.


I "un-bricked" a m168 using a STK-500 and bare avrdude.  As I recall, it was pretty straightforward; I used one of the on-board sockets on the stk, configured as per the stk manual (except that my manual pre-dated the 168, but pretty much all the 28pin chips are similar.)  My biggest problem was finding an rs232 serial adapter that ran at the 115200 speed that the stk-500 expects.



Where are you having troubles?

Configure the STK-500 for atmega328.  You'll need a power supply for it as well, I think.
Arrange for a 115200bps serial connection between your computer and the STK-500 (this was the hard part for me; the USB/Serial converter I had didn't support 115200!)
Open a command-line processor.
Connect to the optiboot directory (...hardware/arduino/bootloaders/optiboot/ )  (better yet: get updated sources with mercurial)
Edit the Makefile:
 correct "ISPPORT" (which will be dependent on how your STK500 is connected.)
¬†correct location of "avrdude" (or modify your path) in the ISPFUSES and ISPFLASH definitions.  (there's a version in the arduino distribution (...hardware/tools/avr/bin/avrdude))
Do "make atmega328_isp"
(If you don't have "make" and friends, it'll be harder.  A good start is to put the avr bin path from arduino in your path.  Probably.)
(In theory you can bypass "make" and issue avrdude commands on your own, or use avr studio to program the .hex file.  but those would involve a somewhat more complicated set of commands.)

Go Up