Updating Arduino Bootloader

LinkIt Smart 7688 Duo development board is pre-programmed with Arduino bootloader in the microcontroller (ATmega32U4). There is no need to program the bootloader, unless it's damaged or requires re-programming. One of the following methods can be applied to update the bootloader.

Using AVRDUDE from OpenWrt SDK

You can also program ATmega32U4 from Linux (MT7688AN). The system image is preloaded with AVRDUDE package to enable programming the ATmega32U4. AVRDUDE is a command line tool for flashing codes to MCU on Linux.

  1. Copy the bootloader file to a storage device (USB drive or SD card) or to your computer. The bootloader file is located in the following path: 

  2. Transfer the bootloader to LinkIt Smart 7688 Duo development board. You can use a storage device or scp tool to transfer the bootloader. In this example, a USB drive named USB-A1 is used. Attach the USB drive to the board and in the system console, go to the root directory with the following command:

    cd /Media/USB-A1  
  3. In the system console, execute the following command:

    avrdude -p m32u4 -c linuxgpio -v -e -U flash:w:Caterina-smart7688.hex -U lock:w:0x0f:m  

    Replace Caterina-smart7688.hex with the actual name of your Arduino bootloader file.

After the bootloader is programmed into the ATmega32U4, you should a similar output: 

For other command options, refer to AVRDUDE package.

Using two boards

You can also use two LinkIt Smart 7688 Duo development boards to program the Arduino bootloader.

In the following example, there are two LinkIt Smart 7688 Duo boards called A and B. The first board A will act as the programmer to program the second board B.

  1. In Arduino IDE, go navigate to Tools then Board and select LinkIt Smart 7688 Duo.
  2. Open the sketch ArduinoISP under Examples. 
  3. Replace the code line #define RESET SS with #define RESET 10
  4. Upload the modified sketch to board A.
  5. Connect pins S0, S1, S2, GND of board A to the same pins of board B.
  6. Connect pin D10 of board A to pin RST of board B.
  7. In Arduino IDE, click Tools then Programmer and select LinkIt Smart 7688 Duo as ISP.
  8. Finally, click Tools and then Burn Bootloader.

The Arduino IDE will output update result in the log window.