yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
ESP32 Core Board📖
1. ESP32 Introduction
  • 1. ESP32S3 Overview
  • 2. Environment Setup Introduction
  • 3. Dev Board Introduction
2. ESP-IDF Development Tutorial
1. Before Development
  • 1. Environment Setup (Windows)
  • 2. Environment Setup (Linux)
  • 3. Build and Flash
2. Basic Peripherals
  • 1. LED Control
  • 2. Button Detection
  • 3. Peripheral Interrupts
  • 4. ESP_TIMER
  • 5. GPTIMER
  • 6. Watchdog Timer
  • 7. DMA
  • 8. ADC
  • 9. PWM Breathing LED
  • 10. RGB LED Effects
3. Serial Communication and Storage System
  • 1. Serial UART Communication Experiment
  • 2. I2C_OLED Display Experiment
  • 3. SPI Bus Communication Experiment
  • 4. PSRAM External Memory Experiment
  • 5. Flash Read and Write Experiment
  • 6. USB Emulated Mass Storage Experiment
4. FreeRTOS operating system
  • 1.FreeRTOS Core Concepts Theory
  • 2.Task Creation and Management
  • 3.Queue
  • 4.Binary Semaphore
  • 5.Mutex
  • 6.Event Groups
  • 7.Software Timer
  • 8.Task Scheduler
  • 9.Low Power Mode
  • 10.Deadlock
  • 11.Priority Inversion
5. Network Protocols and Wireless Communication
  • 1. WIFI Network Basics
  • 2. WIFI STA Mode
  • 3. WIFI AP Mode
  • 4. UDP Client Experiment
  • 5. UDP Server Experiment
  • 6. TCP Client Experiment
  • 7. TCP Server Experiment
  • 8. Socket Programming Basics
  • 9. HTTP Client Experiment
  • 10. HTTP Server Experiment
  • 11. MQTT IoT Communication Protocol
  • 12. WIFI OTA Upgrade
  • 13. Bluetooth Fundamentals
  • 14. Bluetooth Slave Mode
  • 15. Bluetooth Master Mode
6. Audio Applications
  • 1.I2S Microphone Recording and U-Disk Playback
  • 2.I2S Audio Playback Experiment
  • 3.Repeater Experiment
7. Xiaozhi AI Voice
  • 1. Burn Xiaozhi Firmware
  • 2. Network and Configuration
  • 3. AI Agent Settings
  • 4. Program Analysis
  • 5. Free Chat
3. Arduino Development Course
1. Before Development
  • 1. Environment Setup
  • 2. Build and Flash
2. Basic Peripherals
  • 1. LED Control
  • 2. Button Detection
  • 3. Peripheral Interrupts
  • 4. ESP_TIMER
  • 5. GPTIMER
  • 6. Watchdog Timer
  • 7. ADC
  • 8. PWM Breathing LED
  • 9. RGB LED Effects
3. Serial Communication and Storage System
  • 1. Serial UART Communication
  • 2. I2C OLED Display
  • 3. SPI Bus Communication
  • 4. Flash Read and Write
  • 5. USB Emulated Mass Storage
4. Network Protocols and Wireless Communication
  • 1. WIFI Network Basics
  • 2. WIFI STA Mode
  • 3. WIFI AP Mode
  • 4. UDP Server Experiment
  • 5. UDP Client Experiment
  • 6. TCP Client Experiment
  • 7. TCP Server Experiment
  • 8. HTTP Client Experiment
  • 9. HTTP Server Experiment
  • 10. MQTT IoT Communication Protocol
  • 11. WIFI OTA Upgrade
  • 12. Bluetooth Fundamentals
  • 13. Bluetooth Slave Mode
  • 14. Bluetooth Master Mode
5. Audio Applications
  • 1.I2S Microphone Recording and U-Disk Playback
  • 2.I2S Audio Playback Experiment
  • 3.Repeater Experiment
4. MicroPython Development Course
1. Before Development
  • 1. Environment Setup
  • 2. Build and Flash
  • 3. Thonny IDE
2. Basic Peripherals
  • 1. LED Control
  • 2. Button Detection
  • 3. Peripheral Interrupts
  • 4. TIMER_IT
  • 5. Watchdog Timer
  • 6. ADC
  • 7. PWM Breathing LED
  • 8. RGB LED Effects
3. Serial Communication and Storage System
  • 1. Serial UART Communication Experiment
  • 2. I2C_OLED Display Experiment
  • 3. SPI Bus Communication Experiment
  • 4. Flash Read and Write Experiment
  • 5. Print Storage
4. Network Protocols and Wireless Communication
  • 1. WIFI Network Basics
  • 2. WIFI STA Mode
  • 3. WIFI AP Mode
  • 4. UDP Client Experiment
  • 5. UDP Server Experiment
  • 6. TCP Client Experiment
  • 7. TCP Server Experiment
  • 8. HTTP Client Experiment
  • 9. HTTP Server Experiment
  • 10. MQTT
  • 11. Bluetooth Fundamentals
  • 12. Bluetooth Slave Mode
  • 13. Bluetooth Master Mode
5. Audio Applications
  • 1. I2S Audio Playback Experiment
  • 2. Repeater Experiment
Download
  • Code
  • Hardware_Info
  • 3D_Model_File
  • Software_Tools
  • VMware
  • VM_File
Download ZIP

Welcome to ESP32 Core Board repository

2. Build and Flash

Build and Flash


Build and Flash1. Overview2. Prerequisites3. Compile (Verify)3.1 Steps3.2 Compilation Output4. Flash (Upload)4.1 Steps4.2 Flashing Failed — Manually Enter Download Mode4.3 Flashing Address Description5. Serial Monitor5.1 Steps5.2 Quick Operations6. Serial Plotter6.1 Usage7. Flash Firmware Tool7.1 What is Flash Firmware Tool7.2 Installation7.3 Export .bin Firmware7.4 StepsStep 1: Launch ToolStep 2: Configure Flashing FilesStep 3: Configure Flashing ParametersStep 4: Connect and FlashStep 5: Manually Enter Download Mode7.5 Merge Firmware Flashing8. FAQ


1. Overview

Arduino IDE's Compile (Verify) and Flash (Upload) are one-click operations. Click Verify (Compile) button to compile .ino source code into .bin firmware file runnable on ESP32-S3; Click Upload button to first compile then write firmware to chip's Flash memory via serial port, chip auto-resets and runs new program after writing completes.

This tutorial organizes four steps: Project Save -> Compile -> Flash -> Serial Monitor, each step corresponds to one toolbar button.


2. Prerequisites

Before proceeding, ensure the following conditions are met:

ConditionRequirementVerification Method
IDE installedArduino IDE 2.x installedDouble-click desktop shortcut starts normally
ESP32 platform installedesp32 by Espressif Systems shows INSTALLED in Boards ManagerLeft toolbar -> Boards Manager -> Search "ESP32" to confirm
Board selectedESP32S3 Dev Module selected on top toolbarBottom status bar shows ESP32S3 Dev Module
Driver installedCH340 driver installedNo yellow exclamation in Device Manager -> Ports
Project savedCurrent window has .ino fileTitle bar shows project name not "Untitled"

3. Compile (Verify)

Arduino IDE's Verify (Compile) button compiles source code into .bin firmware file without flashing, used to check for syntax and linking errors.

3.1 Steps

  1. Open any .ino project

  2. Click Compile IconVerify (Compile) icon on top toolbar, or press Ctrl + R

  3. Observe bottom Output panel, output similar to:

    Sketch uses 319136 bytes (24%) of program storage space. Maximum is 1310720 bytes.
    Global variables use 22088 bytes (6%) of dynamic memory, leaving 305592 bytes for local variables. Maximum is 327680 bytes.
    FieldMeaning
    program storage spaceFlash firmware storage usage; this program uses 319136 bytes, partition total limit 1310720 bytes (1.25MB), utilization 24%
    Maximum is 327680 bytesOn-chip DRAM (internal SRAM) total max capacity, 320KB total, not part of Flash space
    Global variablesGlobal static variables occupy DRAM space; 22088 bytes total, 6% of memory capacity
    dynamic memorySame as on-chip SRAM/DRAM, used for global variables, task stacks, local variables, heap dynamic memory, remaining 305592 bytes freely available
  4. If no errors, bottom shows Done compiling prompt, compilation complete.

  5. If errors, Output panel lists error line numbers and causes in red text:

    • Double-click error line to jump to corresponding code location

    • Common errors: missing semicolons, spelling mistakes, library not installed, macro undefined

First compilation takes about 1~3 minutes (including linking and generating .bin), incremental compilation (only modified a few lines) usually just a few seconds.

3.2 Compilation Output

After compilation completes, firmware file is generated in temp directory (invisible in IDE), but you can export .bin file to project directory via menu Sketch -> Export compiled Binary. Exported files include:

File SuffixDescription
.binMain firmware (copied to Flash APP partition)
.bin.bootloaderBootloader (embedded in .bin, usually not needed separately)

4. Flash (Upload)

Flashing writes compiled .bin firmware to ESP32-S3's Flash memory via COM port. After clicking Upload, IDE automatically completes: Compile -> Connect to chip -> Erase partition -> Write firmware -> Verify -> Reset and run, no manual operation needed.

4.1 Steps

  1. Connect ESP32-S3 development board to computer with USB cable

  2. Confirm correct port selected on top toolbar (e.g., COM6)

  3. Click Upload IconUpload on top toolbar, or press Ctrl + U

  4. Observe bottom Output panel for flashing progress:

    ​x
    esptool v5.2.0
    Serial port COM6:
    Connecting....
    Connected to ESP32-S3 on COM6:
    Chip type:          ESP32-S3 (QFN56) (revision v0.2)
    Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
    Crystal frequency:  40MHz
    MAC:                a4:cb:8f:c6:b8:64
    Uploading stub...
    Running stub...
    Stub running...
    Configuring flash size...
    Flash will be erased from 0x00010000 to 0x0005ffff...
    Compressed 261937 bytes to 151335...
    Writing at 0x00010000... (100%)
    Verifying written data...
    Hash of data verified.
    
    
    Hard resetting via RTS pin...
    LogMeaning
    Serial port COM6Currently used serial port
    Connecting....Attempting handshake with chip bootloader
    Chip is ESP32-S3Chip model identified successfully
    Crystal is 40MHzCrystal frequency identified
    Uploading stub...Uploading flashing stub (mini flashing program running in RAM)
    Compressed xxx bytes to xxxFirmware size (after/before compression)
    Writing at 0x00010000... (100%)Firmware write Flash address + progress
    Hard resetting via RTS pin...Pull down RTS pin to reset chip, new firmware starts running
  5. After flashing completes, chip auto-resets, new program starts running.

4.2 Flashing Failed — Manually Enter Download Mode

Some ESP32-S3 development boards cannot auto-enter download mode for flashing (USB-to-serial chip's RTS/DTR pins not connected to chip EN/IO0), manual operation needed:

Operation flow: Hold BOOT button -> Press RST button (reset) once -> Release BOOT button.

xxxxxxxxxx
Step 1:  Hold BOOT button (don't release)
Step 2:  Press RST button once (press and release)
Step 3:  Release BOOT button
         ↑ Chip enters download mode, IDE auto-starts flashing after detection

To quickly determine if manual download mode is required: If you see an infinite loop of dots on the "Connecting..." line in the Output panel, it means the chip has not entered download mode.

4.3 Flashing Address Description

Arduino IDE defaults to flashing ESP32-S3's Flash, partition addresses defined by partition table (under default partition table):

xxxxxxxxxx
Flash Layout (Default Partition Table)
┌──────────┬──────────┬──────────┬──────────┬───────────┐
│Bootloader│Partition │  NVS     │  app0    │   SPIFFS  │
│ 32KB     │ Table    │  24KB    │  3.14MB  │   Remaining│
│0x0000    │0x8000    │0x9000    │0x10000   │           │
└──────────┴──────────┴──────────┴──────────┴───────────┘
PartitionStart AddressSizeDescription
Bootloader0x000032KBSecondary bootloader, runs first after power-on
Partition Table0x80004KBPartition table metadata, describes partition structure
NVS0x900024KBNon-volatile storage (Wi-Fi calibration data, etc.)
app00x10000~3.14MBAPP partition, firmware flashed here

Flashing log Writing at 0x00010000 corresponds to app0 partition start address.


5. Serial Monitor

After flashing, use Serial Monitor to view chip serial log output, verifying program runs as expected.

5.1 Steps

  1. Click Serial Monitor Serial Monitor icon on top toolbar, or press Ctrl + Shift + M

  2. Confirm baud rate at bottom of monitor panel matches Serial.begin() in code

    All examples in this tutorial use 115200.

  3. Observe serial output

  4. If chip didn't auto-reset, press RST reset button on development board to let program run from beginning, monitor will re-output setup() startup logs.

5.2 Quick Operations

OperationDescription
Click input box at bottom of monitor panel + EnterSend a line of text to chip
Check AutoscrollNew logs auto-scroll to bottom
Check Show timestampAdd timestamp before each log line
Baud rate dropdown at bottom rightSwitch baud rate (must match code)
X buttonClose monitor panel

6. Serial Plotter

Arduino IDE has built-in Serial Plotter, plots Serial.print() output values as real-time waveform curves, ideal for observing ADC sample values, sensor readings and other continuously changing data.

6.1 Usage

  1. In code, separate multiple values with commas:

    xxxxxxxxxx
    void setup(){
        Serial.begin(115200);
    }
    void loop() {
        int sensor1 = analogRead(A0);
        int sensor2 = analogRead(A1);
        Serial.print(sensor1);
        Serial.print(", ");
        Serial.println(sensor2);        // Comma separated -> two curves
        delay(50);
    }
  2. Click toolbar Serial PlotterSerial Plotter icon

  3. Waveform window auto-pops up, horizontal axis is time, vertical axis is value.

RuleDescription
Multiple values on one line separated by ,Plot multiple curves in different colors
Each line ends with \nOne line = one sample point
Vertical axis auto-scalesDynamically adjusts based on current visible range
Ctrl + Shift + LShortcut to open plotter

7. Flash Firmware Tool

7.1 What is Flash Firmware Tool

ESP Flash Download Tool is Espressif's official Windows GUI flashing tool, suitable for not installing Arduino IDE / ESP-IDF environment, only flashing pre-compiled .bin firmware scenarios.

ComparisonArduino IDE UploadFlash Firmware Tool
Need source codeYes (.ino file)No (only .bin firmware)
Need Arduino IDEYesNo
Batch flashingInconvenient (open projects one by one)Convenient (repeat click START)
Flash multiple .binNot supportedSupported (bootloader + partition + app)
Merge firmwareNot supportedSupported (one-click merge to target .bin)
Use caseDevelopment debuggingMass production flashing, firmware distribution, factory restore

When you can't install Arduino IDE (e.g., someone else's computer, workshop station), or need to flash same firmware to multiple boards, Flash Firmware Tool is the fastest way.

7.2 Installation

Simply extract 6. Software Tools -> Firmware Tool -> flash_download_tool.zip (ESP Flash Download Tool Official Download), no installation needed, double-click flash_download_tool_x.x.x.exe to use.

7.3 Export .bin Firmware

Before using flashing tool, need to export compiled .bin firmware from Arduino IDE. Arduino IDE's Upload operation auto-compiles and flashes in background, but compilation output is in temp directory, not auto-retained.

Export steps:

  1. Open project in Arduino IDE

  2. Select board (ESP32S3 Dev Module), ensure project compiles successfully

  3. Click menu Sketch -> Export compiled Binary

    Export .bin File

7.4 Steps

Step 1: Launch Tool

After extracting flash_download_tool.zip, enter extraction directory and double-click flash_download_tool_x.x.x.exe -> Select chip model ESP32-S3 -> Confirm.

Step 2: Configure Flashing Files

Add firmware file on flashing interface, fill in corresponding flashing address:

Flashing Configuration

FileAddressDescription
project.ino.bootloader.bin0x0Secondary bootloader
project.ino.partitions.bin0x8000Partition table
project.ino.bin0x10000Main application firmware

File path cannot contain Chinese or spaces, otherwise tool parsing fails. Recommend copying .bin files to English path (e.g., D:\firmware\) before adding.

Addressing method: After exporting binary file, enter folder build->esp32.esp32.esp32s3->flash_args, open with notepad, to get files and corresponding locations.

Flashing Addressing

Check checkbox before each file to activate that flashing item.

Step 3: Configure Flashing Parameters

Flashing Settings

ParameterRecommended ValueDescription
SPI SPEED80MHzSPI Flash clock frequency
SPI MODEQIOFlash communication mode (Quad I/O)
FLASH SIZE16Mbit (N16R8)Select according to actual Flash capacity
BAUD1152000Flashing baud rate

Step 4: Connect and Flash

  1. Select development board corresponding COM Port (When using Flash firmware tool, serial port used must not be occupied, otherwise flashing will fail)

    Flash

  2. Set baud rate to 1152000

  3. Click START to start flashing

  4. When progress bar fills, shows FINISH

Step 5: Manually Enter Download Mode

If tool keeps showing Waiting for power-on sync, manually let chip enter download mode:

  1. Hold BOOT button

  2. Press RST button once (reset)

  3. Release BOOT button

Some development boards need this operation, especially after flashing and running other firmware.

7.5 Merge Firmware Flashing

When needing to merge multiple .bin files into one complete firmware (for mass production flashing or distribution), use tool's merge function:

Click tool interface's Merge button -> Pop up merge config dialog -> Confirm merge files and addresses -> Generate merged .bin file.

Merge

A popup will appear, generating a new file .bin

New .bin File

Rename merged file (example hello_esp32s3_merged.bin):

Merge Flash

Merged .bin file only needs to fill in address 0x0, check and flash. One file covers bootloader + partition table + application firmware all content.


8. FAQ

PhenomenonCauseSolution
Compilation error "avr-gcc: command not found"ESP32-S3 board not selected (IDE defaults to AVR toolchain)Search and select ESP32S3 Dev Module in top toolbar board dropdown
Compilation error "xxx.h: No such file or directory"Third-party library not installedLeft toolbar -> Library Manager -> Search and install corresponding library
Upload failed "Timed out waiting for packet header"Chip not in download modeManually enter download mode: Hold BOOT -> Press EN -> Release BOOT
Upload failed "No serial data received"Wrong serial port / serial port occupied by other toolsClose other serial tools (serial assistant, putty), confirm correct COM port
Upload failed "Wrong boot mode detected"Chip in running state not download stateHold BOOT -> Press EN -> Observe chip LED turns off after EN release -> Release BOOT
Upload failed "A fatal error occurred: Failed to connect to ESP32-S3"USB cable only powers, no data transferReplace cable; or update CH340 driver to latest version
Upload succeeded but program doesn't runChip didn't auto-resetPress EN (RST) button to manually reset after flashing
Serial Monitor shows garbled textBaud rate mismatch / IDE monitor baud rate setting errorConfirm Serial.begin() parameter in code matches monitor bottom-right baud rate (115200 in this tutorial)
Serial Monitor has no outputUSB CDC On Boot not enabled / wrong port selectedTools -> USB CDC On Boot -> Enabled; confirm correct COM port selected
Serial Monitor shows "????" or unreadable charactersEncoding issueSerial.print() in code uses English only; monitor encoding defaults to UTF-8
IDE doesn't detect COM portDriver not installed / USB cable doesn't support dataInstall CH340 driver; replace with data-capable cable
Flashing stuck mid-processUSB poor contact or EMIReplug USB cable; use USB port on motherboard back (front panel may have insufficient power)
Incremental compilation still slowFirst compilation didn't retain intermediate productsNormal — incremental compilation fast within same project, full rebuild needed across projects or after header file modifications
Flash firmware tool keeps "Waiting for power-on sync"Chip not in download modeManual: Hold BOOT -> Press EN -> Release BOOT, then click START
Flash firmware tool file path errorPath contains Chinese or spacesMove .bin files to English path (e.g., D:\firmware\)
Flash firmware tool program doesn't run after flashingFLASH SIZE wrong / doNotChgBin not checkedFor N16R8 model select 16Mbit Flash; confirm SPI MODE is QIO
Export .bin prompts "Please select a board first"Board not selectedConfirm ESP32S3 Dev Module selected in top toolbar
Export compiled Binary menu is grayed outCurrent project never successfully compiledFirst click Verify (checkmark ✓) to compile successfully once, then export

Environment Setup
LED Control

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文