diff --git a/Readme b/Readme index d3c0a9e..9f89ef0 100644 --- a/Readme +++ b/Readme @@ -7,7 +7,7 @@ Optiloader is a sketch designed for bulk upgrading of Arduino board bootloaders using another Arduino as a device programmer. It stores multiple copies of the optiboot bootloader in program flash memory. When run (ie by hitting reset), it probes the target device, figures out the type -of CPU (ATmega8, ATmega168, ATmega328, ATmega328P) and initiates upload of +of CPU (ATmega8, ATmega168, ATmega168p, ATmega328, ATmega328P) and initiates upload of the bootloader and appropriate fuse programming. Since optiLoader runs entirely with the Arduino and there is no communications with a host PC required, this can procede very rapidly, and is not subject to interference diff --git a/optiLoader.h b/optiLoader.h index 6ec46be..088058f 100644 --- a/optiLoader.h +++ b/optiLoader.h @@ -22,4 +22,4 @@ typedef struct alias { #define FUSE_EXT 3 /* Extended fuse */ // Forward decl -extern image_t PROGMEM image_328, image_328p, image_168, image_8; +extern image_t PROGMEM image_328, image_328p, image_168, image_168p, image_8; \ No newline at end of file diff --git a/optiLoader.pde b/optiLoader.pde index d374952..0c2a684 100644 --- a/optiLoader.pde +++ b/optiLoader.pde @@ -115,7 +115,7 @@ void read_image(image_t *ip); * Table of defined images */ image_t *images[] = { - &image_328, &image_328p, &image_168, &image_8, 0 + &image_328, &image_328p, &image_168,&image_168p, &image_8, 0 }; int pmode=0; @@ -821,7 +821,61 @@ image_t PROGMEM image_168 = { ":00000001FF\n" } }; - + +image_t PROGMEM image_168p = { + { + "optiboot_atmega168p.hex" } + , + { + "atmega168p" } + , + 0x940B, /* Signature bytes for 168p */ + { + 0x3F, 0xC6, 0xDD, 0x04 } + , + { + 0x2F, 0,0,0,0 } + , + 128, + { + ":103E0000112484B714BE81FFF0D085E08093810037\n" +":103E100082E08093C00088E18093C10086E08093B7\n" +":103E2000C20080E18093C4008EE0C9D0259A86E06C\n" +":103E300020E33CEF91E0309385002093840096BB13\n" +":103E4000B09BFECF1D9AA8958150A9F7CC24DD2404\n" +":103E500088248394B5E0AB2EA1E19A2EF3E0BF2E27\n" +":103E6000A2D0813461F49FD0082FAFD0023811F076\n" +":103E7000013811F484E001C083E08DD089C0823420\n" +":103E800011F484E103C0853419F485E0A6D080C024\n" +":103E9000853579F488D0E82EFF2485D0082F10E0EE\n" +":103EA000102F00270E291F29000F111F8ED0680127\n" +":103EB0006FC0863521F484E090D080E0DECF843678\n" +":103EC00009F040C070D06FD0082F6DD080E0C816C8\n" +":103ED00088E3D80618F4F601B7BEE895C0E0D1E053\n" +":103EE00062D089930C17E1F7F0E0CF16F8E3DF0614\n" +":103EF00018F0F601B7BEE89568D007B600FCFDCF14\n" +":103F0000A601A0E0B1E02C9130E011968C911197C0\n" +":103F100090E0982F8827822B932B1296FA010C01A0\n" +":103F200087BEE89511244E5F5F4FF1E0A038BF07D0\n" +":103F300051F7F601A7BEE89507B600FCFDCF97BE86\n" +":103F4000E89526C08437B1F42ED02DD0F82E2BD092\n" +":103F50003CD0F601EF2C8F010F5F1F4F84911BD0D7\n" +":103F6000EA94F801C1F70894C11CD11CFA94CF0C53\n" +":103F7000D11C0EC0853739F428D08EE10CD084E9ED\n" +":103F80000AD08BE07ACF813511F488E018D01DD0AB\n" +":103F900080E101D065CF982F8091C00085FFFCCFD4\n" +":103FA0009093C60008958091C00087FFFCCF809158\n" +":103FB000C00084FD01C0A8958091C6000895E0E688\n" +":103FC000F0E098E1908380830895EDDF803219F06E\n" +":103FD00088E0F5DFFFCF84E1DECF1F93182FE3DF0A\n" +":103FE0001150E9F7F2DF1F91089580E0E8DFEE2736\n" +":043FF000FF2709940A\n" +":023FFE000404B9\n" +":0400000300003E00BB\n" +":00000001FF\n" + } +}; + image_t PROGMEM image_8 = { { "optiboot_atmega8.hex" } @@ -873,5 +927,3 @@ image_t PROGMEM image_8 = { ":00000001FF\n" } }; - -