README.TXT 3.4 KB

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