ESP32-S2 USB Console Arduino IDE Implementation

ozgbostan
Posts: 19
Joined: Sat Oct 31, 2020 7:19 am

ESP32-S2 USB Console Arduino IDE Implementation

Postby ozgbostan » Tue Mar 09, 2021 8:41 pm

Dear contributors,

I am designing an ESP32-S2 based custom development board for an educational purpose. For that reason, I would like to use the built-in native USB peripheral for flashing the Arduino sketches to the IC. However, there is a problem in integrated TinyUSB library of Arduino ESP32 Core, especially for Windows 10 OS. That's why I am looking for another alternative solution. I am thinking the built-in "USB Console" feature of ESP32-S2 ROM might be implemented to Arduino ESP32 Core? Anyone on the forum has any recommendation or any idea related to this idea?

This feature is only available in ESP-IDF Core, more info is in the following link.

https://docs.espressif.com/projects/esp ... nsole.html

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32-S2 USB Console Arduino IDE Implementation

Postby chegewara » Tue Mar 09, 2021 10:23 pm

I think it is not possible to do it with arduino IDE for this reason:
At the moment, this “USB Console” feature is incompatible with TinyUSB stack. However, if TinyUSB is used, it can provide its own CDC implementation.
If you are developing an application which uses the USB peripheral with the TinyUSB stack, this USB Console feature can not be used. This is mainly due to the following reasons:

This feature relies on a different USB CDC software stack in ESP32-S2 ROM.

USB descriptors used by the ROM CDC stack may be different from the descriptors used by TinyUSB.
https://docs.espressif.com/projects/esp ... imitations

At the moment it is more important to have tinyusb support rather than option to buttonless flash on just one OS.

ozgbostan
Posts: 19
Joined: Sat Oct 31, 2020 7:19 am

Re: ESP32-S2 USB Console Arduino IDE Implementation

Postby ozgbostan » Wed Mar 10, 2021 11:20 am

chegewara wrote:
Tue Mar 09, 2021 10:23 pm
At the moment it is more important to have tinyusb support rather than option to buttonless flash on just one OS.
Thanks chegewara for your answer. So, you have any recommendation to be able to solve the TinyUSB stack issue?

ozgbostan
Posts: 19
Joined: Sat Oct 31, 2020 7:19 am

Re: ESP32-S2 USB Console Arduino IDE Implementation

Postby ozgbostan » Wed Mar 10, 2021 11:31 am

chegewara wrote:
Tue Mar 09, 2021 10:23 pm
I think it is not possible to do it with arduino IDE for this reason:
If you are developing an application which uses the USB peripheral with the TinyUSB stack, this USB Console feature can not be used. This is mainly due to the following reasons:

This feature relies on a different USB CDC software stack in ESP32-S2 ROM.

USB descriptors used by the ROM CDC stack may be different from the descriptors used by TinyUSB.
https://docs.espressif.com/projects/esp ... imitations

At the moment it is more important to have tinyusb support rather than option to buttonless flash on just one OS.
By the way, I am not gonna use TinyUSB if USB Console feature is applicable on Arduino IDE, what you think? Is it possible?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32-S2 USB Console Arduino IDE Implementation

Postby chegewara » Wed Mar 10, 2021 3:20 pm

ozgbostan wrote:
Wed Mar 10, 2021 11:20 am
chegewara wrote:
Tue Mar 09, 2021 10:23 pm
At the moment it is more important to have tinyusb support rather than option to buttonless flash on just one OS.
Thanks chegewara for your answer. So, you have any recommendation to be able to solve the TinyUSB stack issue?
At the moment, accept the problem and use 2 steps flashing. I understand it is not good solution, but for now it is all i can recommend.
Maybe someone else knows a better solution, because i am just an user, not a guru.

Who is online

Users browsing this forum: Baidu [Spider] and 100 guests