Pages: [1]   Go Down
Author Topic: turn bootloader off  (Read 1749 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
blablablabla
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i´ve a RX/TX connection between two arduino boards. the TX unit is always sending serial data.
sometimes the receiver goes standby (cause its hooked up to usb). so if its up again it receives
the serial data immidiately and overwrites the programme inside because the bootloader is
started. is there a possibility to burn via arduino without burning the bootloader on the chip (i´m aware
that this will only function one time!)

thanks
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll need an external programmer like an AVR-ISP, STK500 or a homemade parallel port programmer:
http://www.arduino.cc/en/Main/ParallelProgrammer

With those, you'll overwrite the bootloader with your program, allowing you to use the full 8 KB of program space (flash) on the ATmega8 (as well as avoiding the problem you're having).  You'll be able to write to the chip as many times as you want.  I don't think there's a way to overwrite the bootloader without an external programmer, as the bootloader segment is locked to avoid accidental overwrites.

In theory, you can use an Arduino board as an AVR-ISP to program another Arduino board, but we haven't quite gotten it working yet.  If you have a Wiring board, you can use that as an AVR-ISP.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
blablablabla
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi!

i do have a stk500. but can i use the compiled arduino-code?! and where is the hex-file stored?
i dont want to rewrite the arduino code in C, cause time is running ;-)

thanks
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is your AVR-ISP an older one or a MKII?  If an older one, you can upload your sketch straight from the Arduino IDE.  You just need to make three changes to the Arduino preferences.txt. Make sure to edit this file when the Arduino IDE is not running. First, change: serial.download_rate=19200 to serial.download_rate=115200. Then, change upload.erase and upload.verify from false to true. Afterwards, you'll need to change back those lines in preferences.txt.

If it's an AVRISPvII (or MKII or whatever it's called), you'll need to upload from the command line with avrdude or avrstudio (or a similar program).  If you press upload in the Arduino IDE, the .hex file will appear in the "applet" sub-directory of the sketch folder (which you can find by selecting "Show Sketch Folder" from the "Sketch" menu).  You should be able to use the .hex file unchanged.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I wrote these instructions up in a bit more detail at: http://www.arduino.cc/en/Main/Programmer
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
blablablabla
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

YEAH!! thank you so much! it worked out right from the first try!

now i can use my stk500 with arduino even without bootloader! Great!
i changed the baud rate in arduino IDE also to 115200! maybe you should
also write this in wiki!

thanks!
Logged

Pages: [1]   Go Up
Jump to: