Skip to content

Flashing a RIOT Application

After all of the previous sections are completed, we can finally flash some real hardware. In this case, we use an esp32-mh-et-live-minikit development board. The guide should mostly apply to all other boards as well.

VS Code in WSL

  1. Open the examples folder
  2. Open the default folder within examples
  3. Open the main.c file in the default folder
  4. Select the “Terminal” tab at the bottom
  5. Enter cd ~/RIOT/examples/default to enter the default folder also in the terminal
  6. Run make BOARD=esp32-mh-et-live-minikit compile-commands
    • You can replace esp32-mh-et-live-minikit with the name of any other supported board

Flashing from VS Code

  1. Now run make BOARD=esp32-mh-et-live-minikit BUILD_IN_DOCKER=1 flash term

Pulling docker image

When compiling with BUILD_IN_DOCKER=1, the toolchains distributed in the riot/riotbuild docker image will be used for compilation. This image contains toolchains for all supported RIOT board and is extensively tested in our CI.

The first time you build with BUILD_IN_DOCKER=1, the image is pulled automatically.

Still pulling docker image

This may take a while …

Building the firmware

… until eventually the docker image is pulled and the build will start. Subsequent builds will no longer need to download the toolchain and be a lot quicker.

Interacting with the firmware

After building and flashing the firmware has succeeded, a shell will open.

  1. Wait for the boot message to appear.
    • The board may boot faster than your PC is able to connect to the serial. If you see nothing after “Welcome to pyterm!” for 5 seconds, try hitting the reset button on the board to boot it again.
  2. You are now connected to the RIOT shell running on the board. Try running the help command to get a list of commands supported by the board.
  3. You can drop out of the RIOT serial by pressing Ctrl + C and return to the Linux shell.