1
0

README.TXT 4.0 KB

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