dualoptiboot, reflash a sketch from ext flash chip

Hello

I am messing with dualoptiboot and so far I can get it to read the SPI flash chip and flash garbage to the mcu so it crashes next reset.

I have confirmed this with “FLXIMG:06:FFFFFF” in the flash chip and debug enabled so I can see that it recognizes the “sketch” in the flash chip i. e. finding “FLXIMG” and that it goes past the check to see if the number of bytes is even. And also re-flashing the mcu cause next reset it crashes and flash chip is erased.

https://github.com/LowPowerLab/DualOptiboot

What I am having a hard time with is…

1. If I have lets say a 1024 bytes long sketch how do I convert 1024 to a “two size bytes” value. (NOTE: the github readme says 4 byte size but the actual code uses 2.)

  //check if any flash image exists on external FLASH chip
  if (FLASH_readByte(0)=='F' && FLASH_readByte(1)=='L' && FLASH_readByte(2)=='X' && FLASH_readByte(6)==':' && FLASH_readByte(9)==':')
  {


    uint16_t imagesize = (FLASH_readByte(7)<<8) | FLASH_readByte(8);
    if (imagesize%2!=0) return; //basic check that we got even # of bytes

2. “… are the de-hexified bytes of the flash pages to be burned”. Can someone explain de-hexified? For example if I use the example below of Arduino Blink example.

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

In the Arduino IDE (Pro Mini @8MHz) i use “Export compiled Binary” and the hex file without bootloader contains:

:100000000C945C000C946E000C946E000C946E00CA
:100010000C946E000C946E000C946E000C946E00A8
:100020000C946E000C946E000C946E000C946E0098
:100030000C946E000C946E000C946E000C946E0088
:100040000C9416010C946E000C946E000C946E00CF
:100050000C946E000C946E000C946E000C946E0068
:100060000C946E000C946E00000000002400270029
:100070002A0000000000250028002B0004040404CE
:100080000404040402020202020203030303030342
:10009000010204081020408001020408102001021F
:1000A00004081020000000080002010000030407FB
:1000B000000000000000000011241FBECFEFD8E0B8
:1000C000DEBFCDBF21E0A0E0B1E001C01D92A930AC
:1000D000B207E1F70E9460010C94CF010C9400007C
:1000E000E1EBF0E09491EDE9F0E02491E9E8F0E053
:1000F000E491EE2309F43CC0992339F1933091F057
:1001000038F49130A9F0923001F594B59F7D12C07A
:10011000973091F09830A1F09430B9F4909180002C
:100120009F7D03C0909180009F77909380000DC0C9
:1001300094B59F7794BD09C09091B0009F7703C09C
:100140009091B0009F7D9093B000F0E0EE0FFF1F04
:10015000EE58FF4FA591B4919FB7F894811104C058
:100160008C912095282302C0EC912E2B2C939FBFBD
:1001700008953FB7F8948091050190910601A091F0
:100180000701B091080126B5A89B05C02F3F19F0C3
:100190000196A11DB11D3FBFBA2FA92F982F882707
:1001A000820F911DA11DB11DBC01CD0143E0660F61
:1001B000771F881F991F4A95D1F708958F929F92B4
:1001C000AF92BF92CF92DF92EF92FF920E94B9005E
:1001D0004B015C0188EEC82E83E0D82EE12CF12C77
:1001E0000E94B900DC01CB0188199909AA09BB0951
:1001F000883E9340A105B10598F321E0C21AD108C9
:10020000E108F10888EE880E83E0981EA11CB11C5D
:10021000C114D104E104F10419F7FF90EF90DF90CD
:10022000CF90BF90AF909F908F9008951F920F92A4
:100230000FB60F9211242F933F938F939F93AF93F9
:10024000BF938091010190910201A0910301B091AF
:1002500004013091000126E0230F2D3720F402968F
:10026000A11DB11D05C029E8230F0396A11DB11DD5
:10027000209300018093010190930201A093030158
:10028000B09304018091050190910601A0910701AE
:10029000B09108010196A11DB11D809305019093B5
:1002A0000601A0930701B0930801BF91AF919F9100
:1002B0008F913F912F910F900FBE0F901F90189527
:1002C000789484B5826084BD84B5816084BD85B531
:1002D000826085BD85B5816085BD80916E0081603D
:1002E00080936E00109281008091810082608093E3
:1002F00081008091810081608093810080918000E5
:100300008160809380008091B10084608093B1000F
:100310008091B00081608093B00080917A00846009
:1003200080937A0080917A00826080937A00809135
:100330007A008E7F80937A0080917A008068809323
:100340007A001092C100EDE9F0E02491E9E8F0E0D4
:100350008491882399F090E0880F991FFC01E85957
:10036000FF4FA591B491FC01EE58FF4F85919491F8
:100370008FB7F894EC91E22BEC938FBFC0E0D0E004
:1003800081E00E9470000E94DE0080E00E94700008
:100390000E94DE002097A1F30E940000F1CFF894A4
:0203A000FFCF8D
:00000001FF

As an example what should the flash chip contain for the above?

Best regards

  1. If I have lets say a 1024 bytes long sketch how do I convert 1024 to a "two size bytes" value. (NOTE: the github readme says 4 byte size but the actual code uses 2.)
int twoByteValue = 1024;

Juraj:
Intel HEX - Wikipedia

PaulS:

int twoByteValue = 1024;

That I understand it is more the decimal to 2 bytes conversion but I guess 0 = 00000000 00000000 and 65,535 = 11111111 11111111… I was writing chars to the flash chip and I it was confusing me…

Obviously I need to study up on those bytes bits and hex but it never seem to stick lol

Thank you anyhow

I figured it out, may as well post my code and notes here to help someone as stupid as me… Code is shit so use it as reference and to get up and running…

#include <SPI.h>

#define SSMEM 8  //SS Winbond, dualoptiboot expects SS on pin 8 (pro mini)

#define SPIMAXSPEED     2000000
#define SPIDATAORDER    MSBFIRST
#define SPIDATAMODE     SPI_MODE0


// void setup() {
  // Serial.begin(9600);
  // Serial.println("START");
// }

// void loop() {
  // Serial.println("LALA");
  // delay(1000);
// }

// Extracted data from intel hex file for code above:

// COMPILED FOR PRO MINI @8 MHZ!!
const char data[] PROGMEM = {
"0C9435000C945D000C945D000C945D00"
"0C945D000C945D000C945D000C945D00"
"0C945D000C945D000C945D000C945D00"
"0C945D000C945D000C945D000C945D00"
"0C94A8010C945D000C9418020C94F201"
"0C945D000C945D000C945D000C945D00"
"0C945D000C945D00FC0211241FBECFEF"
"D8E0DEBFCDBF11E0A0E0B1E0ECE6F6E0"
"02C005900D92A032B107D9F721E0A0E2"
"B1E001C01D92A63CB207E1F710E0C5E3"
"D0E004C02197FE010E942903C433D107"
"C9F70E944A020C9434030C9400003FB7"
"F8948091250190912601A0912701B091"
"280126B5A89B05C02F3F19F00196A11D"
"B11D3FBFBA2FA92F982F8827820F911D"
"A11DB11DBC01CD0143E0660F771F881F"
"991F4A95D1F70895CF92DF92EF92FF92"
"0F931F93CF93DF936C017A018B01C0E0"
"D0E0CE15DF0581F0D8016D918D01D601"
"ED91FC910190F081E02DC6010995892B"
"11F02196EECF7E01C701DF91CF911F91"
"0F91FF90EF90DF90CF900895089580E0"
"90E00895FC01538D448D252F30E0842F"
"90E0821B930B541710F0CF9608950197"
"0895FC01918D828D981761F0828DDF01"
"A80FB11D5D968C91928D9F5F9F73928F"
"90E008958FEF9FEF0895FC01918D828D"
"981731F0828DE80FF11D858D90E00895"
"8FEF9FEF0895FC01918D228D892F90E0"
"805C9F4F821B91098F739927089589E2"
"91E00E94E30021E0892B09F420E0822F"
"0895FC01848DDF01A80FB11DA35ABF4F"
"2C91848D90E001968F739927848FA689"
"B7892C93A089B1898C91837080648C93"
"938D848D981306C00288F389E02D8081"
"8F7D80830895EF92FF920F931F93CF93"
"DF93EC0181E0888F9B8D8C8D981305C0"
"E889F989808185FD26C0F62E0B8D10E0"
"0F5F1F4F0F731127E02E8C8DE8120CC0"
"0FB607FCFACFE889F989808185FFF5CF"
"CE010E94F900F1CF8B8DFE01E80FF11D"
"E35AFF4FF0829FB7F8940B8FEA89FB89"
"808180620AC09FB7F894EE89FF896083"
"E889F98980818370806480839FBF81E0"
"90E0DF91CF911F910F91FF90EF900895"
"CF93DF93EC01888D8823C9F0EA89FB89"
"808185FD05C0A889B9898C9186FD0FC0"
"0FB607FCF5CF808185FFF2CFA889B989"
"8C9185FFEDCFCE010E94F900E7CFDF91"
"CF91089580E090E0892B29F00E94EF00"
"81110C9400000895009769F0FC010190"
"0020E9F73197AF01481B590BBC0189E2"
"91E00C94840080E090E008950E942F03"
"1F920F920FB60F9211242F933F938F93"
"9F93AF93BF938091210190912201A091"
"2301B09124013091200126E0230F2D37"
"20F40296A11DB11D05C029E8230F0396"
"A11DB11D209320018093210190932201"
"A0932301B09324018091250190912601"
"A0912701B09128010196A11DB11D8093"
"250190932601A0932701B0932801BF91"
"AF919F918F913F912F910F900FBE0F90"
"1F9018951F920F920FB60F9211242F93"
"3F934F935F936F937F938F939F93AF93"
"BF93EF93FF9389E291E00E94F900FF91"
"EF91BF91AF919F918F917F916F915F91"
"4F913F912F910F900FBE0F901F901895"
"1F920F920FB60F9211242F938F939F93"
"EF93FF93E0913901F0913A018081E091"
"3F01F091400182FD12C0908180914201"
"8F5F8F7320914301821751F0E0914201"
"F0E0E75DFE4F958F8093420101C08081"
"FF91EF919F918F912F910F900FBE0F90"
"1F901895789484B5826084BD84B58160"
"84BD85B5826085BD85B5816085BD8091"
"6E00816080936E001092810080918100"
"82608093810080918100816080938100"
"809180008160809380008091B1008460"
"8093B1008091B00081608093B0008091"
"7A00846080937A0080917A0082608093"
"7A0080917A008E7F80937A0080917A00"
"806880937A001092C100E0913901F091"
"3A0182E08083E0913501F09136011082"
"E0913701F091380187E6808310924101"
"E0913D01F0913E0186E08083E0913B01"
"F0913C01808180618083E0913B01F091"
"3C01808188608083E0913B01F0913C01"
"808180688083E0913B01F0913C018081"
"8F7D808382E191E00E94940188E191E0"
"0E9494018BE191E00E94940188E191E0"
"0E9494010E945F004B015C0188EEC82E"
"83E0D82EE12CF12C0E945F00DC01CB01"
"88199909AA09BB09883E9340A105B105"
"98F321E0C21AD108E108F10888EE880E"
"83E0981EA11CB11CC114D104E104F104"
"19F70E948A01CECFE9E2F1E013821282"
"88EE93E0A0E0B0E084839583A683B783"
"84E091E09183808385EC90E095878487"
"84EC90E09787868780EC90E0918B808B"
"81EC90E0938B828B82EC90E0958B848B"
"86EC90E0978B868B118E128E138E148E"
"0895EE0FFF1F0590F491E02D099481E0"
"90E0F8940C943403F894FFCF"
"000000001B018400B2006801E300C100"
"D5005354415254000D0A004C414C4100"
};

char hexbuf[3];
int num;

void setup() {

    Serial.begin(9600);
    Serial.println("\r\n\nSTARTUP");
    
    SPI.begin();

    digitalWrite(SSMEM, HIGH); // Disable flash chip before setting as output.
    //Also use external pull-up on SS so de-activate flash chip when burning bootloader.

    pinMode(SSMEM, OUTPUT);

    Serial.println("ERASE START");
    bulkErase();
    Serial.println("ERASE STOP");
    
    programByte(0, 'F');
    programByte(1, 'L');
    programByte(2, 'X');
    programByte(3, 'I');
    programByte(4, 'M');
    programByte(5, 'G');
    programByte(6, ':');
    // Total bytes is 1676 = 68C (0x06 0x8C) https://www.binaryhexconverter.com/decimal-to-hex-converter
    programByte(7, 0x06);
    programByte(8, 0x8C);
    programByte(9, ':');
    
    unsigned int i = 0;
    for (unsigned int j = 10; i < strlen(data); j++) {
        
        // Copy each "char" in memory to a 2 char string buffer.
        hexbuf[0] = pgm_read_byte_near(data + i);
        hexbuf[1] = pgm_read_byte_near(data + i+1);
        hexbuf[2] = '\0';
        
        num = (int)strtol(hexbuf, NULL, 16); // Convert to hex pair = one byte = int

        programByte(j, num); // num is now int = byte = hex pair
        Serial.println(num); // Print for reference (prints decimal value)
        
        i = i+2;
    }
    
    Serial.print("\r\n\n\ni: ");
    Serial.println(i);
    Serial.print("\r\n\n\nbytes: ");
    Serial.println(i/2);
    
    // When code gets here just push the reset button and the new sketch should be loaded!
}

void loop() {

}

// Functions below extracted from SPIMemory library if my memory serves me correct.
// https://github.com/Marzogh/SPIMemory

void bulkErase() {

    while(isBusy()) delay(0);
    enableWrite(); //write is disabled automatically afterwards

    SPI.beginTransaction(SPISettings(SPIMAXSPEED, SPIDATAORDER, SPIDATAMODE));
    digitalWrite(SSMEM, LOW);
    SPI.transfer(0xc7);
    digitalWrite(SSMEM, HIGH);
    SPI.endTransaction();

    while(isBusy()) delay(0); //BULK_ERASE can take awhile, lets just wait until it completes
}

byte readByte(uint32_t addr) {
    while(isBusy()) delay(0);

    SPI.beginTransaction(SPISettings(SPIMAXSPEED, SPIDATAORDER, SPIDATAMODE));
    digitalWrite(SSMEM, LOW);
    SPI.transfer(0x03);
    sendAddress(addr);
    byte value = SPI.transfer(0);
    digitalWrite(SSMEM, HIGH);
    SPI.endTransaction();

    return value;
}

void sendAddress(uint32_t addr) {

    SPI.transfer((addr & 0xff0000) >> 16); //addr 0
    SPI.transfer((addr & 0xff00) >> 8); //addr 1
    SPI.transfer((addr & 0xff)); //addr 2
}

void enableWrite() {
    
    SPI.beginTransaction(SPISettings(SPIMAXSPEED, SPIDATAORDER, SPIDATAMODE));
    digitalWrite(SSMEM, LOW);
    SPI.transfer(0x06);
    digitalWrite(SSMEM, HIGH);
    SPI.endTransaction();
}

boolean isBusy() {
    return readStatus() & (1 << 0); //LSB is WIP
}

void programByte(uint32_t addr, byte b) {

    while(isBusy()) delay(0);

    enableWrite(); //write is disabled automatically afterwards

    SPI.beginTransaction(SPISettings(SPIMAXSPEED, SPIDATAORDER, SPIDATAMODE));
    digitalWrite(SSMEM, LOW);
    SPI.transfer(0x02);
    sendAddress(addr);
    SPI.transfer(b);
    digitalWrite(SSMEM, HIGH);
    SPI.endTransaction();
}

byte readStatus() {
    
    SPI.beginTransaction(SPISettings(SPIMAXSPEED, SPIDATAORDER, SPIDATAMODE));
    digitalWrite(SSMEM, LOW);
    SPI.transfer(0x05);
    byte status = SPI.transfer(0);
    digitalWrite(SSMEM, HIGH);
    SPI.endTransaction();
    
    return status;
}

Just some notes

Export intel hex file = Ardunio IDE > Export compiled binary > choose hex file without bootloader.

--actual data extracted dual qoutes added--

"0C9435000C945D000C945D000C945D00"
"0C945D000C945D000C945D000C945D00"
"0C945D000C945D000C945D000C945D00"
"0C945D000C945D000C945D000C945D00"
"0C94A8010C945D000C9418020C94F201"
"0C945D000C945D000C945D000C945D00"
"0C945D000C945D00FC0211241FBECFEF"
"D8E0DEBFCDBF11E0A0E0B1E0ECE6F6E0"
"02C005900D92A032B107D9F721E0A0E2"
"B1E001C01D92A63CB207E1F710E0C5E3"
"D0E004C02197FE010E942903C433D107"
"C9F70E944A020C9434030C9400003FB7"
"F8948091250190912601A0912701B091"
"280126B5A89B05C02F3F19F00196A11D"
"B11D3FBFBA2FA92F982F8827820F911D"
"A11DB11DBC01CD0143E0660F771F881F"
"991F4A95D1F70895CF92DF92EF92FF92"
"0F931F93CF93DF936C017A018B01C0E0"
"D0E0CE15DF0581F0D8016D918D01D601"
"ED91FC910190F081E02DC6010995892B"
"11F02196EECF7E01C701DF91CF911F91"
"0F91FF90EF90DF90CF900895089580E0"
"90E00895FC01538D448D252F30E0842F"
"90E0821B930B541710F0CF9608950197"
"0895FC01918D828D981761F0828DDF01"
"A80FB11D5D968C91928D9F5F9F73928F"
"90E008958FEF9FEF0895FC01918D828D"
"981731F0828DE80FF11D858D90E00895"
"8FEF9FEF0895FC01918D228D892F90E0"
"805C9F4F821B91098F739927089589E2"
"91E00E94E30021E0892B09F420E0822F"
"0895FC01848DDF01A80FB11DA35ABF4F"
"2C91848D90E001968F739927848FA689"
"B7892C93A089B1898C91837080648C93"
"938D848D981306C00288F389E02D8081"
"8F7D80830895EF92FF920F931F93CF93"
"DF93EC0181E0888F9B8D8C8D981305C0"
"E889F989808185FD26C0F62E0B8D10E0"
"0F5F1F4F0F731127E02E8C8DE8120CC0"
"0FB607FCFACFE889F989808185FFF5CF"
"CE010E94F900F1CF8B8DFE01E80FF11D"
"E35AFF4FF0829FB7F8940B8FEA89FB89"
"808180620AC09FB7F894EE89FF896083"
"E889F98980818370806480839FBF81E0"
"90E0DF91CF911F910F91FF90EF900895"
"CF93DF93EC01888D8823C9F0EA89FB89"
"808185FD05C0A889B9898C9186FD0FC0"
"0FB607FCF5CF808185FFF2CFA889B989"
"8C9185FFEDCFCE010E94F900E7CFDF91"
"CF91089580E090E0892B29F00E94EF00"
"81110C9400000895009769F0FC010190"
"0020E9F73197AF01481B590BBC0189E2"
"91E00C94840080E090E008950E942F03"
"1F920F920FB60F9211242F933F938F93"
"9F93AF93BF938091210190912201A091"
"2301B09124013091200126E0230F2D37"
"20F40296A11DB11D05C029E8230F0396"
"A11DB11D209320018093210190932201"
"A0932301B09324018091250190912601"
"A0912701B09128010196A11DB11D8093"
"250190932601A0932701B0932801BF91"
"AF919F918F913F912F910F900FBE0F90"
"1F9018951F920F920FB60F9211242F93"
"3F934F935F936F937F938F939F93AF93"
"BF93EF93FF9389E291E00E94F900FF91"
"EF91BF91AF919F918F917F916F915F91"
"4F913F912F910F900FBE0F901F901895"
"1F920F920FB60F9211242F938F939F93"
"EF93FF93E0913901F0913A018081E091"
"3F01F091400182FD12C0908180914201"
"8F5F8F7320914301821751F0E0914201"
"F0E0E75DFE4F958F8093420101C08081"
"FF91EF919F918F912F910F900FBE0F90"
"1F901895789484B5826084BD84B58160"
"84BD85B5826085BD85B5816085BD8091"
"6E00816080936E001092810080918100"
"82608093810080918100816080938100"
"809180008160809380008091B1008460"
"8093B1008091B00081608093B0008091"
"7A00846080937A0080917A0082608093"
"7A0080917A008E7F80937A0080917A00"
"806880937A001092C100E0913901F091"
"3A0182E08083E0913501F09136011082"
"E0913701F091380187E6808310924101"
"E0913D01F0913E0186E08083E0913B01"
"F0913C01808180618083E0913B01F091"
"3C01808188608083E0913B01F0913C01"
"808180688083E0913B01F0913C018081"
"8F7D808382E191E00E94940188E191E0"
"0E9494018BE191E00E94940188E191E0"
"0E9494010E945F004B015C0188EEC82E"
"83E0D82EE12CF12C0E945F00DC01CB01"
"88199909AA09BB09883E9340A105B105"
"98F321E0C21AD108E108F10888EE880E"
"83E0981EA11CB11CC114D104E104F104"
"19F70E948A01CECFE9E2F1E013821282"
"88EE93E0A0E0B0E084839583A683B783"
"84E091E09183808385EC90E095878487"
"84EC90E09787868780EC90E0918B808B"
"81EC90E0938B828B82EC90E0958B848B"
"86EC90E0978B868B118E128E138E148E"
"0895EE0FFF1F0590F491E02D099481E0"
"90E0F8940C943403F894FFCF"
"000000001B018400B2006801E300C100"
"D5005354415254000D0A004C414C4100"


--orig intel hex--

:100000000C9435000C945D000C945D000C945D0024
:100010000C945D000C945D000C945D000C945D00EC
:100020000C945D000C945D000C945D000C945D00DC
:100030000C945D000C945D000C945D000C945D00CC
:100040000C94A8010C945D000C9418020C94F2011D
:100050000C945D000C945D000C945D000C945D00AC
:100060000C945D000C945D00FC0211241FBECFEFC8
:10007000D8E0DEBFCDBF11E0A0E0B1E0ECE6F6E0F5
:1000800002C005900D92A032B107D9F721E0A0E29D
:10009000B1E001C01D92A63CB207E1F710E0C5E354
:1000A000D0E004C02197FE010E942903C433D10788
:1000B000C9F70E944A020C9434030C9400003FB725
:1000C000F8948091250190912601A0912701B0918B
:1000D000280126B5A89B05C02F3F19F00196A11D48
:1000E000B11D3FBFBA2FA92F982F8827820F911DCE
:1000F000A11DB11DBC01CD0143E0660F771F881F14
:10010000991F4A95D1F70895CF92DF92EF92FF920F
:100110000F931F93CF93DF936C017A018B01C0E0A3
:10012000D0E0CE15DF0581F0D8016D918D01D601AB
:10013000ED91FC910190F081E02DC6010995892B8C
:1001400011F02196EECF7E01C701DF91CF911F9173
:100150000F91FF90EF90DF90CF900895089580E089
:1001600090E00895FC01538D448D252F30E0842FBD
:1001700090E0821B930B541710F0CF9608950197CF
:100180000895FC01918D828D981761F0828DDF01B9
:10019000A80FB11D5D968C91928D9F5F9F73928F7A
:1001A00090E008958FEF9FEF0895FC01918D828D6F
:1001B000981731F0828DE80FF11D858D90E008953C
:1001C0008FEF9FEF0895FC01918D228D892F90E094
:1001D000805C9F4F821B91098F739927089589E254
:1001E00091E00E94E30021E0892B09F420E0822FB6
:1001F0000895FC01848DDF01A80FB11DA35ABF4FE4
:100200002C91848D90E001968F739927848FA68915
:10021000B7892C93A089B1898C91837080648C9369
:10022000938D848D981306C00288F389E02D808118
:100230008F7D80830895EF92FF920F931F93CF934A
:10024000DF93EC0181E0888F9B8D8C8D981305C026
:10025000E889F989808185FD26C0F62E0B8D10E096
:100260000F5F1F4F0F731127E02E8C8DE8120CC00B
:100270000FB607FCFACFE889F989808185FFF5CFB1
:10028000CE010E94F900F1CF8B8DFE01E80FF11D28
:10029000E35AFF4FF0829FB7F8940B8FEA89FB89EE
:1002A000808180620AC09FB7F894EE89FF896083DD
:1002B000E889F98980818370806480839FBF81E0B1
:1002C00090E0DF91CF911F910F91FF90EF900895F3
:1002D000CF93DF93EC01888D8823C9F0EA89FB89ED
:1002E000808185FD05C0A889B9898C9186FD0FC0E4
:1002F0000FB607FCF5CF808185FFF2CFA889B989B9
:100300008C9185FFEDCFCE010E94F900E7CFDF9100
:10031000CF91089580E090E0892B29F00E94EF00B2
:1003200081110C9400000895009769F0FC01019080
:100330000020E9F73197AF01481B590BBC0189E256
:1003400091E00C94840080E090E008950E942F03D7
:100350001F920F920FB60F9211242F933F938F93FA
:100360009F93AF93BF938091210190912201A0911F
:100370002301B09124013091200126E0230F2D3775
:1003800020F40296A11DB11D05C029E8230F039694
:10039000A11DB11D20932001809321019093220182
:1003A000A0932301B093240180912501909126010F
:1003B000A0912701B09128010196A11DB11D809344
:1003C000250190932601A0932701B0932801BF91A6
:1003D000AF919F918F913F912F910F900FBE0F90F2
:1003E0001F9018951F920F920FB60F9211242F9302
:1003F0003F934F935F936F937F938F939F93AF93AD
:10040000BF93EF93FF9389E291E00E94F900FF917F
:10041000EF91BF91AF919F918F917F916F915F917C
:100420004F913F912F910F900FBE0F901F901895F5
:100430001F920F920FB60F9211242F938F939F93B9
:10044000EF93FF93E0913901F0913A018081E091BF
:100450003F01F091400182FD12C0908180914201E4
:100460008F5F8F7320914301821751F0E091420119
:10047000F0E0E75DFE4F958F8093420101C08081DF
:10048000FF91EF919F918F912F910F900FBE0F9041
:100490001F901895789484B5826084BD84B581607E
:1004A00084BD85B5826085BD85B5816085BD80913F
:1004B0006E00816080936E001092810080918100B7
:1004C00082608093810080918100816080938100AF
:1004D000809180008160809380008091B100846071
:1004E0008093B1008091B00081608093B0008091D2
:1004F0007A00846080937A0080917A008260809391
:100500007A0080917A008E7F80937A0080917A00C1
:10051000806880937A001092C100E0913901F091D7
:100520003A0182E08083E0913501F091360110823A
:10053000E0913701F091380187E680831092410104
:10054000E0913D01F0913E0186E08083E0913B0126
:10055000F0913C01808180618083E0913B01F091CA
:100560003C01808188608083E0913B01F0913C01F7
:10057000808180688083E0913B01F0913C01808123
:100580008F7D808382E191E00E94940188E191E077
:100590000E9494018BE191E00E94940188E191E036
:1005A0000E9494010E945F004B015C0188EEC82EFE
:1005B00083E0D82EE12CF12C0E945F00DC01CB01FE
:1005C00088199909AA09BB09883E9340A105B1057C
:1005D00098F321E0C21AD108E108F10888EE880EEC
:1005E00083E0981EA11CB11CC114D104E104F104E4
:1005F00019F70E948A01CECFE9E2F1E0138212825C
:1006000088EE93E0A0E0B0E084839583A683B7836F
:1006100084E091E09183808385EC90E095878487E6
:1006200084EC90E09787868780EC90E0918B808BBC
:1006300081EC90E0938B828B82EC90E0958B848BA5
:1006400086EC90E0978B868B118E128E138E148E13
:100650000895EE0FFF1F0590F491E02D099481E0BD
:0C06600090E0F8940C943403F894FFCF61
:10066C00000000001B018400B2006801E300C1001F
:10067C00D5005354415254000D0A004C414C4100DA
:00000001FF

--from arduino code for pro mini 8mhz--

void setup() {
  Serial.begin(9600);
  Serial.println("START");
}

void loop() {
  Serial.println("LALA");
  delay(1000);
}