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.

Currently the OpenOCD modifications for getting the EasyDevKits running are not included in the Espressif version of OpenOCD. That’s an ongoing process and until that’s finished you need to copy the latest release of OpenOCD-EasyDevKits into the Espressif plugin. To do this please do the following:

  1. Download and unzip the latest OpenOCD-EasyDevKits version from github. For Linux you need the Linux version; for Windows the Windows version.
  2. Copy the bin and share folders into your esp-openocd folder and overwrite all files. You find these bin and share folder in the .espressif folder. E.g. .espressif/tools/openocd-esp32/v0.12.0-esp32-20230419/openocd-esp32
  3. Only for Windows: Download the latest libusb driver from GitHub: https://github.com/libusb/libusb/releases Extract the 7z file and copy the libusb-1.0.dll form the folder VS2022/MS32/dll into the esp-openocd/bin folder. E.g. .espressif/tools/openocd-esp32/v0.12.0-esp32-20230419/openocd-esp32/bin

Plug in the EasyDevKit

Plug in the EasyDevKit into one USB port. No breadboard, no other wires needed. Only the EasyDevKit and a micro USB cable.

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

Open your C/C++ project, select the serial port for flashing via UART

For getting started really quick you can open the “Hello World” sample application from the esp samples directory. Selecting the right serial port is done in the status bar in Visual Studio code.

Build, flash and start the application on the EasyDevKit

There is the little flame icon in the status bar of Visual Studio code. You can build, flash, start and monitor the UART output via one click.

Start JTAG debugging

Copy the launch.json into your .vscode directory. Add the OpenOCD interface and board configurations to your settings.json which located in the .vscode directory.

For FTDI FT2232H based EasyDevKits

"idf.openOcdConfigs": [
        "interface/ftdi/easydevkits-ftdi.cfg",
        "board/esp32-wrover.cfg"        
    ]

For WCH CH347T based EasyDevKits

"idf.openOcdConfigs": [
        "interface/easydevkits-wch.cfg",
        "board/esp32-wrover.cfg"        
    ]

Start OpenOCD Server with a click to “OpenOCD Server” at the status bar. Then set a breakpoint and launch you application for JTAG debugging via F5. Wait until a breakpoint is hit.

Happy debugging!

If you like you can watch the getting started video. It describes all steps in more detail.

Getting started with EasyDevKits

The two files mentioned in the video are here: