#Nope it s actually code changes
1 messages · Page 1 of 1 (latest)
Ah, ok. I haven't really used Arduino IDE at all. Is it at all straight forward to see what code changes are being made when a user selects different options like USB Modes? I'm not sure yet where to start looking.
No I tried, as I said, making automatically switch to serial + jtag on DEBUG=1, but failed
Gotcha. Well, if I have any better luck I'll let you know!
CIRCUITPY_USB is something you should lookup with your ctags viewer a bit.
the espressif makefiled required a line change and it worked, but then msc serial didn't work
Thanks for the heads-up!
CIRCUITPY_ESP_USB_SERIAL_JTAG seems promising.
oh nm, that appears just to be for enabling serial console via the serial jtag connection.
Not that it makes it much clearer, but I'm guessing this is where the Arduino IDE eventually enabled the "Hardware CDC and JTAG" usb mode:
https://github.com/espressif/arduino-esp32/blob/72c41d09538663ebef80d29eb986cd5bc3395c2d/cores/esp32/esp32-hal-tinyusb.c#L397
So I was able to get CP configured to allow me to connect and debug via the JTAG interface. Turns out that is the default USB controller, but CP configures the esp32s3 to use the USB-OTG controller and its USB CDC. That means that I had to disable all of the USB stack in CP in order to use the Serial JTAG USB controller. The only way I could find to do that was by setting:
CIRCUITPY_USB = 0
I also set CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 and updated the espressif sdkconfig to include CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y in the hopes that CP might use the Serial JTAG CDC for printing and the repl. But that didn't work, I only saw the espressif logs after doing so.
@hybrid lake were you ever able to get serial and the repl going over the Serial JTAG? I know I can route it over UART, but I'd rather not have to solder extra wires when the Serial JTAG CDC is right there.
You do not want to use the ACTUAL JTAG INTERFACE for serial. C3 and S3 also expose regular serial along with it. It should be done just like C3 does it.