Pages: [1]   Go Down
Author Topic: Need help burning Arduino bootloader using STK500  (Read 2029 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-sad

Thanks for reading.
« Last Edit: December 17, 2010, 02:19:20 pm by pannaguma » Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 111
... only learning ...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone know how to proceed?

Thanks
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)
Logged

Pages: [1]   Go Up
Jump to: