|
1 | 1 | #include "optiLoader.h"
|
2 | 2 |
|
3 | 3 | const image_t PROGMEM image_328 = {
|
| 4 | + // Sketch name, only used for serial printing |
4 | 5 | {"optiboot_atmega328.hex"},
|
| 6 | + // Chip name, only used for serial printing |
5 | 7 | {"atmega328P"},
|
6 |
| - 0x950F, /* Signature bytes for 328P */ |
7 |
| - {0x3F, 0xFF, 0xDE, 0x05}, // pre program fuses (prot/lock, low, high, ext) |
8 |
| - {0x0F, 0x0, 0x0, 0x0}, // post program fuses |
9 |
| - {0x3F, 0xFF, 0xFF, 0x07}, // fuse mask |
10 |
| - 32768, // size of chip flash in bytes |
11 |
| - 128, // size in bytes of flash page |
| 8 | + // Signature bytes for 328P |
| 9 | + 0x950F, |
| 10 | + // Programming fuses, written before writing to flash. Fuses set to |
| 11 | + // zero are untouched. |
| 12 | + {0x3F, 0xFF, 0xDE, 0x05}, // {lock, low, high, extended} |
| 13 | + // Normal fuses, written after writing to flash (but before |
| 14 | + // verifying). Fuses set to zero are untouched. |
| 15 | + {0x0F, 0x0, 0x0, 0x0}, // {lock, low, high, extended} |
| 16 | + // Fuse verify mask. Any bits set to zero in these values are |
| 17 | + // ignored while verifying the fuses after writing them. All (and |
| 18 | + // only) bits that are unused for this atmega chip should be zero |
| 19 | + // here. |
| 20 | + {0x3F, 0xFF, 0xFF, 0x07}, // {lock, low, high, extended} |
| 21 | + // size of chip flash in bytes |
| 22 | + 32768, |
| 23 | + // size in bytes of flash page |
| 24 | + 128, |
| 25 | + // The actual image to flash. This can be copy-pasted as-is from a |
| 26 | + // .hex file. If you do, replace all lines below starting with a |
| 27 | + // colon, but make sure to keep the start and end markers {R"( and |
| 28 | + // )"} in place. |
12 | 29 | {R"(
|
13 | 30 | :107E0000112494B714BE892F8D7011F0892FDED004
|
14 | 31 | :107E100085E08093810082E08093C00088E18093B8
|
@@ -46,8 +63,9 @@ const image_t PROGMEM image_328 = {
|
46 | 63 |
|
47 | 64 |
|
48 | 65 | /*
|
49 |
| -* Table of defined images |
50 |
| -*/ |
| 66 | + * Table of defined images. The first one matching the chip's signature |
| 67 | + * is used. |
| 68 | + */ |
51 | 69 | const image_t *images[] = {
|
52 | 70 | &image_328,
|
53 | 71 | };
|
|
0 commit comments