-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ESP32C6 - UsbConsole feature not working #15656
Comments
Hi @FelipeMdeO ! Thanks for reporting. We'll talk about it internally and address it according to our schedule. |
Hello. I tried to build exactly commit that this feature was added: It is so old and I cannot build, @acassis can you help me, please: ./tools/configure.sh esp32c6-generic:usbconsole I am facing build issues below:
Also, I tried checkout and run release/12.3 - the first release with this feature. There the usb console is stucked too. Release 12.5 is the first release with esp32c6-usbconsole configuration, but this release has the same issue than master. ABOUT ESP32C3 I am able to run properly usbconsole only using esp32c3-generic configuration, esp32c3-devkit isn't work. |
Hello All. I want to share an strange behavior. You can reproduce it going to menuconfig and changing Optimization Level to DEBUG_NOOPT. I will continue the investigation. |
Hello, The reason about build error might related to compiler changes between versions. About esp32c3-devkit; it is old approach (not uses esp-hal-3rdparty properly), it might not work as expected and it is not high priority in our ToDo list. |
Hello @tmedicci, @eren-terzioglu, After some analysis, I discovered that the esp_txint function exhibits divergent behavior depending on the RISC-V compiler optimization level. I looked disassembles for both builds and cannot find a explicit reason for issue, but studying about I understand that the optimization removes implicit barriers (such as jumps and returns) that, combined with the absence of volatile qualifiers or explicit memory barriers, compromise hardware synchronization. In summary, the reordering of register accesses can affect the update of interrupt control bits, leading to system malfunctions. Look for O0 buid:
and O2 build:
I was able usbconsole work change the code for:
I am not sure this is the right way to solve it, so I want know you opinion. @acassis Will be good listen you also. |
Hi @FelipeMdeO, |
Hi @FelipeMdeO , thanks for figuring it out! We won't be able to investigate it further soon, so your proposed fix is acceptable (turning off optimization for this function). Can you open a PR with this fix? |
Sure. I will! |
@FelipeMdeO since the issue exist when using esp_hal and works in the esp32c3-legacy, please keep this Issue opened until someone fix it. |
Description / Steps to reproduce the issue
Hello All,
I am trying to use esp32c6 usbconsole example but the shell is stucking after I try send any character.
I tried with esp32c3 and everything is going well there.
I am investigating the issue, and trying to solve, if you have any tips, please feel free to share.
Steps to reproduce:
1 . ./tools/configure.sh esp32c6-devkitc:usbconsole
2 . connect to the board
3. inset any character and press enter. Shell will stuck.
@eren-terzioglu and @tmedicci will be good receive your help.
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
ubuntu 24.0
NuttX Version
master
Issue Architecture
[Arch: risc-v]
Issue Area
[Area: Drivers]
Host information
Esptool version:
4.8.dev4
HAL version:
sync/release_v5.1.c-nuttx-20230814-1576-g87ccbf88b6
CHIP ID:
ESP32-C6 has no Chip ID. Reading MAC instead.
Flash ID:
Manufacturer: c8
Device: 4017
Verification
The text was updated successfully, but these errors were encountered: