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

[BUG] ESP32C6 - UsbConsole feature not working #15656

Open
1 task done
FelipeMdeO opened this issue Jan 22, 2025 · 4 comments
Open
1 task done

[BUG] ESP32C6 - UsbConsole feature not working #15656

FelipeMdeO opened this issue Jan 22, 2025 · 4 comments
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Area: Drivers Drivers issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working

Comments

@FelipeMdeO
Copy link
Contributor

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

  • I have verified before submitting the report.
@FelipeMdeO FelipeMdeO added the Type: Bug Something isn't working label Jan 22, 2025
@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Area: Drivers Drivers issues OS: Linux Issues related to Linux (building system, etc) labels Jan 22, 2025
@tmedicci
Copy link
Contributor

Hi @FelipeMdeO !

Thanks for reporting. We'll talk about it internally and address it according to our schedule.

@FelipeMdeO
Copy link
Contributor Author

Hello.

I tried to build exactly commit that this feature was added:
git checkout 86efbcb -- apps
git checkout 9bd1d5d -- nuttx

It is so old and I cannot build, @acassis can you help me, please:

./tools/configure.sh esp32c6-generic:usbconsole
make CROSSDEV=riscv-none-elf-

I am facing build issues below:

CC:  clock/clock_settime.c /home/felipe-moura/nuttxspace/nuttx/include/arch/irq.h: Assembler messages:
/home/felipe-moura/nuttxspace/nuttx/include/arch/irq.h:675: Error: unrecognized opcode `csrrc s1,mstatus,s1', extension `zicsr' required
/home/felipe-moura/nuttxspace/nuttx/include/arch/irq.h:700: Error: unrecognized opcode `csrw mstatus,s1', extension `zicsr' required
make[1]: *** [Makefile:60: clock_settime.o] Error 1
make: *** [tools/LibTargets.mk:65: sched/libsched.a] Error 2

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.

@FelipeMdeO
Copy link
Contributor Author

Hello All.

I want to share an strange behavior.
UsbConsole works properly when I remove compile optimization, in other words, the usbconsole stop to work when optimization flag change to -O2.

You can reproduce it going to menuconfig and changing Optimization Level to DEBUG_NOOPT.

I will continue the investigation.

@eren-terzioglu
Copy link
Contributor

Hello.

I tried to build exactly commit that this feature was added: git checkout 86efbcb -- apps git checkout 9bd1d5d -- nuttx

It is so old and I cannot build, @acassis can you help me, please:

./tools/configure.sh esp32c6-generic:usbconsole make CROSSDEV=riscv-none-elf-

I am facing build issues below:

CC:  clock/clock_settime.c /home/felipe-moura/nuttxspace/nuttx/include/arch/irq.h: Assembler messages:
/home/felipe-moura/nuttxspace/nuttx/include/arch/irq.h:675: Error: unrecognized opcode `csrrc s1,mstatus,s1', extension `zicsr' required
/home/felipe-moura/nuttxspace/nuttx/include/arch/irq.h:700: Error: unrecognized opcode `csrw mstatus,s1', extension `zicsr' required
make[1]: *** [Makefile:60: clock_settime.o] Error 1
make: *** [tools/LibTargets.mk:65: sched/libsched.a] Error 2

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,

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.

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 Area: Drivers Drivers issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants