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. This piece of blog shows dedication of writer.