ESP32/Setup and uploading/03. Install the toolchain
Your chip
Your language
Setup and uploading · 03 of 81

Install the toolchain

Four things have to be installed before one line of code can reach the board, and the errors do not name which one is missing. Here they are in order, with the symptom each one produces.

/esp32/install-the-toolchain · arduino · S3

What you are installing

Four separate things, from three different places. Nothing on your computer knows about the ESP32 until all four are present, and each one fails with a message that points somewhere else.

Editor → board package → driver → port
all four present
Break a link and read the symptom
Links working
4 of 4
Blink uploads
yes
All four, in order. That is the whole install. The chain is worth drawing because the errors do not name their own link — an empty port list is usually a driver, and a missing WiFi.h is always the board package.

Do it in this order

  1. Arduino IDE 2.x, or Thonny if you are going the MicroPython route.
  2. The board package. In Arduino: File → Preferences → Additional boards manager URLs, paste https://espressif.github.io/arduino-esp32/package_esp32_index.json, then Boards Manager → esp32 → Install.
  3. The USB driver, if your board needs one. Look at the small chip next to the USB socket: CP2102 and CH340 need a download, and anything with native USB — S3, C3, C6, P4 — needs nothing.
  4. Select the board and the port. Tools → Board → ESP32 Arduino, then the entry matching yours. If you are unsure, "ESP32 Dev Module" works for almost every classic board.

Prove it before you build anything

Upload the blink sketch below. It needs no components, so it tests exactly one thing: whether code written on your computer can reach the chip and run. Do this first, every time you set up a new machine or a new board — it turns a whole category of later confusion into a five-minute check.

On your S3
ChipXtensa LX7 · 2 × 240 MHz
Board settingESP32S3 Dev Module
Default I2CSDA 8 · SCL 9
Watch out forThe port vanishes after upload

The code

Upload this before anything else. It uses no wiring, so if it works the whole chain works, and if it fails you have a toolchain problem rather than a circuit problem.

blink.ino
void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  Serial.println("on");
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  Serial.println("off");
  delay(500);
}

LED_BUILTIN is defined by the board package, not by the chip. On a board with an addressable LED instead of a plain one it will not light — that is the board, not the upload.

When it does not work

The board does not appear in the Port menu

Nine times in ten this is the USB cable. Plenty of cables carry power and no data, and a board that lights up is not a board that is talking. Try another cable first, then the driver for your board's USB chip.

The board list has no ESP32 in it

The board package is not installed. Boards Manager, search esp32, install the Espressif entry. It is a few hundred megabytes and takes a while, which is why people abandon it halfway and forget.

A fatal error occurred, Failed to connect to ESP32

The port is right and the chip is not listening. Hold the BOOT button, tap EN, release BOOT, and upload again. If that works every time, your board has no auto-reset circuit.

It uploads and then prints nothing

The Serial Monitor baud rate has to match Serial.begin. Set both to 115200. Garbage characters mean a mismatch, silence usually means the monitor is on the wrong port.

Where this goes next

The chain is proven. Now the first program you write yourself, and the two settings that decide whether you ever see its output.

Hello world over serial

Edit this page — content/esp32/install-the-toolchain.mdx

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse ESP32 on the forum