root / arduino-1.0 / hardware / arduino / bootloaders / optiboot / README.TXT @ 58d82c77
History | View | Annotate | Download (3.36 KB)
| 1 |
This directory contains the Optiboot small bootloader for AVR |
|---|---|
| 2 |
microcontrollers, somewhat modified specifically for the Arduino |
| 3 |
environment. |
| 4 |
|
| 5 |
Optiboot is more fully described here: http://code.google.com/p/optiboot/ |
| 6 |
and is the work of Peter Knight (aka Cathedrow), building on work of Jason P |
| 7 |
Kyle, Spiff, and Ladyada. Arduino-specific modification are by Bill |
| 8 |
Westfield (aka WestfW) |
| 9 |
|
| 10 |
Arduino-specific issues are tracked as part of the Arduino project |
| 11 |
at http://code.google.com/p/arduino |
| 12 |
|
| 13 |
|
| 14 |
------------------------------------------------------------ |
| 15 |
Building optiboot for Arduino. |
| 16 |
|
| 17 |
Production builds of optiboot for Arduino are done on a Mac in "unix mode" |
| 18 |
using CrossPack-AVR-20100115. CrossPack tracks WINAVR (for windows), which |
| 19 |
is just a package of avr-gcc and related utilities, so similar builds should |
| 20 |
work on Windows or Linux systems. |
| 21 |
|
| 22 |
One of the Arduino-specific changes is modifications to the makefile to |
| 23 |
allow building optiboot using only the tools installed as part of the |
| 24 |
Arduino environment, or the Arduino source development tree. All three |
| 25 |
build procedures should yield identical binaries (.hex files) (although |
| 26 |
this may change if compiler versions drift apart between CrossPack and |
| 27 |
the Arduino IDE.) |
| 28 |
|
| 29 |
|
| 30 |
Building Optiboot in the Arduino IDE Install. |
| 31 |
|
| 32 |
Work in the .../hardware/arduino/bootloaders/optiboot/ and use the |
| 33 |
"omake <targets>" command, which just generates a command that uses |
| 34 |
the arduino-included "make" utility with a command like: |
| 35 |
make OS=windows ENV=arduino <targets> |
| 36 |
or make OS=macosx ENV=arduino <targets> |
| 37 |
On windows, this assumes you're using the windows command shell. If |
| 38 |
you're using a cygwin or mingw shell, or have one of those in your |
| 39 |
path, the build will probably break due to slash vs backslash issues. |
| 40 |
On a Mac, if you have the developer tools installed, you can use the |
| 41 |
Apple-supplied version of make. |
| 42 |
The makefile uses relative paths ("../../../tools/" and such) to find
|
| 43 |
the programs it needs, so you need to work in the existing optiboot |
| 44 |
directory (or something created at the same "level") for it to work. |
| 45 |
|
| 46 |
|
| 47 |
Building Optiboot in the Arduino Source Development Install. |
| 48 |
|
| 49 |
In this case, there is no special shell script, and you're assumed to |
| 50 |
have "make" installed somewhere in your path. |
| 51 |
Build the Arduino source ("ant build") to unpack the tools into the
|
| 52 |
expected directory. |
| 53 |
Work in Arduino/hardware/arduino/bootloaders/optiboot and use |
| 54 |
make OS=windows ENV=arduinodev <targets> |
| 55 |
or make OS=macosx ENV=arduinodev <targets> |
| 56 |
|
| 57 |
|
| 58 |
Programming Chips Using the _isp Targets |
| 59 |
|
| 60 |
The CPU targets have corresponding ISP targets that will actuall |
| 61 |
program the bootloader into a chip. "atmega328_isp" for the atmega328, |
| 62 |
for example. These will set the fuses and lock bits as appropriate as |
| 63 |
well as uploading the bootloader code. |
| 64 |
|
| 65 |
The makefiles default to using a USB programmer, but you can use |
| 66 |
a serial programmer like ArduinoISP by changing the appropriate |
| 67 |
variables when you invoke make: |
| 68 |
|
| 69 |
make ISPTOOL=stk500v1 ISPPORT=/dev/tty.usbserial-A20e1eAN \ |
| 70 |
ISPSPEED=-b19200 atmega328_isp |
| 71 |
|
| 72 |
The "atmega8_isp" target does not currently work, because the mega8 |
| 73 |
doesn't have the "extended" fuse that the generic ISP target wants to |
| 74 |
pass on to avrdude. You'll need to run avrdude manually. |
| 75 |
|
| 76 |
|
| 77 |
Standard Targets |
| 78 |
|
| 79 |
I've reduced the pre-built and source-version-controlled targets |
| 80 |
(.hex and .lst files included in the git repository) to just the |
| 81 |
three basic 16MHz targets: atmega8, atmega16, atmega328. |