| 1 | # The kuttyPy firmware |
| 2 | |
| 3 | This is based on the optiboot bootloader, and has added functions for Registry R/W . |
| 4 | The bootloader's programming functions are retained, and in addition, the kuttyPy |
| 5 | while in bootloader mode can toggle register values. |
| 6 | |
| 7 |  |
| 8 | |
| 9 | |
| 10 | ## Compiling and uploading for Atmega32 boards |
| 11 | |
| 12 | get the [firmware files here](https://github.com/csparkresearch/KuttyPy-GUI/) , and navigate to the firmware directory. |
| 13 | |
| 14 | ### dependencies |
| 15 | + `gcc-avr` compiler |
| 16 | + `avrdude` for uploading |
| 17 | |
| 18 | ### Make |
| 19 | |
| 20 | The following command will output optiboot_atmega32.hex |
| 21 | |
| 22 | ```commandline |
| 23 | make atmega32 |
| 24 | ``` |
| 25 | |
| 26 | ### Flash this bootloader |
| 27 | |
| 28 | Connect a USBASP parallel programmer, and flash the bootloader firmware |
| 29 | |
| 30 | ```commandline |
| 31 | avrdude -B10 -c usbasp -patmega32 -U flash:w:optiboot_atmega32.hex |
| 32 | ``` |
| 33 | |
| 34 | ### set fuse to 0xDA |
| 35 | |
| 36 | ```commandline |
| 37 | avrdude -B10 -c usbasp -patmega32 -U lfuse:w:0xff:m -U hfuse:w:0xda:m |
| 38 | ``` |
| 39 | |
| 40 | ### Upload a hex file to test. |
| 41 | |
| 42 | ```commandline |
| 43 | avrdude -b 38400 -P /dev/ttyUSB0 -pm32 -c arduino -U flash:w:blink.hex |
| 44 | ``` |
| 45 | |
| 46 | ### Test the GUI (if it's installed) |
| 47 | |
| 48 | ```commandline |
| 49 | kuttypyplus |
| 50 | ``` |
| 51 | |
| 52 | ## For Arduino Uno and Nano boards |
| 53 | |
| 54 | make |
| 55 | ```commandline |
| 56 | make atmega328 |
| 57 | ``` |
| 58 | |
| 59 | upload : some Arduino Nano boards may work with -patmega328pb instead of -patmega328p. |
| 60 | ```commandline |
| 61 | avrdude -B10 -c usbasp -patmega328p -U lfuse:w:0xff:m -U hfuse:w:0xda:m |
| 62 | ``` |