Hi,
It seems I am overlooking something obvious as I get the impression people have long ago resolved this issue and I am not able to move a millimeter forward. I am trying to avoid the use the JTAG 4-pin interface as the Espressif literature seems to state that the USB native port, is the way to go for simple upload and debugging of the C3 and S3 family. I paid special attention to maxgerhardt posts to no avail. My goal is to be able to setup a configuration for any ESP32-S3-DevKitC-1.1-NxRy, to upload and debug over the native USB interface. I expect to use this Wroom processors in two coming projects.
In this case I am trying to have a successful setup for an ESP32-S3-DevKitC-1.1-N8R2-v1.1 using the native ESP32-S3 USB interface (D+ and D- for uploading and debugging) and despite having played with many platformio.ini options (not shown for keeping this post as short and as clean as possible, that I tried during 2 days of dozens of suggestions) I have never been able to get a different “Flash” and “RAM” total, like the one showed in the snippet further down (327.680 RAM and 3.342.336 Flash) which is odd as many PlatformIO community posts, report having succeeded to recognize their particular processor storage FLASH/PSRAM combination (I assume my case is qio_qio).
My board has an USB and UART microUSB port (S3-DevKitC-version 1.1) and on both I am able to upload the code but only on the USB port I am able to get the output of the Serial Monitor (printf instructions in code). I have installed the libsub (Win USB) driver in my machine and when the board is plugged on the PC-USB port I get COM26. Not sure how to enforce libsub usage?
As you can notice on platformio.ini, I tried to use a different board directive “board = esp32-s3-devkitc-1-n8r2v”, that I stored in the OpenOCD “boards” directory with the changes that might have an effect, but with no success as shown further down with the message “Error: esp_usb_jtag: could not find or open device!”
Thanks for any advice, the lines staring with a bunch of “*” have text at the end describing what comes next.
Thomas
****************************** Compiler output
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (6.6.0) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\esp32-s3-devkitc-1\firmware.elf
Checking size .pio\build\esp32-s3-devkitc-1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.7% (used 18820 bytes from 327680 bytes)
Flash: [= ] 7.9% (used 265189 bytes from 3342336 bytes)
****************************** OS & machine
Thinkpad Intel Core i7
Windows 10 Pro / 22H2 / 32GB RAM
****************************** Visual Studio Code version
VSC Version: 1.89.0 (user setup)
Commit: b58957e67ee1e712cebf466b995adf4c5307b2bd
Date: 2024-05-01T02:09:22.859Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.19045
****************************** PlatformIO version
PlatformIO IDE v3.3.3
****************************** Windows USB driver (Installed using “UsbDriverTool-2.1.exe” from Automatic USB driver installer for FTDI and LibUSB drivers)
libsub (Win USB) drivers
****************************** Open OCD install
// “C:\Users<User Name>.platformio\penv\Scripts” was added to Windows PATH environment variable for terminal “pio” command
pio pkg install --global --tool “platformio/tool-openocd@^3.1200.0”
// “C:\Users<User Name>.platformio\packages\tool-openocd\bin” was added to Windows PATH environment variable for “openocd” command
openocd -c ‘set ESP_RTOS none’ -f board/esp32s3-builtin.cfg
****************************** platformio.ini
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
;board = esp32-s3-devkitc-1-n8r2v
framework = arduino
monitor_speed = 115200
build_flags =
-DBOARD_HAS_PSRAM
; -mfix-esp32-psram-cache-issue
-DARDUINO_ESP32S3_DEV
-DCORE_DEBUG_LEVEL=5
-DCONFIG_SPIRAM_USE
****************************** main.cpp
#include <Arduino.h>
int total_loop_runs = 0;
// put function declarations here:
int myFunction(int, int);
void setup() {
Serial.begin(115200);
Serial.printf("Program Setup Start!\n");
// put your setup code here, to run once:
int result = myFunction(2, 3);
}
void loop() {
// put your main code here, to run repeatedly:
total_loop_runs++;
Serial.printf("Program loop execution %d\n", total_loop_runs);
// Wait 5 seconds before repeat
delay(5000);
}
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
}
****************************** Serial Monitor output
--- Terminal on COM26 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
[ 304][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
Program Setup Start!
Program loop execution 1
Program loop execution 2
Program loop execution 3
Program loop execution 4
Program loop execution 5
Program loop execution 6
Program loop execution 7
Program loop execution 8
Program loop execution 9
****************************** Preparing for code debugging (fail, no idea how to fix)
openocd -c 'set ESP_RTOS none' -f board/esp32s3-builtin.cfg
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
force hard breakpoints
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: esp_usb_jtag: could not find or open device!