For getting started with C/C++ development and also debug step line-by-line through the source code a few easy steps are needed
- Buy an EasyDevKit
- Install a IDE
- Plug in the EasyDevKit
- Install the USB driver
- Open a C/C++ project in the IDE and configure it for EasyDevKit use
- Build, flash and start the application on the EasyDevKit
- Set a break point in the IDE, attach the debugger and step through the program line by line
Buy an EasyDevKit
Go the shop and buy an EasyDevkit
Install a IDE
As an example you can install the free IDE Microsoft Visual Studio Code. For getting the IDE working with an ESP32 EasyDevKit you can install the Espressif IDF plugin for Visual Studio Code.
Plug in the EasyDevKit
Connect the EasyDevKit to a USB port using a USB-C cable. No breadboard or additional wiring is required – only the EasyDevKit and the USB-C cable are needed. Once connected, the green JTAG LED will remain steadily illuminated.
For Windows you need to install the correct USB driver. Skip this step for Linux.
- Download and start the Zadig tool
- Click Options => List all devices
- For a FTDI FT2232H based EasyDevKit select EasyDevKit (Interface 0) and install the WinUSB driver
- For a WCH CH347T based EasyDevKit select EasyDevKit (Interface 2) and install the WinUSB driver
Steps in Visual Studio Code
ESP-IDF installation
- Install the ESP-IDF extension
- In ESP-IDF extension advanced menu click Open ESP-IDF Installation Manager from Github
- Use Custom Installation
- Choose the target chips
- Choose at least the ESP-IDF version 6.0 beta 2
- Leave the download mirrors as it is
- Leave the ESP-IDF feature selection as it is
- Leave the tools selection as it is
- Select the installation location
- Start the installation of the ESP-IDF
Create, build, flash and debug an example project
- In ESP-IDF extension advanced menu click New Project Wizard and select the ESP-IDF version
- Choose from the examples the get-started/hello_world application and create a project using the template
- In the Choose ESP-IDF Board combobox choose the Custom board
- Put the config file board/easydevkits/esp32-wrover-e-wch-jtag-devkit.cfg into the field OpenOCD Configuration files
- Create and open the new project, look into the source code
- Build the project
- Flash the project
- Start the OpenOCD Server
- Start the Debugger
- Wait for the debugger to reach the main function
Happy debugging!
If you like you can watch the getting started video. It describes also all the steps.
