Restore Initial Mode on Specific Boards

Some sections in this chapter require embedXcode+. This section provides the procedures for restoring the initial mode on specific boards.

  • Burn the boot-loader on the Arduino boards to use the standard USB uploader after the programmer,

  • Burn the boot-loader on the chipKIT boards to use the standard USB uploader after the programmer,

  • Restore the initial WiFi mode with AT commands after using the ESP8266 board with the Wiring / Arduino framework, and

  • Restore the Arduino boot-loader after using the mbed mode on the RedBear boards.

Burn the Boot-Loader for Adafruit Feather M0 Boards

This section requires embedXcode+.

The programmer may erase all the flash of the Feather M0 board, including the boot-loader. In such a case, you need to burn the boot-loader again to upload a sketch through the standard USB connection.

To burn the boot-loader again,

$ /Applications/IDE/SEGGER/JLink_V60g/JLinkExe
Connect and define the interface, device and speed.
J-Link>connect
J-Link>selectinterface swd
J-Link>device ATSAMD21G18
J-Link>speed 400080
Upload the boot-loader and quit. 
J-Link>loadfile ~/Downloads/featherm0bootloader_160305.hex
J-Link>exit

You can now upload the sketch to the Adafruit Feather M0 board using the standard USB connection again.

For more informations,

Burn the Boot-Loader After Using a Programmer for Arduino Boards

This section requires embedXcode+.

 The programmer erases all the flash, including the boot-loader.

After having used a programmer with the Arduino boards, you need to burn the boot-loader again to upload a sketch through the standard USB connection.

Restore Boot-Loader for AVR-Based Arduino Boards

To burn the boot-loader on AVR-based Arduino boards again,

  • Launch the Arduino IDE.

  • Select the board, here the Arduino Uno board.

  • Select the programmer, here the USBtinyASP programmer.

  • Click on Burn Boot-Loader.

You can now upload the sketch to the board using the standard USB connection again.

For more informations,

Change Boot-Loader for AVR-Based Arduino Boards

The same procedure applies for changing the boot-loader. For example, for using the MiniCore boot-loader on the Arduino Uno board:

https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json
  • Download and install the MiniCore package, as per the procedure Install Additional Boards on Arduino .

  • Flash the MiniCore boot-loader on the Arduino Uno with USBtinyISP or similar.

On embedXcode,

  • Edit the Arduino Uno board or the My Board configuration file, and add
BOOTLOADER = minicore
  • Select it.

For more information on the MiniCore boot-loader,

Restore Boot-Loader for Arduino Zero

The two boards, Arduino Zero and Arduino M0 Pro, are very similar but require different procedures.

For the Arduino M0 Pro board,

To burn the boot-loader on the Arduino Zero board again,

  • Launch the Arduino IDE.

  • Connect the board using the USB programming port.

  • Call the from the menu Tools > Board menu and select the board, here Arduino Zero (programming port).

  • Call the Tools > Programmer menu and select the programmer, here Atmel EDBG.

  • Click on Burn Boot-Loader.

For more informations,

You can now upload the sketch to the board using the standard USB connection again.

Restore Boot-Loader for Arduino M0 Pro

To burn the boot-loader on the M0 Pro board again, a first option relies on the Arduino IDE, very similar to the Restore Boot-Loader for Arduino Zero procedure.

  • Launch the Arduino IDE.

  • Connect the board using the USB programming port.

  • Call the from the menu Tools > Board menu and select the board, here Arduino M0 Pro (programming port).

  • Call the Tools > Programmer menu and select the programmer, here Atmel EDBG Programming Port.

  • Click on Burn Boot-Loader.

For more informations,

In case this first option fails. try and use the Atmel Studio, available on Windwos only.

For more informations,

Depending on the version of OpenOCD, a bug may prevent from restoring the boot-loader. The bug is referenced under issue 137  on the Arduino Git repository. In that case,

  • Follow this procedure , also mentioned in this thread  on the Arduino forum.

You can now upload the sketch to the board using the standard USB connection again.

Burn the Boot-Loader After Using a Programmer on chipKIT Boards

This section requires embedXcode+.

 On the chipKIT boards, the programmer erases all the flash, including the boot-loader.

After having used the chipKIT programmer, you need to burn to boot-loader again in order to upload a sketch through the standard USB connection.

To burn the boot-loader again,

  • Download and unzip the boot-loaders from the GitHub repository PIC32 AVRdude Boot-Loaders .

  • Connect the programmer to the Mac and the chipKIT board.

  • Launch mplab_ipe.

  • Select the MCU corresponding to the board.
Board MCU
Uno32 PIC32MX320F128H
Max32 PIC32MX795F512L
uC32 PIC32MX340F512H
  • Select the .hex file for the boot-loader. Make sure you’ve selected the relevant boot-loader, here the PIC32-avrdude-bootloader-master/bootloaders/chipKIT-Bootloaders/dist/Uno32/production/chipKIT-Bootloaders.production.hex for the chipKIT Uno32 board.

  • Press Program.

  • If you wish to verify, press Verify.

  • Remove the programmer and connect the board to the Mac.

You can upload the sketch to the board using the standard USB connection again.

For more information,

This procedure also applies for updating the boot-loader.

Restore Initial WiFi Mode on ESP8266 Boards

The ESP8266 boards act as WiFi peripheral with AT commands as well as fully programmable boards with the Arduino framework.

However, once the boards have been used with the Wiring / Arduino framework, the WiFi peripheral initial mode is no longer available. It needs to be restored.

To do so,

  • Connect GPIO0 to ground to enter program mode.

  • Plug the board in.

  • Download the ESP8266 SDK from the Download section of the Espressif forum

  • Open the .zip file.

  • Check the ReadMe file: it provides the list of the binary files to upload and the addresses to target.

download:
boot_v1.2+.bin     0x00000
user1.512.new.bin  0x01000
blank.bin          0x3e000 & 0x7e000
  • Locate on the sub-folders the different binaries mentioned on the ReadMe file.

  • Open a Terminal window and launch the upload command.
$ esptool.py --port /dev/tty.usbserial-12345678 --baud 115200 write_flash 0x00000 esp_iot_sdk_v1.0.0/bin/boot_v1.2.bin 0x01000 esp_iot_sdk_v1.0.0/bin/at/user1.512.new.bin 0x3e000 esp_iot_sdk_v1.0.0/bin/blank.bin 0x7e000 esp_iot_sdk_v1.0.0/bin/blank.bin
  • In case the binary files and target addresses are different, adapt the upload command accordingly.

  • Power-cycle the ESP8266 board.

The ESP8266 can now be used again as a WiFi peripheral with AT commands.

For more information,

Please refer to the procedure described on the Espressif support forum.

Restore Arduino Mode on RedBear Boards

The RedBear boards run on the Arduino framework as well as on the mbed framework.

However, once the boards have been used in mbed mode, the boot-loader required by Arduino is no longer available. It needs to be restored.

To do so,

  • Plug the board in.

  • The RedBear board appears as a new volume called MBED.

  • Open the Finder and navigate to the folder ~/Library/Arduino15/packages/RedBearLab/hardware/nRF51822, and select the folder with the most recent version, for example 1.0.0.

  • Open the bootloaders folder.

Arduino sketches can now be uploaded again to the board.

For more information,