Skip to content
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

arch/risc-v/espressif: Remove usb serial workaround for esp32 modules #15920

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

FelipeMdeO
Copy link
Contributor

@FelipeMdeO FelipeMdeO commented Mar 1, 2025

This pull request includes a change to the esp_txint function in the arch/risc-v/src/common/espressif/esp_usbserial.c file. The change primarily involves removing an optimization workaround and adding a call to flush the transmit FIFO.

After this change the usbserial config is able to work using all optimization levels.

Changes in esp_txint function:

  • Removed the __attribute__((optimize("O0"))) workaround.
  • Added a call to usb_serial_jtag_ll_txfifo_flush() at the beginning of the function.Remove workaround related riscv esp32 modules usbserial driver.

Testing

Using esp32c6, apply usbconsole config, build and flash, you will be able to use console by usb.

This PR solve the issue: #15656

@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small labels Mar 1, 2025
@FelipeMdeO FelipeMdeO force-pushed the bugfix/fix-usbserial-driver branch from 434755e to 679848a Compare March 1, 2025 19:32
@FelipeMdeO
Copy link
Contributor Author

@tmedicci @eren-terzioglu, can you review, please?

@eren-terzioglu
Copy link
Contributor

@tmedicci @eren-terzioglu, can you review, please?

Hi,
We are having a look, thanks for PR.

Copy link
Contributor

@jerpelea jerpelea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please copy the PR message as commit message and update the title to
arch/risc-v//espressif: Remove usb serial workaround for esp32 modules

@FelipeMdeO FelipeMdeO force-pushed the bugfix/fix-usbserial-driver branch 2 times, most recently from ce9883b to 0b65d80 Compare March 4, 2025 13:23
@FelipeMdeO FelipeMdeO requested a review from jerpelea March 4, 2025 13:24
This commit includes a change to the esp_txint function in the arch/risc-v/src/common/espressif/esp_usbserial.c file. The change primarily involves removing an optimization workaround and adding a call to flush the transmit FIFO.

After this change the usbserial config is able to work using all optimization levels.

Changes in esp_txint function:

Removed the __attribute__((optimize("O0"))) workaround.
Added a call to usb_serial_jtag_ll_txfifo_flush() at the beginning of the function.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
@FelipeMdeO FelipeMdeO force-pushed the bugfix/fix-usbserial-driver branch from 0b65d80 to eb621b5 Compare March 4, 2025 18:26
@jerpelea jerpelea merged commit 94f210d into apache:master Mar 5, 2025
17 checks passed
@FelipeMdeO FelipeMdeO deleted the bugfix/fix-usbserial-driver branch March 5, 2025 11:13
@jerpelea jerpelea changed the title arch/risc-v/common/espressif/espusbserial.c arch/risc-v/common/espressif/espusbserial: remove workaround for FIFO fluch Mar 25, 2025
@jerpelea jerpelea changed the title arch/risc-v/common/espressif/espusbserial: remove workaround for FIFO fluch arch/risc-v/common/espressif/espusbserial: remove workaround for FIFO flush Mar 25, 2025
@jerpelea jerpelea changed the title arch/risc-v/common/espressif/espusbserial: remove workaround for FIFO flush arch/risc-v/espressif: Remove usb serial workaround for esp32 modules Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants