1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# The kuttyPy firmware
This is based on the optiboot bootloader, and has added functions for Registry R/W .
The bootloader's programming functions are retained, and in addition, the kuttyPy
while in bootloader mode can toggle register values.

## Compiling and uploading for Atmega32 boards
get the [firmware files here](https://github.com/csparkresearch/KuttyPy-GUI/) , and navigate to the firmware directory.
### dependencies
+ `gcc-avr` compiler
+ `avrdude` for uploading
### Make
The following command will output optiboot_atmega32.hex
```commandline
make atmega32
```
### Flash this bootloader
Connect a USBASP parallel programmer, and flash the bootloader firmware
```commandline
avrdude -B10 -c usbasp -patmega32 -U flash:w:optiboot_atmega32.hex
```
### set fuse to 0xDA
```commandline
avrdude -B10 -c usbasp -patmega32 -U lfuse:w:0xff:m -U hfuse:w:0xda:m
```
### Upload a hex file to test.
```commandline
avrdude -b 38400 -P /dev/ttyUSB0 -pm32 -c arduino -U flash:w:blink.hex
```
### Test the GUI (if it's installed)
```commandline
kuttypyplus
```
## For Arduino Uno and Nano boards
make
```commandline
make atmega328
```
upload : some Arduino Nano boards may work with -patmega328pb instead of -patmega328p.
```commandline
avrdude -B10 -c usbasp -patmega328p -U lfuse:w:0xff:m -U hfuse:w:0xda:m
```
|