Introduction

Before You Begin

Before installing any toolchain, take ten minutes to verify your system and install the universal prerequisites. Getting this right now saves hours of debugging later.


System Requirements

All guides are tested on the following OS versions. Older versions may work but are not supported.

OSMinimum VersionRecommended
WindowsWindows 10 (64-bit, build 1903+)Windows 11 22H2+
Ubuntu / DebianUbuntu 22.04 LTSUbuntu 24.04 LTS
macOSmacOS 13 VenturamacOS 14 Sonoma / 15 Sequoia
Raspberry Pi OSBullseye (64-bit)Bookworm (64-bit)

64-bit required — no exceptions

All toolchains (ESP-IDF, STM32CubeIDE, GCC cross-compilers, TensorFlow Lite) require a 64-bit OS and a 64-bit CPU. A 32-bit system will fail during installation.


Minimum Hardware

ComponentMinimumRecommended
CPUx86-64 or ARM644+ cores
RAM4 GB8 GB or more
Disk space10 GB free30 GB free (ESP-IDF + STM32 + Docker)
USB portUSB-A or USB-C

1. Python 3 (3.13 — Latest Stable)

Python is required by ESP-IDF, esptool, OpenOCD scripts, and all ML/data-science sections. Always install the latest stable release (3.13 as of 2025).

Check what you have

bash
python3 --version
# Target: Python 3.13.x

Install Python 3.13

Ubuntu / Debian / Raspberry Pi OS

bash
# Ubuntu 24.04 ships Python 3.12 by default.
# Add the deadsnakes PPA to get 3.13:
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.13 python3.13-venv python3.13-dev python3-pip

# Make 3.13 the default python3
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1
python3 --version   # Python 3.13.x

Windows

  1. Download the latest Python 3.13.x Windows installer (64-bit) from python.org/downloads
  2. Run the installer
  3. Tick "Add Python to PATH" before clicking Install — this is the most commonly missed step
  4. Tick "Install for all users" (recommended)
  5. Click "Install Now"

Verify in a new terminal (PowerShell or Command Prompt):

powershell
python --version
# Python 3.13.x

pip --version
# pip 24.x from C:\...\Python313\...

macOS

bash
# Option A: Homebrew (recommended)
brew install python@3.13
echo 'export PATH="$(brew --prefix python@3.13)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
python3 --version  # Python 3.13.x

# Option B: Official installer
# Download from python.org/downloads → macOS installer

Virtual Environments (always use one)

Never install project-specific packages into the system Python. Use a virtual environment for every project.

bash
# Create
python3 -m venv .venv

# Activate — Linux / macOS
source .venv/bin/activate

# Activate — Windows PowerShell
.venv\Scripts\Activate.ps1

# Your prompt changes:
# (.venv) $

# Install packages (no sudo needed)
pip install numpy pandas scikit-learn tensorflow

# Save dependencies
pip freeze > requirements.txt

# Deactivate
deactivate

2. Git

Git is required by every toolchain — ESP-IDF, STM32CubeIDE scripts, and the course repositories all use it.

Check what you have

bash
git --version
# git version 2.x.x

Install Git

Ubuntu / Raspberry Pi OS

bash
sudo apt update && sudo apt install -y git git-lfs
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Windows

Download Git for Windows from git-scm.com. During installation:

  • Select "Git from the command line and also from 3rd-party software"
  • Select "Use Windows' default console window"
  • All other defaults are fine
powershell
git --version  # git version 2.x.x

macOS

bash
# macOS will auto-prompt to install Xcode Command Line Tools when you run:
git --version
# Click "Install" on the dialog, or run:
xcode-select --install

Essential Git Configuration

Run these once on any new machine:

bash
git config --global user.name  "Your Name"
git config --global user.email "you@example.com"
git config --global core.editor "code --wait"   # VS Code as default editor
git config --global init.defaultBranch main
git config --global pull.rebase false

# Verify
git config --list

3. USB-to-Serial Drivers

Most ESP32 and some STM32 boards communicate over USB via a dedicated USB-UART bridge chip. You must install the correct driver for your chip.

Identify Your Chip

Look at the small IC near the USB connector on your board:

ChipCommon BoardsDownload
CP2102 / CP2104Most ESP32 DevKit, ESP32-S3 boardsSilicon Labs CP210x
CH340 / CH341Budget ESP32 clones, Arduino NanoWCH CH341SER
FTDI FT232RLOlder STM32 boards, SparkFun productsFTDI VCP
ST-LINK V2/V3All STM32 NUCLEO and Discovery boardsBuilt into STM32CubeIDE
USB-C native (JTAG)ESP32-S3 DevKit-C with native USBNo driver needed — Windows 11 / macOS / Linux auto-detect

Driver not needed on Linux

Linux kernels 3.x and later include drivers for all common USB-UART chips. On Ubuntu/Raspberry Pi OS, simply plug in the board and run dmesg | tail to see the device name (ttyUSB0, ttyACM0).


4. Verify USB Connection

Windows

  1. Open Device Manager (right-click Start → Device Manager)
  2. Expand Ports (COM & LPT)
  3. Your board appears as COMx (e.g., COM3, COM9)
  4. Note the COM number — you will use it in flash commands

Ubuntu / Linux / Raspberry Pi OS

bash
# Before plugging in the board
ls /dev/ttyUSB* /dev/ttyACM* 2>/dev/null

# Plug in the board, then run again — a new entry should appear
ls /dev/ttyUSB* /dev/ttyACM* 2>/dev/null
# /dev/ttyUSB0

# If you get "Permission denied":
sudo usermod -aG dialout $USER
# Log out and back in for the group change to take effect

# Watch the kernel detect the board live:
dmesg | tail -10
# [ 4523.192] cp210x converter now attached to ttyUSB0

macOS

bash
ls /dev/cu.*
# /dev/cu.usbserial-0001   (CP2102/FTDI)
# /dev/cu.SLAB_USBtoUART   (CP2104)
# /dev/cu.wchusbserial14310 (CH340)

5. Visual Studio Code

VS Code is the recommended editor across all platforms and all sections of this documentation.

Download: code.visualstudio.com

Install for Ubuntu via snap (easiest)

bash
sudo snap install code --classic
code --version

Install for Ubuntu via apt (official Microsoft repo)

bash
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" \
    | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update && sudo apt install -y code

Install these immediately after VS Code is open:

text
Ctrl+Shift+X  →  Search and install:
ExtensionPublisherPurpose
ESP-IDFEspressif SystemsESP32 build, flash, monitor
C/C++MicrosoftIntelliSense, debugging
CMake ToolsMicrosoftCMake project support
PythonMicrosoftPython language support
PylanceMicrosoftFast Python type checking
Serial MonitorMicrosoftBuilt-in serial terminal
GitLensGitKrakenEnhanced Git history
Remote - SSHMicrosoftSSH into Raspberry Pi from VS Code
DockerMicrosoftDockerfile and container management

Install all via terminal

bash
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cmake-tools
code --install-extension espressif.esp-idf-extension
code --install-extension ms-python.python
code --install-extension ms-python.pylance
code --install-extension ms-vscode.serial-monitor
code --install-extension eamodio.gitlens
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-azuretools.vscode-docker

6. Build Tools (All Platforms)

These are needed for compiling C/C++ code locally, building Docker images, and running ESP-IDF.

Ubuntu / Raspberry Pi OS

bash
sudo apt update
sudo apt install -y \
  build-essential \
  gcc \
  g++ \
  make \
  cmake \
  ninja-build \
  pkg-config \
  libssl-dev \
  libffi-dev \
  libusb-1.0-0-dev \
  gdb \
  openocd

macOS

bash
# Install Homebrew if not present
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install build tools
brew install cmake ninja gcc openssl libusb pkg-config

Windows

Install via winget (built into Windows 11):

powershell
winget install --id Kitware.CMake
winget install --id Ninja-build.Ninja
winget install --id GnuWin32.Make

Or install MSYS2 from msys2.org for a full Linux-like build environment on Windows.


Quick Verification Checklist

Run these in a terminal once everything is set up. Every line should return a version number.

bash
python3 --version          # Python 3.13.x
pip --version              # pip 24.x
git --version              # git 2.x.x
cmake --version            # cmake 3.x.x
ninja --version            # 1.x.x
gcc --version              # gcc x.x.x
code --version             # 1.x.x (if VS Code is in PATH)

What's Next?

Choose your platform and jump in:

PathStart Here
ESP32 firmware on WindowsESP-IDF Windows Setup
ESP32 firmware on UbuntuESP-IDF Ubuntu Setup
ESP32 firmware on macOSESP-IDF macOS Setup
STM32 Nucleo / DiscoverySTM32 Windows Setup
Raspberry Pi SBCFlashing the OS
Raspberry Pi PicoPico Introduction
MicroPythonThonny IDE Setup
Docker buildsWhy Docker?
Previous
Welcome & Overview