Switching between NanoCockpit and the original firmware

The examples in this repository use one of two firmware combinations on the AI-deck:

The GAP8 application and the ESP32 firmware have to match. This page describes in which order to flash things to go from one combination to the other.

From NanoCockpit to the original firmware

  1. Flash the GAP8 bootloader with a JTAG programmer, as described in the aideck-gap8-bootloader repository. Flashing a NanoCockpit example over JTAG overwrote it, and it is needed to flash the GAP8 over the air.
  2. Flash the original ESP32 firmware over the air, with aideck_esp.bin from the releases page, as described in the aideck-esp-firmware repository. With cfcli, the command is cfcli bootload flash --bin bcAI:esp-fw=aideck_esp.bin.
  3. Flash an example to the GAP8 over the air, see flashing, and set up the Wi-Fi. The released aideck_gap8_wifi_img_streamer_with_ap.bin from the releases page sets up its own access point, named WiFi streaming example. For the other examples, set up the Wi-Fi through the Crazyflie firmware, as described in the WiFi video streamer example.

Flashing the GAP8 bootloader before the ESP32 firmware makes it easy to check that the ESP32 firmware works: the original ESP32 firmware does not run properly while a NanoCockpit application runs on the GAP8. When it runs, the green LED of the ESP32 blinks and the console of the Crazyflie shows a line like

ESP32: I (483) SYS: Initialized

From the original firmware to NanoCockpit

  1. Flash the ESP32 firmware for NanoCockpit, as described in its documentation. When it runs, the AI-deck creates the Wi-Fi network aideck-nanocockpit, and the green LED of the ESP32 blinks.
  2. Flash a NanoCockpit example to the GAP8 with a JTAG programmer, for example the NanoCockpit streamer. This overwrites the GAP8 bootloader.

After upgrading the Crazyflie

Newer Crazyflie release packages include the ESP32 firmware for NanoCockpit. Upgrading the Crazyflie with such a release replaces the original ESP32 firmware, but does not change the GAP8: the GAP8 bootloader and the example on it stay.

To upgrade the Crazyflie without flashing the ESP32, choose which targets to flash, and leave out bcAI:esp-fw. For example, cfcli bootload flash --release --targets stm32-fw,nrf51-fw only flashes the Crazyflie itself. Without a list, --targets lets you choose interactively.