OpenOCD – libusb_open() failed with LIBUSB_ERROR_NOT_FOUND Have you installed the driver for the ESP-Prog? Have you used the zadig tool to change the driver for Interface 0 / is it still changed (hasn’t reverted back). Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED From Espressif support: This confusing error message can be printed on Windows, but it does […]
All posts by
Heartbeat timer example (non IRQ)
In your app’s main loop() The Heartbeat Function
.2 Making VS Code work the way we like
VS Code Options Our general settings for VS Code – see here ESP32 C programming specific settings Clear terminal when building (so it start fresh each time) Settings > Features > Debug > Terminal: Clear Before Reusing = ONSettings > Features > Debug > Cmake: Clear Output Before Build = ON Open files at the […]
OpenOCD Log output
Add this to your openocd commands Using -d3 gives you a full verbose output The output log is written to the file openocd_log.txt in: C:\Espressif\frameworks\esp-idf-vX.X.X
program_esp
OpenOCD flashing command program_esp has the following format: Usage example
.4 Debugging with VS Code
ESP-Prog programmer / debugger For details on installing see here. Installing debugger VS Code has a built-in debugger, its setup documentation is here. Apparently some people use it successfully for Espressif chips (launch.json “type”: “gdb”). Espressif have a dedicated VS Code extension for debugging which is likely the better choice (launch.json “type”: “espidf”) and that’s […]
Help and Community
ESP32 Forum – Seems really hard getting any actually support on this for anything tricky, we get nothing unless we email Espressif a link to our post that has sat there unanswered for days and ask if someone can respond to it. GitHub – We’ve found that raising issues with esp-idf on GitHub gets a […]
UART Pins
UART0 The ESP32 can be programmed via its UART pins. However it doesn’t have to be if you want to use them for something else. It is also possible to program it using the JTAG interface pins. Pin assignment (other than UART0) UART signals can be connected via IOMUX for specific GPIO or otherwise the […]
Using Visual Studio
Resources The official documentation Keyboard Shortcuts Command Pallet (run command box) CTRL+SHIFT+P (Menu > View > Command Palette) Build Project CTRL+E then B (ESP-IDF: Build your project)
.3 Creating a new project
Resources https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/basic_use.md NOTE: The esp-idf build system does not support spaces in paths to projects Create an example project in Visual Studio Code Menu > View > Command Palette (CTRL+SHIFT+P) > Type: ESP-IDF: Show Examples Projects (If it doesn’t come up, make sure VS Code isn’t in restricted safe mode)Choose “Use current ESP-IDF (\path\to\esp-idf)”.All of […]
