Dual boot for arduino

Hi all,

      I would like to introduce a new dualboot feature which can be an add-on to any existing arduino boards. The additional requirement is an external i2c eeprom with minimum size of the internal flash memory.

Here I modified the arduino bootloader and added additional functionality to backup and swap/restore between main flash memory and external backup eeprom which is now like a dualboot system. When the reset button in arudino is pressed, it enters to the bootloader mode. In my case, in bootloader it checks if the pins 10 and 11 are shorted while reset is invoked. If yes, the on board LED will glow for 1 second. If I remove the short between pin10 and 11 before the LED turns OFF (1 second TURNOFF timeout) it enters to dualboot mode and start swapping the main flash memory with external eeprom memory till "32KB - bootloader size". Now the existing flash binary is saved in external eeprom and previous binary is booted to the memory and it started executing. If we do the same operation again then it repeats the memory swap process and then previous application is again loaded or reverted back by creating a new backup of the existing application binary. So now we can maintain two codes in hardware and can be selected at any time.

If we are not doing the pin shorting (11 and 10) while hardware reset, it works like a normal arduino bootloader ie we can use an arduino IDE and load any sketch to it. (here I am selecting UNO even my board is mini pro 16). So it is again arduino compatible, obviously it should be right?!

Source code:


  1. Hello,

    I would like to adapt yout dual boot system to a seeeduino stalker v3.1 to Add an Over-the Air Prpgramming functionnality :
    - I would load wirelessly the firmware to be updated into the added eprom
    - Then I would trigger the arduino reset wirelessly (I have already done that part)
    - At reset, the bootloader would check first inside the eprom and if if finds a sketch here, it would load it.

    Doi you think it would be possible ?

    Thank you !

  2. There was a time when everyone had colder kids booting their computers, running Linux on one-page Linux hacking and another gaming.
    In addition to the small-soldering capabilities, [Vinod] AVR-based Arduino wrote his own custom boot loader. When backup the AVR Flash, the boot loader can change the existing program to EEPROM when flashing the new program. For more information, read the
    When you think a boot loader is deep juju, a simple boot loader is written in the application C, which should be familiar to anyone working with Arduino. It's certainly size-optimized, but maybe not read.
    Can you test and run standard code on the same device? You can do the same thing over WiFi with an ESP8266. But did not you get WiFi? What, we'd like to hack and 'because you' have a good enough excuse for us. If you have a comment in mind, post in comments.There was a time when everyone had colder kids booting their computers, running Linux on one-page Linux hacking and another gaming. We know, we were there. But why would the heck occasionally want to open an adweno double? We are still scratching our heads about the application, but we know a cool hack when we see one; [Vinod] EPROM is sold for the smallest surface of the smallest little ABR chip.
    Well, so far this is the best means for us, but the failure is trying to get this job done. The editor seems to have dropped the program and does not answer, so some of us have opened a new thread on the Arduino Forum to try to get it working.One day it all stalled until I found an example of PetitFatFs, what I was doing exactly! AVR_BOOT provided the ability to run a sketch from the SD card. With little changes, it worked on the Advino Ethernet. Click Here GST Returns Filing

  3. This piece of blog shows dedication of writer.