ESP32-DevKitC Getting Started Guide
This guide introduces how to use the ESP32-DevKitC development board.
About This Manual
The structure of this document is as follows:
Chapter | Title | Content |
---|---|---|
Chapter 1 | Overview | Introduces the basic features of ESP32-DevKitC. |
Chapter 2 | Compilation and Download | Explains compilation using the example/01_hello_world in ESP-IDF. |
Release Notes
Date | Version | Release Date |
---|---|---|
2016.09 | V1.0 | First release. |
2016.10 | V1.1 | Updated Figure 1-2. ESP32-DevKitC layout. |
2016.11 | V1.2 | Added Figure 1-1. ESP32-DevKitC dimensions. Updated Figure 1-2. ESP32-DevKitC layout. |
2016.12 | V1.3 | Major revision based on ESP-IDF 1.0 release. |
2017.03 | V1.4 | Updated Figure 1-2. ESP32-DevKitC layout. |
Related Documents
1. Overview
1.1. Product Overview
The ESP32-DevKitC is a mini development board designed by Espressif based on the ESP32 chip. It exposes most of the I/O to pin headers on both sides, allowing developers to connect peripherals according to their needs. The standard pin headers on both sides make operations more convenient during development and debugging.
[Image of ESP32-DevKitC dimensions with labels for 48.2 mm, 18.0 mm, and 27.9 mm]
[Image of ESP32-DevKitC board layout with pin labels like 3V3, EN, SVP, SVN, GPIO pins, SD cards pins, CMD, 5V, GND, TXD0, RXD0, etc.]
1.2. Function Description
Interface/Module | Description |
---|---|
ESP-WROOM-32 | ESP-WROOM-32 module. |
EN | Reset button. Pressing this tactile switch resets the system. |
Boot | Download button. Pressing this button and then pressing the EN button enters the download mode, allowing users to download to Flash via the serial port. |
USB | USB interface. Provides power to the development board and serves as a communication interface to connect the PC and the ESP-WROOM-32 module. |
I/O | Expands most of the pins of the ESP-WROOM-32. Users can program the ESP32 to achieve various functions such as PWM, ADC, DAC, I2C, I2S, SPI, etc. |
2. Compilation and Download
This section provides a compilation and download example using ESP-IDF.
Hardware Requirements:
- 1 x ESP32-DevKitC
- 1 x PC (Windows operating system used as an example in this manual)
- 1 x USB data cable
Tool Requirements:
- ESP32 Flash download tool: Espressif Download Tools
- ESP-IDF: ESP-IDF GitHub Repository
2.1. Establishing Serial Communication
Connect the ESP32-DevKitC to the PC using the USB data cable. Confirm the chip's COM port in the Windows Device Manager.
2.2. ESP-IDF Directory Structure
The ESP-IDF directory structure is shown in the figure below. It mainly consists of five parts: components
, examples
, make
, tools
, and docs
. components
are the core components of ESP-IDF, examples
are the sample programs provided by ESP-IDF, make
is the ESP-IDF project management directory, tools
is the ESP-IDF toolchain, and docs
are the relevant documents for ESP-IDF.
[Image displaying the ESP-IDF directory structure with folders like components, bootloader, driver, examples, tools, etc.]
2.3. hello_world Example
This section explains compilation using the esp-idf/examples/01_hello_world
as an example.
- Navigate to
examples/01_hello_world
:
cd examples/01_hello_world/
- Configure IDF_PATH:
export IDF_PATH=/home/share/esp-idf-driver/esp-idf
- Check if the IDF_PATH configuration is correct:
echo $IDF_PATH
- Compile and download the project. Refer to sections 2.3.1 and 2.3.2.
2.3.1. Compiling BIN Files and Flashing with Flash Download Tool
Execute the following command in the terminal:
make
After successful compilation, there will be 3 BIN files to flash: example/01_hello_world/bootloader/bootloader.bin
, example/01_hello_world/partitions_singleapp.bin
, and example/01_hello_world/hello-world.bin
. Then, flash them using the Flash Download Tool. The steps are as follows:
- Open the ESP32 DOWNLOAD TOOL.
- Configure the parameters and click "START", as shown in the figure below:
[Image of ESP32 DOWNLOAD TOOL interface showing download path configuration for bootloader.bin, hello-world.bin, and partitions_singleapp.bin. It also shows SPI flash configuration options like Crystal Frequency, SPI Speed, SPI Mode, Flash Size, and Download Panel settings.]
Note: Normally, the ESP32-DevKitC will automatically enter download mode when flashing BIN files using the Flash Download Tool. If it does not enter download mode, press the "Boot" button (you may need to press and release the "EN" button simultaneously).
3. Verify serial port connection. Open the serial port, set the correct COM port, baud rate to 115200, 8 data bits, 1 stop bit. The following output can be seen:
ets Jun 8 2016 00:22:57 rst: 0xc (SW_CPU_RESET), boot: 0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP: 0x00 clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3ffc0008,len:0 load:0x3ffc0008,len:1964 load:0x40078000,len:3696 ho O tail 12 room 4 load:0x40080000,len:260 entry 0x40080034 [0;32mI (805) heap_alloc_caps: Initializing heap allocator:[0m [0;32mI (806) heap_alloc_caps: Region 19: 3FFB4AAC len 00028554 tag [ Om [0;32mI (815) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1[0m [0;32mI (876) cpu_start: Pro cpu up. [0m [0;32mI (911) cpu_start: Single core mode [Om [0;32ml (949) cpu_start: Pro cpu start user code [Om [0;32mI (1469) phy: phy_version: 258, Νου 29 2016, 15:51:07, 0, 0[0m [0;32mI (1873) cpu_start: Starting scheduler on PRO CPU.[0m Hello world! Restarting in 10 seconds. Restarting in 9 seconds. Restarting in 8 seconds. Restarting in 7 seconds. Restarting in 6 seconds Restarting in 5 seconds. Restarting in 4 seconds. Restarting in 3 seconds. Restarting in 2 seconds.. Restarting in 1 seconds.. Restarting in 0 seconds... Restarting now.
This confirms that the firmware has been flashed to the development board.
2.3.2. Compiling BIN Files and Flashing with ESP-IDF Tools (esptool)
Before compiling and downloading, you need to configure the serial port parameters, which only needs to be done once.
- Enter
make menuconfig
:
make menuconfig
The following output will appear:
[Image of the ESP-IDF configuration menu showing options like SDK tool configuration, Bootloader config, Serial flasher config, Partition Table, Component config, etc.]
2. Select "Serial flasher config" to enter the download serial port configuration, as shown below:
[Image showing the Serial flasher config menu with options for Default serial port, Default baud rate, Use compressed upload, Flash SPI mode, Flash SPI speed, Flash size.]
3. Set the download serial port, as shown below:
[Image showing a prompt to enter a string value for the default serial port, with COM9 as an example.]
4. Save changes.
Select the "OK" button, then exit make menuconfig
.
5. Compile and flash the BIN file:
make flash
Notes:
- Please select the port number according to the actual situation.
- Currently, only DIO mode is supported. Download tools and scripts will be updated later to support both QIO and DIO modes.
- For more information about ESP-IDF, please refer to the ESP-IDF Getting Started Guide.
Disclaimer and Copyright Notice
The information in this document, including URL addresses for reference, may change without notice.
The document is provided "as is" without warranty of any kind, including warranties of merchantability, fitness for a particular purpose, or non-infringement of intellectual property. Espressif assumes no liability for any use of this document, including liability for infringement of any patent rights resulting from the use of information contained herein. This document does not grant any intellectual property rights, whether express or implied, by estoppel or otherwise.
Wi-Fi Alliance member logos are the property of the Wi-Fi Alliance. Bluetooth logos are registered trademarks of Bluetooth SIG.
All brand names, trademarks, and registered trademarks mentioned in this document are the property of their respective owners.
Copyright © 2017 Espressif. All rights reserved.