Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include "Particle.h"
#include "system_update.h"
SerialDebugOutput debugOutput(9600, ALL_LEVEL);
void flashTinker(); // forward declaration
bool uploaded = false;
void setup() {
Serial.begin(9600);
}
void loop() {
if (!uploaded) {
uploaded = true;
delay(5000);
flashTinker();
}
}
void flashTinker() {
// photon_tinker.bin
const uint8_t tinker[] = {
0x00, 0x00, 0x0a, 0x08, 0x6c, 0x0f, 0x0a, 0x08, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x05, 0x01, 0x04, 0x02, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0xdc, 0x0c, 0x0a, 0x08, 0x70, 0xb5, 0x07, 0x4b, 0x07, 0x4d, 0x00, 0x24, 0xed, 0x1a, 0xad, 0x08, 0x1e, 0x46,
0xac, 0x42, 0x04, 0xd0, 0x56, 0xf8, 0x24, 0x20, 0x90, 0x47, 0x01, 0x34, 0xf8, 0xe7, 0x70, 0xbd, 0x00, 0xbf, 0xc4, 0x0e, 0x0a,
0x08, 0xdc, 0x0e, 0x0a, 0x08, 0x09, 0x48, 0x0a, 0x49, 0x08, 0xb5, 0x88, 0x42, 0x05, 0xd0, 0x09, 0x4a, 0x82, 0x42, 0x02, 0xd0,
0x12, 0x1a, 0x00, 0xf0, 0x6f, 0xfd, 0x07, 0x48, 0x07, 0x4a, 0x00, 0x21, 0x12, 0x1a, 0x00, 0xf0, 0x72, 0xfd, 0x06, 0x48, 0x08,
0xbd, 0x00, 0xbf, 0x00, 0x02, 0x00, 0x20, 0xe0, 0x0e, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x68, 0x02, 0x00, 0x20, 0x34, 0x03,
0x00, 0x20, 0x34, 0x03, 0x00, 0x20, 0x00, 0xf0, 0x44, 0xb9, 0x00, 0xf0, 0x6a, 0xb9, 0x00, 0xf0, 0x9c, 0xb9, 0x08, 0xb5, 0x0c,
0x20, 0x00, 0x21, 0x00, 0xf0, 0x7f, 0xf9, 0xfe, 0xe7, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47, 0x00, 0xbf, 0x60, 0x0d, 0x0a, 0x08,
0x10, 0xb5, 0x03, 0x4b, 0x04, 0x46, 0x03, 0x60, 0xff, 0xf7, 0xec, 0xff, 0x20, 0x46, 0x10, 0xbd, 0x60, 0x0d, 0x0a, 0x08, 0xf0,
0xb5, 0x01, 0x21, 0x85, 0xb0, 0x05, 0x46, 0x00, 0xf0, 0xe8, 0xfb, 0xa0, 0xf1, 0x30, 0x06, 0x07, 0x2e, 0x04, 0x46, 0x25, 0xd8,
0x16, 0x49, 0x68, 0x46, 0x00, 0xf0, 0x7f, 0xfb, 0x28, 0x46, 0x69, 0x46, 0x00, 0xf0, 0xc9, 0xfb, 0x07, 0x46, 0x68, 0x46, 0x00,
0xf0, 0x35, 0xfb, 0x0f, 0xb1, 0xb4, 0xb2, 0x0e, 0xe0, 0x0f, 0x49, 0x68, 0x46, 0x00, 0xf0, 0x70, 0xfb, 0x28, 0x46, 0x69, 0x46,
0x00, 0xf0, 0xba, 0xfb, 0x05, 0x46, 0x68, 0x46, 0x00, 0xf0, 0x26, 0xfb, 0x65, 0xb1, 0x26, 0x3c, 0xa4, 0xb2, 0x20, 0x46, 0x03,
0x21, 0x00, 0xf0, 0x87, 0xf9, 0x20, 0x46, 0x00, 0xf0, 0xaf, 0xf9, 0x04, 0xe0, 0x4f, 0xf0, 0xff, 0x30, 0x01, 0xe0, 0x6f, 0xf0,
0x01, 0x00, 0x05, 0xb0, 0xf0, 0xbd, 0xf0, 0x0c, 0x0a, 0x08, 0xf2, 0x0c, 0x0a, 0x08, 0xf0, 0xb5, 0x01, 0x21, 0x85, 0xb0, 0x04,
0x46, 0x00, 0xf0, 0xac, 0xfb, 0xa0, 0xf1, 0x30, 0x06, 0x07, 0x2e, 0x45, 0xd8, 0x68, 0x46, 0x21, 0x46, 0x03, 0x22, 0x07, 0x23,
0x00, 0xf0, 0xa4, 0xfb, 0x68, 0x46, 0x24, 0x49, 0x00, 0xf0, 0x62, 0xfb, 0x05, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xf8, 0xfa, 0x7d,
0xb9, 0x68, 0x46, 0x21, 0x46, 0x03, 0x22, 0x06, 0x23, 0x00, 0xf0, 0x95, 0xfb, 0x68, 0x46, 0x1d, 0x49, 0x00, 0xf0, 0x53, 0xfb,
0x07, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xe9, 0xfa, 0x0f, 0xb9, 0x29, 0xe0, 0x01, 0x25, 0x19, 0x49, 0x68, 0x46, 0x00, 0xf0, 0x24,
0xfb, 0x20, 0x46, 0x69, 0x46, 0x00, 0xf0, 0x6e, 0xfb, 0x07, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xda, 0xfa, 0x6f, 0xb9, 0x14, 0x49,
0x68, 0x46, 0x00, 0xf0, 0x17, 0xfb, 0x20, 0x46, 0x69, 0x46, 0x00, 0xf0, 0x61, 0xfb, 0x04, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xcd,
0xfa, 0x8c, 0xb1, 0x0a, 0x36, 0xb6, 0xb2, 0x30, 0x46, 0x01, 0x21, 0x00, 0xf0, 0x2e, 0xf9, 0x30, 0x46, 0x29, 0x46, 0x00, 0xf0,
0x3b, 0xf9, 0x01, 0x20, 0x07, 0xe0, 0x4f, 0xf0, 0xff, 0x30, 0x04, 0xe0, 0x6f, 0xf0, 0x01, 0x00, 0x01, 0xe0, 0x6f, 0xf0, 0x02,
0x00, 0x05, 0xb0, 0xf0, 0xbd, 0xf4, 0x0c, 0x0a, 0x08, 0xf9, 0x0c, 0x0a, 0x08, 0xf0, 0x0c, 0x0a, 0x08, 0xf2, 0x0c, 0x0a, 0x08,
0x7f, 0xb5, 0x01, 0x21, 0x05, 0x46, 0x00, 0xf0, 0x4b, 0xfb, 0xa0, 0xf1, 0x30, 0x03, 0x07, 0x2b, 0x04, 0x46, 0x1f, 0xd8, 0x14,
0x49, 0x68, 0x46, 0x00, 0xf0, 0xe2,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42, 0xfa, 0x74, 0xb1, 0x26, 0x3d, 0xad, 0xb2, 0x01, 0x21, 0x28, 0x46, 0x00, 0xf0, 0xa3, 0xf8, 0x68,
0x46, 0x00, 0xf0, 0x09, 0xfb, 0x81, 0xb2, 0x28, 0x46, 0x00, 0xf0, 0xf2, 0xf8, 0x01, 0x24, 0x01, 0xe0, 0x6f, 0xf0, 0x01, 0x04,
0x68, 0x46, 0x00, 0xf0, 0x2d, 0xfa, 0x01, 0xe0, 0x4f, 0xf0, 0xff, 0x34, 0x20, 0x46, 0x09, 0xb0, 0xf0, 0xbd, 0x00, 0xbf, 0xf0,
0x0c, 0x0a, 0x08, 0xf2, 0x0c, 0x0a, 0x08, 0x08, 0xb5, 0x0b, 0x48, 0x0b, 0x49, 0x00, 0x22, 0x00, 0xf0, 0x4e, 0xf8, 0x0a, 0x48,
0x0b, 0x49, 0x00, 0x22, 0x00, 0xf0, 0x49, 0xf8, 0x0a, 0x48, 0x0a, 0x49, 0x00, 0x22, 0x00, 0xf0, 0x44, 0xf8, 0xbd, 0xe8, 0x08,
0x40, 0x08, 0x48, 0x09, 0x49, 0x00, 0x22, 0x00, 0xf0, 0x3d, 0xb8, 0x00, 0xbf, 0xfd, 0x0c, 0x0a, 0x08, 0xbd, 0x00, 0x0a, 0x08,
0x09, 0x0d, 0x0a, 0x08, 0x35, 0x01, 0x0a, 0x08, 0x16, 0x0d, 0x0a, 0x08, 0xf9, 0x01, 0x0a, 0x08, 0x21, 0x0d, 0x0a, 0x08, 0x69,
0x02, 0x0a, 0x08, 0x70, 0x47, 0x00, 0x00, 0x13, 0xb5, 0x09, 0x4c, 0x00, 0x21, 0x0b, 0x46, 0x00, 0x91, 0x0a, 0x46, 0x20, 0x46,
0x00, 0xf0, 0x53, 0xf9, 0x20, 0x46, 0x05, 0x49, 0x06, 0x4a, 0x00, 0xf0, 0xc2, 0xfb, 0x01, 0x20, 0x02, 0xb0, 0xbd, 0xe8, 0x10,
0x40, 0x00, 0xf0, 0x0e, 0xb8, 0x6c, 0x02, 0x00, 0x20, 0x9d, 0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x08, 0xb5, 0x02, 0x4b,
0x1b, 0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xa8, 0x01, 0x02, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01,
0x93, 0x08, 0xbd, 0xa4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xcc, 0x01,
0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xa0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02,
0x4b, 0x1b, 0x68, 0x9b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xa0, 0x01, 0x06, 0x08, 0x10, 0xb5, 0x04, 0x46, 0x00, 0xf0, 0x98, 0xf9,
0x28, 0xb1, 0xa4, 0xf1, 0x0d, 0x03, 0x02, 0x2b, 0x01, 0xd8, 0x00, 0x20, 0x10, 0xbd, 0x00, 0xf0, 0xdb, 0xf8, 0x08, 0xb1, 0x01,
0x2c, 0xf8, 0xd9, 0x05, 0x48, 0x00, 0xf0, 0xad, 0xfa, 0x28, 0xb1, 0x12, 0x3c, 0x01, 0x2c, 0x94, 0xbf, 0x00, 0x20, 0x01, 0x20,
0x10, 0xbd, 0x01, 0x20, 0x10, 0xbd, 0x9c, 0x02, 0x00, 0x20, 0x14, 0x28, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0x0a, 0xd8, 0xff,
0x29, 0x08, 0xd0, 0xff, 0xf7, 0xd9, 0xff, 0x28, 0xb1, 0x20, 0x46, 0x29, 0x46, 0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0, 0xb8, 0xba,
0x38, 0xbd, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0x00, 0xf0, 0xba, 0xfa, 0xff, 0x28, 0x11, 0xd0, 0x80, 0xb1, 0x82, 0x1e, 0xd2,
0xb2, 0x01, 0x2a, 0x0c, 0xd9, 0x06, 0x28, 0x00, 0xd1, 0x38, 0xbd, 0x20, 0x46, 0xff, 0xf7, 0xbf, 0xff, 0x28, 0xb1, 0x20, 0x46,
0x29, 0x46, 0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0, 0xae, 0xba, 0x38, 0xbd, 0x10, 0xb5, 0x04, 0x46, 0x00, 0xf0, 0xa1, 0xfa, 0x04,
0x38, 0xc0, 0xb2, 0x01, 0x28, 0x08, 0xd9, 0x20, 0x46, 0xff, 0xf7, 0xac, 0xff, 0x20, 0xb1, 0x20, 0x46, 0xbd, 0xe8, 0x10, 0x40,
0x00, 0xf0, 0xa4, 0xba, 0x00, 0x20, 0x10, 0xbd, 0x09, 0x28, 0x10, 0xb5, 0x04, 0x46, 0x9c, 0xbf, 0x00, 0xf1, 0x0a, 0x04, 0xa4,
0xb2, 0x20, 0x46, 0xff, 0xf7, 0x9a, 0xff, 0x50, 0xb1, 0x20, 0x46, 0x03, 0x21, 0x00, 0xf0, 0x73, 0xfa, 0x03, 0x28, 0x04, 0xd1,
0x20, 0x46, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0x9c, 0xba, 0x00, 0x20, 0x10, 0xbd, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0xff,
0xf7, 0x87, 0xff, 0xe8, 0xb1, 0x20, 0x46, 0x04, 0x21, 0x00, 0xf0, 0x60, 0xfa, 0x04, 0x28, 0x20, 0x46, 0x04, 0xd1, 0x29, 0x46,
0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0, 0x80, 0xba, 0x02, 0x21, 0x00, 0xf0, 0x55, 0xfa, 0x02, 0x28, 0x0c, 0xd1, 0x20, 0x46, 0x00,
0xf0, 0x60, 0xfa, 0x01, 0x28, 0x01, 0xd0, 0x04, 0x28, 0x05, 0xd1, 0x20, 0x46, 0xe9, 0xb2, 0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0,
0x7e, 0xba, 0x38, 0xbd, 0x00, 0x00, 0x13, 0xb5, 0x08, 0x4c, 0x00, 0x21, 0x00, 0x91, 0x0a, 0x46, 0x0b, 0x46, 0x20, 0x46, 0x00,
0xf0, 0x77, 0xf8, 0x05, 0x49, 0x05, 0x4a, 0x20, 0x46, 0x02, 0xb0, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0xe3, 0xba, 0x00, 0xbf,
0x74, 0x02, 0x00, 0x20, 0x9d, 0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0xf8, 0xb5, 0x05, 0x46, 0x16, 0x46, 0x0c, 0x46, 0x8f,
0x18, 0xbc, 0x42, 0x06, 0xd0, 0x2b, 0x68, 0x28, 0x46, 0x9b, 0x68, 0x14, 0xf8, 0x01, 0x1b, 0x98, 0x47, 0xf6, 0xe7, 0x30, 0x46,
0xf8, 0xbd, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47, 0x00, 0xbf, 0x78, 0x0d, 0x0a, 0x08, 0x10, 0xb5, 0x03, 0x4b, 0x04, 0x46, 0x03,
0x60, 0xff, 0xf7, 0x84, 0xfd, 0x20, 0x46, 0x10, 0xbd, 0x78, 0x0d, 0x0a, 0x08, 0x08, 0x46, 0x00, 0xf0, 0x49, 0xba, 0x00, 0xf0,
0x4f, 0xba, 0x00, 0xf0, 0x55, 0xba, 0x00, 0xf0, 0x5b, 0xba, 0x00, 0xf0, 0x61, 0xba, 0x00, 0x00, 0x00, 0x22, 0x42, 0x60, 0x4f,
0xf4, 0x7a, 0x72, 0x82, 0x60, 0x01, 0x4a, 0x02, 0x60, 0x70, 0x47, 0x38, 0x0d, 0x0a, 0x08, 0x00, 0xf0, 0x5c, 0xba, 0x10, 0xb5,
0x05, 0x4c, 0x20, 0x46, 0xff, 0xf7, 0xef, 0xff, 0x20, 0x46, 0x03, 0x49, 0x04, 0x4a, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0x98,
0xba, 0x7c, 0x02, 0x00, 0x20, 0x6d, 0x05, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x2d, 0xe9, 0xf0, 0x41, 0x00, 0x24, 0x07, 0x46,
0x0e, 0x46, 0x25, 0x46, 0x3b, 0x19, 0x19, 0x79, 0x0a, 0x22, 0x30, 0x46, 0x00, 0xf0, 0x92, 0xf8, 0x2e, 0x21, 0x80, 0x46, 0x30,
0x46, 0x00, 0xf0, 0x5e, 0xf8, 0x01, 0x34, 0x40, 0x44, 0x03, 0x2c, 0x05, 0x44, 0xef, 0xd1, 0x30, 0x46, 0xf9, 0x79, 0x0a, 0x22,
0x00, 0xf0, 0x83, 0xf8, 0x28, 0x44, 0xbd, 0xe8, 0xf0, 0x81, 0x30, 0xb5, 0x83, 0x71, 0x03, 0x4d, 0x9d, 0xf8, 0x0c, 0x30, 0x05,
0x60, 0x01, 0x71, 0x42, 0x71, 0xc3, 0x71, 0x30, 0xbd, 0x60, 0x0d, 0x0a, 0x08, 0x05, 0x48, 0x06, 0x4b, 0x06, 0x49, 0x03, 0x60,
0x06, 0x4a, 0x00, 0x23, 0x03, 0x71, 0x43, 0x71, 0x83, 0x71, 0xc3, 0x71, 0x00, 0xf0, 0x5c, 0xba, 0x8c, 0x02, 0x00, 0x20, 0x60,
0x0d, 0x0a, 0x08, 0x9d, 0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47, 0x00, 0xbf, 0x78, 0x0d,
0x0a, 0x08, 0xf8, 0xb5, 0x06, 0x46, 0x0c, 0x46, 0x8f, 0x18, 0x00, 0x25, 0xbc, 0x42, 0x07, 0xd0, 0x33, 0x68, 0x30, 0x46, 0x9b,
0x68, 0x14, 0xf8, 0x01, 0x1b, 0x98, 0x47, 0x05, 0x44, 0xf5, 0xe7, 0x28, 0x46, 0xf8, 0xbd, 0x00, 0x00, 0x10, 0xb5, 0x03, 0x4b,
0x04, 0x46, 0x03, 0x60, 0xff, 0xf7, 0xfa, 0xfc, 0x20, 0x46, 0x10, 0xbd, 0x78, 0x0d, 0x0a, 0x08, 0x38, 0xb5, 0x05, 0x46, 0x0c,
0x46, 0x08, 0x46, 0x41, 0xb1, 0x00, 0xf0, 0x68, 0xfa, 0x2b, 0x68, 0x02, 0x46, 0xdb, 0x68, 0x28, 0x46, 0x21, 0x46, 0x98, 0x47,
0x38, 0xbd, 0x38, 0xbd, 0x08, 0xb5, 0x03, 0x68, 0x9b, 0x68, 0x98, 0x47, 0x08, 0xbd, 0x30, 0xb5, 0x00, 0x23, 0x8b, 0xb0, 0x8d,
0xf8, 0x24, 0x30, 0x01, 0x2a, 0x98, 0xbf, 0x0a, 0x22, 0x0d, 0xf1, 0x23, 0x04, 0xb1, 0xfb, 0xf2, 0xf3, 0x03, 0xfb, 0x12, 0x11,
0xcd, 0xb2, 0x09, 0x2d, 0x94, 0xbf, 0x30, 0x35, 0x37, 0x35, 0xed, 0xb2, 0x21, 0x46, 0x04, 0xf8, 0x01, 0x59, 0x0b, 0xb1, 0x19,
0x46, 0xef, 0xe7, 0xff, 0xf7, 0xd0, 0xff, 0x0b, 0xb0, 0x30, 0xbd, 0x10, 0xb5, 0x22, 0xb9, 0x02, 0x68, 0xc9, 0xb2, 0x92, 0x68,
0x90, 0x47, 0x10, 0xbd, 0xd2, 0xb2, 0xbd, 0xe8, 0x10, 0x40, 0xff, 0xf7, 0xd6, 0xbf, 0xff, 0xf7, 0xf2, 0xbf, 0x00, 0xf0, 0xb0,
0xb9, 0x13, 0xb5, 0x08, 0x4c, 0x00, 0x21, 0x00, 0x91, 0x0a, 0x46, 0x0b, 0x46, 0x20, 0x46, 0xff, 0xf7, 0x73, 0xff, 0x05, 0x49,
0x05, 0x4a, 0x20, 0x46, 0x02, 0xb0, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0xdf, 0xb9, 0x00, 0xbf, 0x94, 0x02, 0x00, 0x20, 0x9d,
0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x10, 0xb5, 0x04, 0x46, 0x00, 0x68, 0xff, 0xf7, 0x35, 0xfe, 0x20, 0x46, 0x10, 0xbd,
0x10, 0xb5, 0x04, 0x46, 0x00, 0x68, 0x08, 0xb1, 0xff, 0xf7, 0x2d, 0xfe, 0x00, 0x23, 0x23, 0x60, 0xa3, 0x60, 0x63, 0x60, 0x10,
0xbd, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0x00, 0x68, 0x01, 0x31, 0xff, 0xf7, 0x29, 0xfe, 0x10, 0xb1, 0x84, 0xe8, 0x21, 0x00,
0x01, 0x20, 0x38, 0xbd, 0x10, 0xb5, 0x03, 0x68, 0x04, 0x46, 0x13, 0xb1, 0x43, 0x68, 0x8b, 0x42, 0x07, 0xd2, 0x20, 0x46, 0xff,
0xf7, 0xea, 0xff, 0x20, 0xb1, 0xa3, 0x68, 0x0b, 0xb9, 0x22, 0x68, 0x13, 0x70, 0x01, 0x20, 0x10, 0xbd, 0x70, 0xb5, 0x0e, 0x46,
0x11, 0x46, 0x04, 0x46, 0x15, 0x46, 0xff, 0xf7, 0xe8, 0xff, 0x18, 0xb9, 0x20, 0x46, 0xff, 0xf7, 0xcd, 0xff, 0x04, 0xe0, 0xa5,
0x60, 0x20, 0x68, 0x31, 0x46, 0x00, 0xf0, 0xcd, 0xf9, 0x20, 0x46, 0x70, 0xbd, 0x38, 0xb5, 0x00, 0x23, 0x04, 0x46, 0x03, 0x60,
0x43, 0x60, 0x83, 0x60, 0x03, 0x73, 0x0d, 0x46, 0x39, 0xb1, 0x08, 0x46, 0x00, 0xf0, 0xc7, 0xf9, 0x29, 0x46, 0x02, 0x46, 0x20,
0x46, 0xff, 0xf7, 0xdc, 0xff, 0x20, 0x46, 0x38, 0xbd, 0x38, 0xb5, 0x05, 0x46, 0x0c, 0x46, 0x41, 0xb1, 0x08, 0x46, 0x00, 0xf0,
0xb9, 0xf9, 0x21, 0x46, 0x02, 0x46, 0x28, 0x46, 0xff, 0xf7, 0xce, 0xff, 0x01, 0xe0, 0xff, 0xf7, 0xa3, 0xff, 0x28, 0x46, 0x38,
0xbd, 0x08, 0xb5, 0x82, 0x68, 0x0b, 0x46, 0x12, 0xb9, 0x19, 0xb9, 0x01, 0x20, 0x08, 0xbd, 0x11, 0xb9, 0x03, 0x68, 0x18, 0x78,
0x02, 0xe0, 0x00, 0x68, 0x00, 0xf0, 0x8f, 0xf9, 0xd0, 0xf1, 0x01, 0x00, 0x38, 0xbf, 0x00, 0x20, 0x08, 0xbd, 0x10, 0xb5, 0x8b,
0x68, 0x84, 0x68, 0xe4, 0x1a, 0xa2, 0x42, 0x0c, 0xd8, 0x00, 0x68, 0x68, 0xb1, 0x09, 0x68, 0x51, 0xb1, 0x10, 0x44, 0x1a, 0x46,
0x00, 0xf0, 0x96, 0xf9, 0xd0, 0xf1, 0x01, 0x00, 0x38, 0xbf, 0x00, 0x20, 0x10, 0xbd, 0x00, 0x20, 0x10, 0xbd, 0x08, 0x46, 0x10,
0xbd, 0x82, 0x68, 0x8b, 0x68, 0x9a, 0x42, 0x02, 0xd3, 0x00, 0x22, 0xff, 0xf7, 0xe2, 0xbf, 0x00, 0x20, 0x70, 0x47, 0x83, 0x68,
0x99, 0x42, 0x03, 0xd2, 0x00, 0x68, 0x10, 0xb1, 0x40, 0x5c, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0xff, 0xf7, 0xf5, 0xbf, 0x9a,
0x42, 0x2d, 0xe9, 0xf0, 0x41, 0x07, 0x46, 0x0d, 0x46, 0x14, 0x46, 0x1e, 0x46, 0x01, 0xd9, 0x34, 0x46, 0x16, 0x46, 0x38, 0x46,
0x0c, 0x49, 0xff, 0xf7, 0x90, 0xff, 0xab, 0x68, 0x9c, 0x42, 0x0f, 0xd8, 0x9e, 0x42, 0x28, 0xbf, 0x1e, 0x46, 0x2b, 0x68, 0x00,
0x22, 0x13, 0xf8, 0x06, 0x80, 0x9a, 0x55, 0x29, 0x68, 0x38, 0x46, 0x21, 0x44, 0xff, 0xf7, 0x93, 0xff, 0x2b, 0x68, 0x03, 0xf8,
0x06, 0x80, 0x38, 0x46, 0xbd, 0xe8, 0xf0, 0x81, 0xf3, 0x0c, 0x0a, 0x08, 0x10, 0xb5, 0x04, 0x46, 0x8b, 0x68, 0xff, 0xf7, 0xd5,
0xff, 0x20, 0x46, 0x10, 0xbd, 0x00, 0x68, 0x08, 0xb1, 0x00, 0xf0, 0x08, 0xb9, 0x70, 0x47, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47,
0x00, 0xbf, 0x78, 0x0d, 0x0a, 0x08, 0x10, 0xb5, 0x03, 0x4b, 0x04, 0x46, 0x03, 0x60, 0xff, 0xf7, 0xba, 0xfb, 0x20, 0x46, 0x10,
0xbd, 0x78, 0x0d, 0x0a, 0x08, 0x00, 0x7c, 0x00, 0xf0, 0xc7, 0xb8, 0x00, 0x7c, 0x00, 0xf0, 0xd4, 0xb8, 0x00, 0x7c, 0x00, 0xf0,
0xc9, 0xb8, 0x00, 0x7c, 0x00, 0xf0, 0xd6, 0xb8, 0x00, 0x7c, 0x00, 0xf0, 0xb3, 0xb8, 0x00, 0x00, 0x10, 0xb5, 0x04, 0x46, 0x00,
0x20, 0x60, 0x60, 0x4f, 0xf4, 0x7a, 0x70, 0xa0, 0x60, 0x05, 0x48, 0x21, 0x74, 0x20, 0x60, 0x08, 0x46, 0x11, 0x46, 0x1a, 0x46,
0x00, 0xf0, 0x9b, 0xf8, 0x20, 0x46, 0x10, 0xbd, 0x00, 0xbf, 0xa0, 0x0d, 0x0a, 0x08, 0x00, 0x7c, 0x00, 0xf0, 0xc3, 0xb8, 0x00,
0x00, 0x10, 0xb5, 0x07, 0x4c, 0x00, 0x21, 0x20, 0x46, 0x06, 0x4a, 0x07, 0x4b, 0xff, 0xf7, 0xe0, 0xff, 0x20, 0x46, 0x06, 0x49,
0x06, 0x4a, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0xbb, 0xb8, 0x00, 0xbf, 0x9c, 0x02, 0x00, 0x20, 0xf2, 0x02, 0x00, 0x20, 0xb0,
0x02, 0x00, 0x20, 0x01, 0x09, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01, 0x93,
0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06,
0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0xdb, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b,
0x1b, 0x68, 0x1b, 0x69, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x69, 0x01,
0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01,
0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02,
0x4b, 0x1b, 0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b, 0x6a,
0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xac,
0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5,
0x02, 0x4b, 0x1b, 0x68, 0xdb, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b,
0x6b, 0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd,
0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x69, 0x01, 0x93, 0x08, 0xbd, 0xb4, 0x01, 0x06, 0x08, 0x08,
0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x69, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68,
0x5b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6a, 0x01, 0x93, 0x08,
0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0xdb, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08,
0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b,
0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6b, 0x01, 0x93,
0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x03, 0x46, 0x08, 0x46, 0x19, 0x46, 0x00, 0xf0, 0x05, 0xb8, 0x00, 0x21, 0x0a, 0x22, 0x00,
0xf0, 0xd5, 0xb8, 0x00, 0x00, 0x70, 0xb5, 0x06, 0x4c, 0x06, 0x46, 0x0d, 0x46, 0x13, 0x46, 0x2c, 0xb1, 0x31, 0x46, 0x2a, 0x46,
0x02, 0x20, 0xaf, 0xf3, 0x00, 0x80, 0x70, 0xbd, 0x20, 0x46, 0x70, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb5, 0x00, 0x23, 0x93,
0x42, 0x03, 0xd0, 0xcc, 0x5c, 0xc4, 0x54, 0x01, 0x33, 0xf9, 0xe7, 0x10, 0xbd, 0x02, 0x44, 0x03, 0x46, 0x93, 0x42, 0x02, 0xd0,
0x03, 0xf8, 0x01, 0x1b, 0xfa, 0xe7, 0x70, 0x47, 0x10, 0xf8, 0x01, 0x2b, 0x11, 0xf8, 0x01, 0x3b, 0x01, 0x2a, 0x28, 0xbf, 0x9a,
0x42, 0xf7, 0xd0, 0xd0, 0x1a, 0x70, 0x47, 0x03, 0x46, 0x11, 0xf8, 0x01, 0x2b, 0x03, 0xf8, 0x01, 0x2b, 0x00, 0x2a, 0xf9, 0xd1,
0x70, 0x47, 0x03, 0x46, 0x13, 0xf8, 0x01, 0x2b, 0x00, 0x2a, 0xfb, 0xd1, 0x18, 0x1a, 0x01, 0x38, 0x70, 0x47, 0x70, 0xb5, 0x8a,
0xb1, 0x0b, 0x46, 0x05, 0x46, 0x1c, 0x78, 0x10, 0xf8, 0x01, 0x6b, 0x01, 0x31, 0xb4, 0x42, 0x01, 0xd1, 0x01, 0x2a, 0x03, 0xd1,
0x28, 0x78, 0x1b, 0x78, 0xc0, 0x1a, 0x70, 0xbd, 0x01, 0x3a, 0x00, 0x2c, 0xee, 0xd1, 0xf7, 0xe7, 0x10, 0x46, 0x70, 0xbd, 0x00,
0x00, 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01, 0xe0,
0x4f, 0xf0, 0xff, 0x36, 0x14, 0xf8, 0x01, 0x5b, 0xd7, 0xe7, 0x73, 0x1c, 0x0c, 0xd1, 0x00, 0x2f, 0x4f, 0xf0, 0x22, 0x03, 0x0c,
0xbf, 0x6f, 0xf0, 0x00, 0x40, 0x4f, 0xf0, 0x00, 0x40, 0xcc, 0xf8, 0x00, 0x30, 0x2a, 0xb9, 0xbd, 0xe8, 0xf0, 0x8f, 0x07, 0xb1,
0x40, 0x42, 0x42, 0xb1, 0x06, 0xb1, 0x61, 0x1e, 0x11, 0x60, 0xbd, 0xe8, 0xf0, 0x8f, 0x00, 0x2b, 0x08, 0xbf, 0x08, 0x23, 0xb0,
0xe7, 0xbd, 0xe8, 0xf0, 0x8f, 0x00, 0x02, 0x00, 0x20, 0x30, 0xb5, 0x13, 0x46, 0x04, 0x4a, 0x05, 0x46, 0x0c, 0x46, 0x10, 0x68,
0x29, 0x46, 0x22, 0x46, 0xbd, 0xe8, 0x30, 0x40, 0xff, 0xf7, 0x72, 0xbf, 0x64, 0x02, 0x00, 0x20, 0x45, 0x00, 0x0a, 0x08, 0x1d,
0x00, 0x0a, 0x08, 0x85, 0x00, 0x0a, 0x08, 0x89, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x41, 0x00, 0x48, 0x49,
0x47, 0x48, 0x00, 0x4c, 0x4f, 0x57, 0x00, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x00, 0x64, 0x69,
0x67, 0x69, 0x74, 0x61, 0x6c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x00, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x72, 0x65, 0x61, 0x64,
0x00, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x77, 0x72, 0x69, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x6d, 0x05, 0x0a, 0x08, 0x79, 0x05, 0x0a, 0x08, 0x8d, 0x05, 0x0a, 0x08, 0x4d, 0x05, 0x0a, 0x08, 0x93, 0x05,
0x0a, 0x08, 0x97, 0x05, 0x0a, 0x08, 0x9b, 0x05, 0x0a, 0x08, 0x9f, 0x05, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe1, 0x05, 0x0a, 0x08, 0x9d, 0x00, 0x0a, 0x08, 0xa9, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5d, 0x06, 0x0a, 0x08, 0x8d, 0x06, 0x0a, 0x08, 0x91, 0x00, 0x0a, 0x08, 0x69, 0x06, 0x0a, 0x08, 0x25,
0x25, 0x25, 0x64, 0x2e, 0x25, 0x64, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x09, 0x0a, 0x08, 0x0d, 0x09, 0x0a, 0x08, 0x39, 0x09, 0x0a, 0x08, 0x69, 0x06, 0x0a, 0x08, 0x21, 0x09, 0x0a,
0x08, 0x2d, 0x09, 0x0a, 0x08, 0x27, 0x09, 0x0a, 0x08, 0x33, 0x09, 0x0a, 0x08, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x28, 0x28, 0x28, 0x28, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x88, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x41, 0x41, 0x41, 0x41, 0x41,
0x41, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00,
0x65, 0x03, 0x0a, 0x08, 0x1d, 0x05, 0x0a, 0x08, 0xbd, 0x05, 0x0a, 0x08, 0x35, 0x06, 0x0a, 0x08, 0x25, 0x07, 0x0a, 0x08, 0x71,
0x09, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0d, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc1, 0x0e, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x02, 0x00, 0x20, 0x00, 0x00, 0x2b, 0xa4, 0xe7, 0x1e, 0x84, 0x0f, 0x59, 0x6b, 0x81, 0x20, 0x03, 0x88, 0x2a,
0xae, 0x7c, 0xa6, 0x49, 0x6f, 0x15, 0x90, 0xca, 0x4a, 0x04, 0x93, 0x10, 0xaf, 0x76, 0xea, 0xf1, 0x1c, 0x94, 0x3a, 0x24, 0x00,
0xba, 0x4f, 0x59, 0xab};
FileTransfer::Descriptor file;
Serial.printlnf("starting flash size=%d", sizeof(tinker));
file.file_length = sizeof(tinker);
file.file_address = 0; // Automatically set to HAL_OTA_FlashAddress if store is FIRMWARE
file.chunk_address = 0;
file.chunk_size = 0; // use default
file.store = FileTransfer::Store::FIRMWARE;
int result = Spark_Prepare_For_Firmware_Update(file, 0, NULL);
if (result != 0) {
Serial.printlnf("prepare failed %d", result);
return;
}
Serial.printlnf("chunk_size=%d file_address=0x%x", file.chunk_size, file.file_address);
if (file.chunk_size == 0) {
file.chunk_size = 512;
}
// Note that Spark_Prepare_For_Firmware_Update sets file.file_address so it's not really zero here
// even though it's what we initialize it to above!
file.chunk_address = file.file_address;
size_t offset = 0;
while(offset < file.file_length) {
if (file.chunk_size > (file.file_length - offset)) {
file.chunk_size = (file.file_length - offset);
}
Serial.printlnf("chunk_address=0x%x chunk_size=%d", file.chunk_address, file.chunk_size);
result = Spark_Save_Firmware_Chunk(file, &tinker[offset], NULL);
if (result != 0) {
Serial.printlnf("save chunk failed %d", result);
return;
}
file.chunk_address += file.chunk_size;
offset += file.chunk_size;
}
result = Spark_Finish_Firmware_Update(file, 0x1, NULL);
if (result != 0) {
Serial.printlnf("finish failed %d", result);
return;
}
Serial.printlnf("update complete");
}
#include "Particle.h"
#include "system_update.h"
// photon_tinker.bin
const uint8_t tinker[] = {
0x00, 0x00, 0x0a, 0x08, 0x6c, 0x0f, 0x0a, 0x08, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x05, 0x01, 0x04, 0x02, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0xdc, 0x0c, 0x0a, 0x08, 0x70, 0xb5, 0x07, 0x4b, 0x07, 0x4d, 0x00, 0x24, 0xed, 0x1a, 0xad, 0x08, 0x1e, 0x46,
0xac, 0x42, 0x04, 0xd0, 0x56, 0xf8, 0x24, 0x20, 0x90, 0x47, 0x01, 0x34, 0xf8, 0xe7, 0x70, 0xbd, 0x00, 0xbf, 0xc4, 0x0e, 0x0a,
0x08, 0xdc, 0x0e, 0x0a, 0x08, 0x09, 0x48, 0x0a, 0x49, 0x08, 0xb5, 0x88, 0x42, 0x05, 0xd0, 0x09, 0x4a, 0x82, 0x42, 0x02, 0xd0,
0x12, 0x1a, 0x00, 0xf0, 0x6f, 0xfd, 0x07, 0x48, 0x07, 0x4a, 0x00, 0x21, 0x12, 0x1a, 0x00, 0xf0, 0x72, 0xfd, 0x06, 0x48, 0x08,
0xbd, 0x00, 0xbf, 0x00, 0x02, 0x00, 0x20, 0xe0, 0x0e, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x68, 0x02, 0x00, 0x20, 0x34, 0x03,
0x00, 0x20, 0x34, 0x03, 0x00, 0x20, 0x00, 0xf0, 0x44, 0xb9, 0x00, 0xf0, 0x6a, 0xb9, 0x00, 0xf0, 0x9c, 0xb9, 0x08, 0xb5, 0x0c,
0x20, 0x00, 0x21, 0x00, 0xf0, 0x7f, 0xf9, 0xfe, 0xe7, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47, 0x00, 0xbf, 0x60, 0x0d, 0x0a, 0x08,
0x10, 0xb5, 0x03, 0x4b, 0x04, 0x46, 0x03, 0x60, 0xff, 0xf7, 0xec, 0xff, 0x20, 0x46, 0x10, 0xbd, 0x60, 0x0d, 0x0a, 0x08, 0xf0,
0xb5, 0x01, 0x21, 0x85, 0xb0, 0x05, 0x46, 0x00, 0xf0, 0xe8, 0xfb, 0xa0, 0xf1, 0x30, 0x06, 0x07, 0x2e, 0x04, 0x46, 0x25, 0xd8,
0x16, 0x49, 0x68, 0x46, 0x00, 0xf0, 0x7f, 0xfb, 0x28, 0x46, 0x69, 0x46, 0x00, 0xf0, 0xc9, 0xfb, 0x07, 0x46, 0x68, 0x46, 0x00,
0xf0, 0x35, 0xfb, 0x0f, 0xb1, 0xb4, 0xb2, 0x0e, 0xe0, 0x0f, 0x49, 0x68, 0x46, 0x00, 0xf0, 0x70, 0xfb, 0x28, 0x46, 0x69, 0x46,
0x00, 0xf0, 0xba, 0xfb, 0x05, 0x46, 0x68, 0x46, 0x00, 0xf0, 0x26, 0xfb, 0x65, 0xb1, 0x26, 0x3c, 0xa4, 0xb2, 0x20, 0x46, 0x03,
0x21, 0x00, 0xf0, 0x87, 0xf9, 0x20, 0x46, 0x00, 0xf0, 0xaf, 0xf9, 0x04, 0xe0, 0x4f, 0xf0, 0xff, 0x30, 0x01, 0xe0, 0x6f, 0xf0,
0x01, 0x00, 0x05, 0xb0, 0xf0, 0xbd, 0xf0, 0x0c, 0x0a, 0x08, 0xf2, 0x0c, 0x0a, 0x08, 0xf0, 0xb5, 0x01, 0x21, 0x85, 0xb0, 0x04,
0x46, 0x00, 0xf0, 0xac, 0xfb, 0xa0, 0xf1, 0x30, 0x06, 0x07, 0x2e, 0x45, 0xd8, 0x68, 0x46, 0x21, 0x46, 0x03, 0x22, 0x07, 0x23,
0x00, 0xf0, 0xa4, 0xfb, 0x68, 0x46, 0x24, 0x49, 0x00, 0xf0, 0x62, 0xfb, 0x05, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xf8, 0xfa, 0x7d,
0xb9, 0x68, 0x46, 0x21, 0x46, 0x03, 0x22, 0x06, 0x23, 0x00, 0xf0, 0x95, 0xfb, 0x68, 0x46, 0x1d, 0x49, 0x00, 0xf0, 0x53, 0xfb,
0x07, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xe9, 0xfa, 0x0f, 0xb9, 0x29, 0xe0, 0x01, 0x25, 0x19, 0x49, 0x68, 0x46, 0x00, 0xf0, 0x24,
0xfb, 0x20, 0x46, 0x69, 0x46, 0x00, 0xf0, 0x6e, 0xfb, 0x07, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xda, 0xfa, 0x6f, 0xb9, 0x14, 0x49,
0x68, 0x46, 0x00, 0xf0, 0x17, 0xfb, 0x20, 0x46, 0x69, 0x46, 0x00, 0xf0, 0x61, 0xfb, 0x04, 0x46, 0x68, 0x46, 0x00, 0xf0, 0xcd,
0xfa, 0x8c, 0xb1, 0x0a, 0x36, 0xb6, 0xb2, 0x30, 0x46, 0x01, 0x21, 0x00, 0xf0, 0x2e, 0xf9, 0x30, 0x46, 0x29, 0x46, 0x00, 0xf0,
0x3b, 0xf9, 0x01, 0x20, 0x07, 0xe0, 0x4f, 0xf0, 0xff, 0x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01, 0x0a, 0x08, 0x16, 0x0d, 0x0a, 0x08, 0xf9, 0x01, 0x0a, 0x08, 0x21, 0x0d, 0x0a, 0x08, 0x69,
0x02, 0x0a, 0x08, 0x70, 0x47, 0x00, 0x00, 0x13, 0xb5, 0x09, 0x4c, 0x00, 0x21, 0x0b, 0x46, 0x00, 0x91, 0x0a, 0x46, 0x20, 0x46,
0x00, 0xf0, 0x53, 0xf9, 0x20, 0x46, 0x05, 0x49, 0x06, 0x4a, 0x00, 0xf0, 0xc2, 0xfb, 0x01, 0x20, 0x02, 0xb0, 0xbd, 0xe8, 0x10,
0x40, 0x00, 0xf0, 0x0e, 0xb8, 0x6c, 0x02, 0x00, 0x20, 0x9d, 0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x08, 0xb5, 0x02, 0x4b,
0x1b, 0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xa8, 0x01, 0x02, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01,
0x93, 0x08, 0xbd, 0xa4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xcc, 0x01,
0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xa0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02,
0x4b, 0x1b, 0x68, 0x9b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xa0, 0x01, 0x06, 0x08, 0x10, 0xb5, 0x04, 0x46, 0x00, 0xf0, 0x98, 0xf9,
0x28, 0xb1, 0xa4, 0xf1, 0x0d, 0x03, 0x02, 0x2b, 0x01, 0xd8, 0x00, 0x20, 0x10, 0xbd, 0x00, 0xf0, 0xdb, 0xf8, 0x08, 0xb1, 0x01,
0x2c, 0xf8, 0xd9, 0x05, 0x48, 0x00, 0xf0, 0xad, 0xfa, 0x28, 0xb1, 0x12, 0x3c, 0x01, 0x2c, 0x94, 0xbf, 0x00, 0x20, 0x01, 0x20,
0x10, 0xbd, 0x01, 0x20, 0x10, 0xbd, 0x9c, 0x02, 0x00, 0x20, 0x14, 0x28, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0x0a, 0xd8, 0xff,
0x29, 0x08, 0xd0, 0xff, 0xf7, 0xd9, 0xff, 0x28, 0xb1, 0x20, 0x46, 0x29, 0x46, 0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0, 0xb8, 0xba,
0x38, 0xbd, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0x00, 0xf0, 0xba, 0xfa, 0xff, 0x28, 0x11, 0xd0, 0x80, 0xb1, 0x82, 0x1e, 0xd2,
0xb2, 0x01, 0x2a, 0x0c, 0xd9, 0x06, 0x28, 0x00, 0xd1, 0x38, 0xbd, 0x20, 0x46, 0xff, 0xf7, 0xbf, 0xff, 0x28, 0xb1, 0x20, 0x46,
0x29, 0x46, 0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0, 0xae, 0xba, 0x38, 0xbd, 0x10, 0xb5, 0x04, 0x46, 0x00, 0xf0, 0xa1, 0xfa, 0x04,
0x38, 0xc0, 0xb2, 0x01, 0x28, 0x08, 0xd9, 0x20, 0x46, 0xff, 0xf7, 0xac, 0xff, 0x20, 0xb1, 0x20, 0x46, 0xbd, 0xe8, 0x10, 0x40,
0x00, 0xf0, 0xa4, 0xba, 0x00, 0x20, 0x10, 0xbd, 0x09, 0x28, 0x10, 0xb5, 0x04, 0x46, 0x9c, 0xbf, 0x00, 0xf1, 0x0a, 0x04, 0xa4,
0xb2, 0x20, 0x46, 0xff, 0xf7, 0x9a, 0xff, 0x50, 0xb1, 0x20, 0x46, 0x03, 0x21, 0x00, 0xf0, 0x73, 0xfa, 0x03, 0x28, 0x04, 0xd1,
0x20, 0x46, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0x9c, 0xba, 0x00, 0x20, 0x10, 0xbd, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0xff,
0xf7, 0x87, 0xff, 0xe8, 0xb1, 0x20, 0x46, 0x04, 0x21, 0x00, 0xf0, 0x60, 0xfa, 0x04, 0x28, 0x20, 0x46, 0x04, 0xd1, 0x29, 0x46,
0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0, 0x80, 0xba, 0x02, 0x21, 0x00, 0xf0, 0x55, 0xfa, 0x02, 0x28, 0x0c, 0xd1, 0x20, 0x46, 0x00,
0xf0, 0x60, 0xfa, 0x01, 0x28, 0x01, 0xd0, 0x04, 0x28, 0x05, 0xd1, 0x20, 0x46, 0xe9, 0xb2, 0xbd, 0xe8, 0x38, 0x40, 0x00, 0xf0,
0x7e, 0xba, 0x38, 0xbd, 0x00, 0x00, 0x13, 0xb5, 0x08, 0x4c, 0x00, 0x21, 0x00, 0x91, 0x0a, 0x46, 0x0b, 0x46, 0x20, 0x46, 0x00,
0xf0, 0x77, 0xf8, 0x05, 0x49, 0x05, 0x4a, 0x20, 0x46, 0x02, 0xb0, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0xe3, 0xba, 0x00, 0xbf,
0x74, 0x02, 0x00, 0x20, 0x9d, 0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0xf8, 0xb5, 0x05, 0x46, 0x16, 0x46, 0x0c, 0x46, 0x8f,
0x18, 0xbc, 0x42, 0x06, 0xd0, 0x2b, 0x68, 0x28, 0x46, 0x9b, 0x68, 0x14, 0xf8, 0x01, 0x1b, 0x98, 0x47, 0xf6, 0xe7, 0x30, 0x46,
0xf8, 0xbd, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47, 0x00, 0xbf, 0x78, 0x0d, 0x0a, 0x08, 0x10, 0xb5, 0x03, 0x4b, 0x04, 0x46, 0x03,
0x60, 0xff, 0xf7, 0x84, 0xfd, 0x20, 0x46, 0x10, 0xbd, 0x78, 0x0d, 0x0a, 0x08, 0x08, 0x46, 0x00, 0xf0, 0x49, 0xba, 0x00, 0xf0,
0x4f, 0xba, 0x00, 0xf0, 0x55, 0xba, 0x00, 0xf0, 0x5b, 0xba, 0x00, 0xf0, 0x61, 0xba, 0x00, 0x00, 0x00, 0x22, 0x42, 0x60, 0x4f,
0xf4, 0x7a, 0x72, 0x82, 0x60, 0x01, 0x4a, 0x02, 0x60, 0x70, 0x47, 0x38, 0x0d, 0x0a, 0x08, 0x00, 0xf0, 0x5c, 0xba, 0x10, 0xb5,
0x05, 0x4c, 0x20, 0x46, 0xff, 0xf7, 0xef, 0xff, 0x20, 0x46, 0x03, 0x49, 0x04, 0x4a, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0x98,
0xba, 0x7c, 0x02, 0x00, 0x20, 0x6d, 0x05, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x2d, 0xe9, 0xf0, 0x41, 0x00, 0x24, 0x07, 0x46,
0x0e, 0x46, 0x25, 0x46, 0x3b, 0x19, 0x19, 0x79, 0x0a, 0x22, 0x30, 0x46, 0x00, 0xf0, 0x92, 0xf8, 0x2e, 0x21, 0x80, 0x46, 0x30,
0x46, 0x00, 0xf0, 0x5e, 0xf8, 0x01, 0x34, 0x40, 0x44, 0x03, 0x2c, 0x05, 0x44, 0xef, 0xd1, 0x30, 0x46, 0xf9, 0x79, 0x0a, 0x22,
0x00, 0xf0, 0x83, 0xf8, 0x28, 0x44, 0xbd, 0xe8, 0xf0, 0x81, 0x30, 0xb5, 0x83, 0x71, 0x03, 0x4d, 0x9d, 0xf8, 0x0c, 0x30, 0x05,
0x60, 0x01, 0x71, 0x42, 0x71, 0xc3, 0x71, 0x30, 0xbd, 0x60, 0x0d, 0x0a, 0x08, 0x05, 0x48, 0x06, 0x4b, 0x06, 0x49, 0x03, 0x60,
0x06, 0x4a, 0x00, 0x23, 0x03, 0x71, 0x43, 0x71, 0x83, 0x71, 0xc3, 0x71, 0x00, 0xf0, 0x5c, 0xba, 0x8c, 0x02, 0x00, 0x20, 0x60,
0x0d, 0x0a, 0x08, 0x9d, 0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47, 0x00, 0xbf, 0x78, 0x0d,
0x0a, 0x08, 0xf8, 0xb5, 0x06, 0x46, 0x0c, 0x46, 0x8f, 0x18, 0x00, 0x25, 0xbc, 0x42, 0x07, 0xd0, 0x33, 0x68, 0x30, 0x46, 0x9b,
0x68, 0x14, 0xf8, 0x01, 0x1b, 0x98, 0x47, 0x05, 0x44, 0xf5, 0xe7, 0x28, 0x46, 0xf8, 0xbd, 0x00, 0x00, 0x10, 0xb5, 0x03, 0x4b,
0x04, 0x46, 0x03, 0x60, 0xff, 0xf7, 0xfa, 0xfc, 0x20, 0x46, 0x10, 0xbd, 0x78, 0x0d, 0x0a, 0x08, 0x38, 0xb5, 0x05, 0x46, 0x0c,
0x46, 0x08, 0x46, 0x41, 0xb1, 0x00, 0xf0, 0x68, 0xfa, 0x2b, 0x68, 0x02, 0x46, 0xdb, 0x68, 0x28, 0x46, 0x21, 0x46, 0x98, 0x47,
0x38, 0xbd, 0x38, 0xbd, 0x08, 0xb5, 0x03, 0x68, 0x9b, 0x68, 0x98, 0x47, 0x08, 0xbd, 0x30, 0xb5, 0x00, 0x23, 0x8b, 0xb0, 0x8d,
0xf8, 0x24, 0x30, 0x01, 0x2a, 0x98, 0xbf, 0x0a, 0x22, 0x0d, 0xf1, 0x23, 0x04, 0xb1, 0xfb, 0xf2, 0xf3, 0x03, 0xfb, 0x12, 0x11,
0xcd, 0xb2, 0x09, 0x2d, 0x94, 0xbf, 0x30, 0x35, 0x37, 0x35, 0xed, 0xb2, 0x21, 0x46, 0x04, 0xf8, 0x01, 0x59, 0x0b, 0xb1, 0x19,
0x46, 0xef, 0xe7, 0xff, 0xf7, 0xd0, 0xff, 0x0b, 0xb0, 0x30, 0xbd, 0x10, 0xb5, 0x22, 0xb9, 0x02, 0x68, 0xc9, 0xb2, 0x92, 0x68,
0x90, 0x47, 0x10, 0xbd, 0xd2, 0xb2, 0xbd, 0xe8, 0x10, 0x40, 0xff, 0xf7, 0xd6, 0xbf, 0xff, 0xf7, 0xf2, 0xbf, 0x00, 0xf0, 0xb0,
0xb9, 0x13, 0xb5, 0x08, 0x4c, 0x00, 0x21, 0x00, 0x91, 0x0a, 0x46, 0x0b, 0x46, 0x20, 0x46, 0xff, 0xf7, 0x73, 0xff, 0x05, 0x49,
0x05, 0x4a, 0x20, 0x46, 0x02, 0xb0, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0xdf, 0xb9, 0x00, 0xbf, 0x94, 0x02, 0x00, 0x20, 0x9d,
0x00, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x10, 0xb5, 0x04, 0x46, 0x00, 0x68, 0xff, 0xf7, 0x35, 0xfe, 0x20, 0x46, 0x10, 0xbd,
0x10, 0xb5, 0x04, 0x46, 0x00, 0x68, 0x08, 0xb1, 0xff, 0xf7, 0x2d, 0xfe, 0x00, 0x23, 0x23, 0x60, 0xa3, 0x60, 0x63, 0x60, 0x10,
0xbd, 0x38, 0xb5, 0x04, 0x46, 0x0d, 0x46, 0x00, 0x68, 0x01, 0x31, 0xff, 0xf7, 0x29, 0xfe, 0x10, 0xb1, 0x84, 0xe8, 0x21, 0x00,
0x01, 0x20, 0x38, 0xbd, 0x10, 0xb5, 0x03, 0x68, 0x04, 0x46, 0x13, 0xb1, 0x43, 0x68, 0x8b, 0x42, 0x07, 0xd2, 0x20, 0x46, 0xff,
0xf7, 0xea, 0xff, 0x20, 0xb1, 0xa3, 0x68, 0x0b, 0xb9, 0x22, 0x68, 0x13, 0x70, 0x01, 0x20, 0x10, 0xbd, 0x70, 0xb5, 0x0e, 0x46,
0x11, 0x46, 0x04, 0x46, 0x15, 0x46, 0xff, 0xf7, 0xe8, 0xff, 0x18, 0xb9, 0x20, 0x46, 0xff, 0xf7, 0xcd, 0xff, 0x04, 0xe0, 0xa5,
0x60, 0x20, 0x68, 0x31, 0x46, 0x00, 0xf0, 0xcd, 0xf9, 0x20, 0x46, 0x70, 0xbd, 0x38, 0xb5, 0x00, 0x23, 0x04, 0x46, 0x03, 0x60,
0x43, 0x60, 0x83, 0x60, 0x03, 0x73, 0x0d, 0x46, 0x39, 0xb1, 0x08, 0x46, 0x00, 0xf0, 0xc7, 0xf9, 0x29, 0x46, 0x02, 0x46, 0x20,
0x46, 0xff, 0xf7, 0xdc, 0xff, 0x20, 0x46, 0x38, 0xbd, 0x38, 0xb5, 0x05, 0x46, 0x0c, 0x46, 0x41, 0xb1, 0x08, 0x46, 0x00, 0xf0,
0xb9, 0xf9, 0x21, 0x46, 0x02, 0x46, 0x28, 0x46, 0xff, 0xf7, 0xce, 0xff, 0x01, 0xe0, 0xff, 0xf7, 0xa3, 0xff, 0x28, 0x46, 0x38,
0xbd, 0x08, 0xb5, 0x82, 0x68, 0x0b, 0x46, 0x12, 0xb9, 0x19, 0xb9, 0x01, 0x20, 0x08, 0xbd, 0x11, 0xb9, 0x03, 0x68, 0x18, 0x78,
0x02, 0xe0, 0x00, 0x68, 0x00, 0xf0, 0x8f, 0xf9, 0xd0, 0xf1, 0x01, 0x00, 0x38, 0xbf, 0x00, 0x20, 0x08, 0xbd, 0x10, 0xb5, 0x8b,
0x68, 0x84, 0x68, 0xe4, 0x1a, 0xa2, 0x42, 0x0c, 0xd8, 0x00, 0x68, 0x68, 0xb1, 0x09, 0x68, 0x51, 0xb1, 0x10, 0x44, 0x1a, 0x46,
0x00, 0xf0, 0x96, 0xf9, 0xd0, 0xf1, 0x01, 0x00, 0x38, 0xbf, 0x00, 0x20, 0x10, 0xbd, 0x00, 0x20, 0x10, 0xbd, 0x08, 0x46, 0x10,
0xbd, 0x82, 0x68, 0x8b, 0x68, 0x9a, 0x42, 0x02, 0xd3, 0x00, 0x22, 0xff, 0xf7, 0xe2, 0xbf, 0x00, 0x20, 0x70, 0x47, 0x83, 0x68,
0x99, 0x42, 0x03, 0xd2, 0x00, 0x68, 0x10, 0xb1, 0x40, 0x5c, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0xff, 0xf7, 0xf5, 0xbf, 0x9a,
0x42, 0x2d, 0xe9, 0xf0, 0x41, 0x07, 0x46, 0x0d, 0x46, 0x14, 0x46, 0x1e, 0x46, 0x01, 0xd9, 0x34, 0x46, 0x16, 0x46, 0x38, 0x46,
0x0c, 0x49, 0xff, 0xf7, 0x90, 0xff, 0xab, 0x68, 0x9c, 0x42, 0x0f, 0xd8, 0x9e, 0x42, 0x28, 0xbf, 0x1e, 0x46, 0x2b, 0x68, 0x00,
0x22, 0x13, 0xf8, 0x06, 0x80, 0x9a, 0x55, 0x29, 0x68, 0x38, 0x46, 0x21, 0x44, 0xff, 0xf7, 0x93, 0xff, 0x2b, 0x68, 0x03, 0xf8,
0x06, 0x80, 0x38, 0x46, 0xbd, 0xe8, 0xf0, 0x81, 0xf3, 0x0c, 0x0a, 0x08, 0x10, 0xb5, 0x04, 0x46, 0x8b, 0x68, 0xff, 0xf7, 0xd5,
0xff, 0x20, 0x46, 0x10, 0xbd, 0x00, 0x68, 0x08, 0xb1, 0x00, 0xf0, 0x08, 0xb9, 0x70, 0x47, 0x01, 0x4b, 0x03, 0x60, 0x70, 0x47,
0x00, 0xbf, 0x78, 0x0d, 0x0a, 0x08, 0x10, 0xb5, 0x03, 0x4b, 0x04, 0x46, 0x03, 0x60, 0xff, 0xf7, 0xba, 0xfb, 0x20, 0x46, 0x10,
0xbd, 0x78, 0x0d, 0x0a, 0x08, 0x00, 0x7c, 0x00, 0xf0, 0xc7, 0xb8, 0x00, 0x7c, 0x00, 0xf0, 0xd4, 0xb8, 0x00, 0x7c, 0x00, 0xf0,
0xc9, 0xb8, 0x00, 0x7c, 0x00, 0xf0, 0xd6, 0xb8, 0x00, 0x7c, 0x00, 0xf0, 0xb3, 0xb8, 0x00, 0x00, 0x10, 0xb5, 0x04, 0x46, 0x00,
0x20, 0x60, 0x60, 0x4f, 0xf4, 0x7a, 0x70, 0xa0, 0x60, 0x05, 0x48, 0x21, 0x74, 0x20, 0x60, 0x08, 0x46, 0x11, 0x46, 0x1a, 0x46,
0x00, 0xf0, 0x9b, 0xf8, 0x20, 0x46, 0x10, 0xbd, 0x00, 0xbf, 0xa0, 0x0d, 0x0a, 0x08, 0x00, 0x7c, 0x00, 0xf0, 0xc3, 0xb8, 0x00,
0x00, 0x10, 0xb5, 0x07, 0x4c, 0x00, 0x21, 0x20, 0x46, 0x06, 0x4a, 0x07, 0x4b, 0xff, 0xf7, 0xe0, 0xff, 0x20, 0x46, 0x06, 0x49,
0x06, 0x4a, 0xbd, 0xe8, 0x10, 0x40, 0x00, 0xf0, 0xbb, 0xb8, 0x00, 0xbf, 0x9c, 0x02, 0x00, 0x20, 0xf2, 0x02, 0x00, 0x20, 0xb0,
0x02, 0x00, 0x20, 0x01, 0x09, 0x0a, 0x08, 0x68, 0x02, 0x00, 0x20, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x68, 0x01, 0x93,
0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06,
0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0xdb, 0x68, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b,
0x1b, 0x68, 0x1b, 0x69, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x69, 0x01,
0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01,
0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02,
0x4b, 0x1b, 0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xb0, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b, 0x6a,
0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xac,
0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5,
0x02, 0x4b, 0x1b, 0x68, 0xdb, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b,
0x6b, 0x01, 0x93, 0x08, 0xbd, 0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd,
0xac, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x69, 0x01, 0x93, 0x08, 0xbd, 0xb4, 0x01, 0x06, 0x08, 0x08,
0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x69, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68,
0x5b, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6a, 0x01, 0x93, 0x08,
0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0xdb, 0x6a, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08,
0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x1b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b,
0x68, 0x5b, 0x6b, 0x01, 0x93, 0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x08, 0xb5, 0x02, 0x4b, 0x1b, 0x68, 0x9b, 0x6b, 0x01, 0x93,
0x08, 0xbd, 0xc4, 0x01, 0x06, 0x08, 0x03, 0x46, 0x08, 0x46, 0x19, 0x46, 0x00, 0xf0, 0x05, 0xb8, 0x00, 0x21, 0x0a, 0x22, 0x00,
0xf0, 0xd5, 0xb8, 0x00, 0x00, 0x70, 0xb5, 0x06, 0x4c, 0x06, 0x46, 0x0d, 0x46, 0x13, 0x46, 0x2c, 0xb1, 0x31, 0x46, 0x2a, 0x46,
0x02, 0x20, 0xaf, 0xf3, 0x00, 0x80, 0x70, 0xbd, 0x20, 0x46, 0x70, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb5, 0x00, 0x23, 0x93,
0x42, 0x03, 0xd0, 0xcc, 0x5c, 0xc4, 0x54, 0x01, 0x33, 0xf9, 0xe7, 0x10, 0xbd, 0x02, 0x44, 0x03, 0x46, 0x93, 0x42, 0x02, 0xd0,
0x03, 0xf8, 0x01, 0x1b, 0xfa, 0xe7, 0x70, 0x47, 0x10, 0xf8, 0x01, 0x2b, 0x11, 0xf8, 0x01, 0x3b, 0x01, 0x2a, 0x28, 0xbf, 0x9a,
0x42, 0xf7, 0xd0, 0xd0, 0x1a, 0x70, 0x47, 0x03, 0x46, 0x11, 0xf8, 0x01, 0x2b, 0x03, 0xf8, 0x01, 0x2b, 0x00, 0x2a, 0xf9, 0xd1,
0x70, 0x47, 0x03, 0x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x47, 0x48, 0x00, 0x4c, 0x4f, 0x57, 0x00, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x00, 0x64, 0x69,
0x67, 0x69, 0x74, 0x61, 0x6c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x00, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x72, 0x65, 0x61, 0x64,
0x00, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x77, 0x72, 0x69, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x6d, 0x05, 0x0a, 0x08, 0x79, 0x05, 0x0a, 0x08, 0x8d, 0x05, 0x0a, 0x08, 0x4d, 0x05, 0x0a, 0x08, 0x93, 0x05,
0x0a, 0x08, 0x97, 0x05, 0x0a, 0x08, 0x9b, 0x05, 0x0a, 0x08, 0x9f, 0x05, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe1, 0x05, 0x0a, 0x08, 0x9d, 0x00, 0x0a, 0x08, 0xa9, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5d, 0x06, 0x0a, 0x08, 0x8d, 0x06, 0x0a, 0x08, 0x91, 0x00, 0x0a, 0x08, 0x69, 0x06, 0x0a, 0x08, 0x25,
0x25, 0x25, 0x64, 0x2e, 0x25, 0x64, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x09, 0x0a, 0x08, 0x0d, 0x09, 0x0a, 0x08, 0x39, 0x09, 0x0a, 0x08, 0x69, 0x06, 0x0a, 0x08, 0x21, 0x09, 0x0a,
0x08, 0x2d, 0x09, 0x0a, 0x08, 0x27, 0x09, 0x0a, 0x08, 0x33, 0x09, 0x0a, 0x08, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x28, 0x28, 0x28, 0x28, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x88, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x41, 0x41, 0x41, 0x41, 0x41,
0x41, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00,
0x65, 0x03, 0x0a, 0x08, 0x1d, 0x05, 0x0a, 0x08, 0xbd, 0x05, 0x0a, 0x08, 0x35, 0x06, 0x0a, 0x08, 0x25, 0x07, 0x0a, 0x08, 0x71,
0x09, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0d, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc1, 0x0e, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x02, 0x00, 0x20, 0x00, 0x00, 0x2b, 0xa4, 0xe7, 0x1e, 0x84, 0x0f, 0x59, 0x6b, 0x81, 0x20, 0x03, 0x88, 0x2a,
0xae, 0x7c, 0xa6, 0x49, 0x6f, 0x15, 0x90, 0xca, 0x4a, 0x04, 0x93, 0x10, 0xaf, 0x76, 0xea, 0xf1, 0x1c, 0x94, 0x3a, 0x24, 0x00,
0xba, 0x4f, 0x59, 0xab};
SerialDebugOutput debugOutput(9600, ALL_LEVEL);
void flashTinker(); // forward declaration
bool uploaded = false;
void setup() {
Serial.begin(9600);
}
void loop() {
if (!uploaded) {
uploaded = true;
delay(5000);
flashTinker();
}
}
void flashTinker() {
FileTransfer::Descriptor file;
Serial.printlnf("starting flash size=%d", sizeof(tinker));
file.file_length = sizeof(tinker);
file.file_address = 0; // Automatically set to HAL_OTA_FlashAddress if store is FIRMWARE
file.chunk_address = 0;
file.chunk_size = 0; // use default
file.store = FileTransfer::Store::FIRMWARE;
int result = Spark_Prepare_For_Firmware_Update(file, 0, NULL);
if (result != 0) {
Serial.printlnf("prepare failed %d", result);
return;
}
Serial.printlnf("chunk_size=%d file_address=0x%x", file.chunk_size, file.file_address);
if (file.chunk_size == 0) {
file.chunk_size = 512;
}
// Note that Spark_Prepare_For_Firmware_Update sets file.file_address so it's not really zero here
// even though it's what we initialize it to above!
file.chunk_address = file.file_address;
size_t offset = 0;
while(offset < file.file_length) {
if (file.chunk_size > (file.file_length - offset)) {
file.chunk_size = (file.file_length - offset);
}
Serial.printlnf("chunk_address=0x%x chunk_size=%d", file.chunk_address, file.chunk_size);
result = Spark_Save_Firmware_Chunk(file, &tinker[offset], NULL);
if (result != 0) {
Serial.printlnf("save chunk failed %d", result);
return;
}
file.chunk_address += file.chunk_size;
offset += file.chunk_size;
}
result = Spark_Finish_Firmware_Update(file, 0x1, NULL);
if (result != 0) {
Serial.printlnf("finish failed %d", result);
return;
}
Serial.printlnf("update complete");
}
@gemfarmer

This comment has been minimized.

Copy link
Owner Author

gemfarmer commented Mar 12, 2019

In this example, the only difference between FlashTinkerWorking.ino and FlashTinkerFailing.ino is where tinker is instantiated. When it is instantiated before loop, it works, when it is instantiated in the loop it fails.

Interestingly enough, it looks like it routinely fails after the offset is at 121856, where successful flashes the offset makes it up to 261632.

starting flash size=3952
chunk_size=512 file_address=0x80c0000
offset=0 chunk_address=0x80c0000 chunk_size=512
offset=512 chunk_address=0x80c0200 chunk_size=512
offset=1024 chunk_address=0x80c0400 chunk_size=512
offset=1536 chunk_address=0x80c0600 chunk_size=512
offset=2048 chunk_address=0x80c0800 chunk_size=512
offset=2560 chunk_address=0x80c0a00 chunk_size=512
offset=3072 chunk_address=0x80c0c00 chunk_size=512
offset=3584 chunk_address=0x80c0e00 chunk_size=512
offset=4096 chunk_address=0x80c1000 chunk_size=512
offset=4608 chunk_address=0x80c1200 chunk_size=512
offset=5120 chunk_address=0x80c1400 chunk_size=512
offset=5632 chunk_address=0x80c1600 chunk_size=512
offset=6144 chunk_address=0x80c1800 chunk_size=512
offset=6656 chunk_address=0x80c1a00 chunk_size=512
offset=7168 chunk_address=0x80c1c00 chunk_size=512
offset=7680 chunk_address=0x80c1e00 chunk_size=512
offset=8192 chunk_address=0x80c2000 chunk_size=512
offset=8704 chunk_address=0x80c2200 chunk_size=512
offset=9216 chunk_address=0x80c2400 chunk_size=512
offset=9728 chunk_address=0x80c2600 chunk_size=512
offset=10240 chunk_address=0x80c2800 chunk_size=512
offset=10752 chunk_address=0x80c2a00 chunk_size=512
offset=11264 chunk_address=0x80c2c00 chunk_size=512
offset=11776 chunk_address=0x80c2e00 chunk_size=512
offset=12288 chunk_address=0x80c3000 chunk_size=512
offset=12800 chunk_address=0x80c3200 chunk_size=512
offset=13312 chunk_address=0x80c3400 chunk_size=512
offset=13824 chunk_address=0x80c3600 chunk_size=512
offset=14336 chunk_address=0x80c3800 chunk_size=512
offset=14848 chunk_address=0x80c3a00 chunk_size=512
offset=15360 chunk_address=0x80c3c00 chunk_size=512
offset=15872 chunk_address=0x80c3e00 chunk_size=512
offset=16384 chunk_address=0x80c4000 chunk_size=512
offset=16896 chunk_address=0x80c4200 chunk_size=512
offset=17408 chunk_address=0x80c4400 chunk_size=512
offset=17920 chunk_address=0x80c4600 chunk_size=512
offset=18432 chunk_address=0x80c4800 chunk_size=512
offset=18944 chunk_address=0x80c4a00 chunk_size=512
offset=19456 chunk_address=0x80c4c00 chunk_size=512
offset=19968 chunk_address=0x80c4e00 chunk_size=512
offset=20480 chunk_address=0x80c5000 chunk_size=512
offset=20992 chunk_address=0x80c5200 chunk_size=512
offset=21504 chunk_address=0x80c5400 chunk_size=512
offset=22016 chunk_address=0x80c5600 chunk_size=512
offset=22528 chunk_address=0x80c5800 chunk_size=512
offset=23040 chunk_address=0x80c5a00 chunk_size=512
offset=23552 chunk_address=0x80c5c00 chunk_size=512
offset=24064 chunk_address=0x80c5e00 chunk_size=512
offset=24576 chunk_address=0x80c6000 chunk_size=512
offset=25088 chunk_address=0x80c6200 chunk_size=512
offset=25600 chunk_address=0x80c6400 chunk_size=512
offset=26112 chunk_address=0x80c6600 chunk_size=512
offset=26624 chunk_address=0x80c6800 chunk_size=512
offset=27136 chunk_address=0x80c6a00 chunk_size=512
offset=27648 chunk_address=0x80c6c00 chunk_size=512
offset=28160 chunk_address=0x80c6e00 chunk_size=512
offset=28672 chunk_address=0x80c7000 chunk_size=512
offset=29184 chunk_address=0x80c7200 chunk_size=512
offset=29696 chunk_address=0x80c7400 chunk_size=512
offset=30208 chunk_address=0x80c7600 chunk_size=512
offset=30720 chunk_address=0x80c7800 chunk_size=512
offset=31232 chunk_address=0x80c7a00 chunk_size=512
offset=31744 chunk_address=0x80c7c00 chunk_size=512
offset=32256 chunk_address=0x80c7e00 chunk_size=512
offset=32768 chunk_address=0x80c8000 chunk_size=512
offset=33280 chunk_address=0x80c8200 chunk_size=512
offset=33792 chunk_address=0x80c8400 chunk_size=512
offset=34304 chunk_address=0x80c8600 chunk_size=512
offset=34816 chunk_address=0x80c8800 chunk_size=512
offset=35328 chunk_address=0x80c8a00 chunk_size=512
offset=35840 chunk_address=0x80c8c00 chunk_size=512
offset=36352 chunk_address=0x80c8e00 chunk_size=512
offset=36864 chunk_address=0x80c9000 chunk_size=512
offset=37376 chunk_address=0x80c9200 chunk_size=512
offset=37888 chunk_address=0x80c9400 chunk_size=512
offset=38400 chunk_address=0x80c9600 chunk_size=512
offset=38912 chunk_address=0x80c9800 chunk_size=512
offset=39424 chunk_address=0x80c9a00 chunk_size=512
offset=39936 chunk_address=0x80c9c00 chunk_size=512
offset=40448 chunk_address=0x80c9e00 chunk_size=512
offset=40960 chunk_address=0x80ca000 chunk_size=512
offset=41472 chunk_address=0x80ca200 chunk_size=512
offset=41984 chunk_address=0x80ca400 chunk_size=512
offset=42496 chunk_address=0x80ca600 chunk_size=512
offset=43008 chunk_address=0x80ca800 chunk_size=512
offset=43520 chunk_address=0x80caa00 chunk_size=512
offset=44032 chunk_address=0x80cac00 chunk_size=512
offset=44544 chunk_address=0x80cae00 chunk_size=512
offset=45056 chunk_address=0x80cb000 chunk_size=512
offset=45568 chunk_address=0x80cb200 chunk_size=512
offset=46080 chunk_address=0x80cb400 chunk_size=512
offset=46592 chunk_address=0x80cb600 chunk_size=512
offset=47104 chunk_address=0x80cb800 chunk_size=512
offset=47616 chunk_address=0x80cba00 chunk_size=512
offset=48128 chunk_address=0x80cbc00 chunk_size=512
offset=48640 chunk_address=0x80cbe00 chunk_size=512
offset=49152 chunk_address=0x80cc000 chunk_size=512
offset=49664 chunk_address=0x80cc200 chunk_size=512
offset=50176 chunk_address=0x80cc400 chunk_size=512
offset=50688 chunk_address=0x80cc600 chunk_size=512
offset=51200 chunk_address=0x80cc800 chunk_size=512
offset=51712 chunk_address=0x80cca00 chunk_size=512
offset=52224 chunk_address=0x80ccc00 chunk_size=512
offset=52736 chunk_address=0x80cce00 chunk_size=512
offset=53248 chunk_address=0x80cd000 chunk_size=512
offset=53760 chunk_address=0x80cd200 chunk_size=512
offset=54272 chunk_address=0x80cd400 chunk_size=512
offset=54784 chunk_address=0x80cd600 chunk_size=512
offset=55296 chunk_address=0x80cd800 chunk_size=512
offset=55808 chunk_address=0x80cda00 chunk_size=512
offset=56320 chunk_address=0x80cdc00 chunk_size=512
offset=56832 chunk_address=0x80cde00 chunk_size=512
offset=57344 chunk_address=0x80ce000 chunk_size=512
offset=57856 chunk_address=0x80ce200 chunk_size=512
offset=58368 chunk_address=0x80ce400 chunk_size=512
offset=58880 chunk_address=0x80ce600 chunk_size=512
offset=59392 chunk_address=0x80ce800 chunk_size=512
offset=59904 chunk_address=0x80cea00 chunk_size=512
offset=60416 chunk_address=0x80cec00 chunk_size=512
offset=60928 chunk_address=0x80cee00 chunk_size=512
offset=61440 chunk_address=0x80cf000 chunk_size=512
offset=61952 chunk_address=0x80cf200 chunk_size=512
offset=62464 chunk_address=0x80cf400 chunk_size=512
offset=62976 chunk_address=0x80cf600 chunk_size=512
offset=63488 chunk_address=0x80cf800 chunk_size=512
offset=64000 chunk_address=0x80cfa00 chunk_size=512
offset=64512 chunk_address=0x80cfc00 chunk_size=512
offset=65024 chunk_address=0x80cfe00 chunk_size=512
offset=65536 chunk_address=0x80d0000 chunk_size=512
offset=66048 chunk_address=0x80d0200 chunk_size=512
offset=66560 chunk_address=0x80d0400 chunk_size=512
offset=67072 chunk_address=0x80d0600 chunk_size=512
offset=67584 chunk_address=0x80d0800 chunk_size=512
offset=68096 chunk_address=0x80d0a00 chunk_size=512
offset=68608 chunk_address=0x80d0c00 chunk_size=512
offset=69120 chunk_address=0x80d0e00 chunk_size=512
offset=69632 chunk_address=0x80d1000 chunk_size=512
offset=70144 chunk_address=0x80d1200 chunk_size=512
offset=70656 chunk_address=0x80d1400 chunk_size=512
offset=71168 chunk_address=0x80d1600 chunk_size=512
offset=71680 chunk_address=0x80d1800 chunk_size=512
offset=72192 chunk_address=0x80d1a00 chunk_size=512
offset=72704 chunk_address=0x80d1c00 chunk_size=512
offset=73216 chunk_address=0x80d1e00 chunk_size=512
offset=73728 chunk_address=0x80d2000 chunk_size=512
offset=74240 chunk_address=0x80d2200 chunk_size=512
offset=74752 chunk_address=0x80d2400 chunk_size=512
offset=75264 chunk_address=0x80d2600 chunk_size=512
offset=75776 chunk_address=0x80d2800 chunk_size=512
offset=76288 chunk_address=0x80d2a00 chunk_size=512
offset=76800 chunk_address=0x80d2c00 chunk_size=512
offset=77312 chunk_address=0x80d2e00 chunk_size=512
offset=77824 chunk_address=0x80d3000 chunk_size=512
offset=78336 chunk_address=0x80d3200 chunk_size=512
offset=78848 chunk_address=0x80d3400 chunk_size=512
offset=79360 chunk_address=0x80d3600 chunk_size=512
offset=79872 chunk_address=0x80d3800 chunk_size=512
offset=80384 chunk_address=0x80d3a00 chunk_size=512
offset=80896 chunk_address=0x80d3c00 chunk_size=512
offset=81408 chunk_address=0x80d3e00 chunk_size=512
offset=81920 chunk_address=0x80d4000 chunk_size=512
offset=82432 chunk_address=0x80d4200 chunk_size=512
offset=82944 chunk_address=0x80d4400 chunk_size=512
offset=83456 chunk_address=0x80d4600 chunk_size=512
offset=83968 chunk_address=0x80d4800 chunk_size=512
offset=84480 chunk_address=0x80d4a00 chunk_size=512
offset=84992 chunk_address=0x80d4c00 chunk_size=512
offset=85504 chunk_address=0x80d4e00 chunk_size=512
offset=86016 chunk_address=0x80d5000 chunk_size=512
offset=86528 chunk_address=0x80d5200 chunk_size=512
offset=87040 chunk_address=0x80d5400 chunk_size=512
offset=87552 chunk_address=0x80d5600 chunk_size=512
offset=88064 chunk_address=0x80d5800 chunk_size=512
offset=88576 chunk_address=0x80d5a00 chunk_size=512
offset=89088 chunk_address=0x80d5c00 chunk_size=512
offset=89600 chunk_address=0x80d5e00 chunk_size=512
offset=90112 chunk_address=0x80d6000 chunk_size=512
offset=90624 chunk_address=0x80d6200 chunk_size=512
offset=91136 chunk_address=0x80d6400 chunk_size=512
offset=91648 chunk_address=0x80d6600 chunk_size=512
offset=92160 chunk_address=0x80d6800 chunk_size=512
offset=92672 chunk_address=0x80d6a00 chunk_size=512
offset=93184 chunk_address=0x80d6c00 chunk_size=512
offset=93696 chunk_address=0x80d6e00 chunk_size=512
offset=94208 chunk_address=0x80d7000 chunk_size=512
offset=94720 chunk_address=0x80d7200 chunk_size=512
offset=95232 chunk_address=0x80d7400 chunk_size=512
offset=95744 chunk_address=0x80d7600 chunk_size=512
offset=96256 chunk_address=0x80d7800 chunk_size=512
offset=96768 chunk_address=0x80d7a00 chunk_size=512
offset=97280 chunk_address=0x80d7c00 chunk_size=512
offset=97792 chunk_address=0x80d7e00 chunk_size=512
offset=98304 chunk_address=0x80d8000 chunk_size=512
offset=98816 chunk_address=0x80d8200 chunk_size=512
offset=99328 chunk_address=0x80d8400 chunk_size=512
offset=99840 chunk_address=0x80d8600 chunk_size=512
offset=100352 chunk_address=0x80d8800 chunk_size=512
offset=100864 chunk_address=0x80d8a00 chunk_size=512
offset=101376 chunk_address=0x80d8c00 chunk_size=512
offset=101888 chunk_address=0x80d8e00 chunk_size=512
offset=102400 chunk_address=0x80d9000 chunk_size=512
offset=102912 chunk_address=0x80d9200 chunk_size=512
offset=103424 chunk_address=0x80d9400 chunk_size=512
offset=103936 chunk_address=0x80d9600 chunk_size=512
offset=104448 chunk_address=0x80d9800 chunk_size=512
offset=104960 chunk_address=0x80d9a00 chunk_size=512
offset=105472 chunk_address=0x80d9c00 chunk_size=512
offset=105984 chunk_address=0x80d9e00 chunk_size=512
offset=106496 chunk_address=0x80da000 chunk_size=512
offset=107008 chunk_address=0x80da200 chunk_size=512
offset=107520 chunk_address=0x80da400 chunk_size=512
offset=108032 chunk_address=0x80da600 chunk_size=512
offset=108544 chunk_address=0x80da800 chunk_size=512
offset=109056 chunk_address=0x80daa00 chunk_size=512
offset=109568 chunk_address=0x80dac00 chunk_size=512
offset=110080 chunk_address=0x80dae00 chunk_size=512
offset=110592 chunk_address=0x80db000 chunk_size=512
offset=111104 chunk_address=0x80db200 chunk_size=512
offset=111616 chunk_address=0x80db400 chunk_size=512
offset=112128 chunk_address=0x80db600 chunk_size=512
offset=112640 chunk_address=0x80db800 chunk_size=512
offset=113152 chunk_address=0x80dba00 chunk_size=512
offset=113664 chunk_address=0x80dbc00 chunk_size=512
offset=114176 chunk_address=0x80dbe00 chunk_size=512
offset=114688 chunk_address=0x80dc000 chunk_size=512
offset=115200 chunk_address=0x80dc200 chunk_size=512
offset=115712 chunk_address=0x80dc400 chunk_size=512
offset=116224 chunk_address=0x80dc600 chunk_size=512
offset=116736 chunk_address=0x80dc800 chunk_size=512
offset=117248 chunk_address=0x80dca00 chunk_size=512
offset=117760 chunk_address=0x80dcc00 chunk_size=512
offset=118272 chunk_address=0x80dce00 chunk_size=512
offset=118784 chunk_address=0x80dd000 chunk_size=512
offset=119296 chunk_address=0x80dd200 chunk_size=512
offset=119808 chunk_address=0x80dd400 chunk_size=512
offset=120320 chunk_address=0x80dd600 chunk_size=512
offset=120832 chunk_address=0x80dd800 chunk_size=512
offset=121344 chunk_address=0x80dda00 chunk_size=512
offset=121856 chunk_address=0x80ddc00 chunk_size=512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.