apache / apache/nuttx

[HELP] stm32f411-minimum board USB device CDC/ACM nsh console

Open
#16,774 8 comments 0 reactions 0 assignees View on GitHub
Community: Question
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description

This month, I discovered the NuttX project when I was searching for a versatile RTOS that supports multiple architectures. To be honest, this project is very interesting for me because I can use it in my DIY and other applications.
I have read the NuttX Documentation and watched the video playlist called "NuttX Get Started" on YouTube.

However, I have run into a problem.
When I am following all the instructions from the video (https://www.youtube.com/watch?v=rgZJPZh_po8), I succeed, but it is mindlessly repeating steps without truly understanding what I am doing.

I want to learn NuttX properly because I need to use Nuttx in my own projects. The knowledge I have gained from the video is not enough to implement anything beyond copying the example project.

To solve this, I tried exploring the NuttX Documentation. While it covers OS components, license information, implementation details well, I miss transferring the knowledge gained from the implementation of a specific project (even if just by repeating the actions from the video) to a more general case. For example, after watching a video on how to configure SPI-flash, I would be able to apply this experience to configure NOR-flash on another hardware.
The "Getting Started" section only covers basic compilation (nuttx.bin), nothing more.

I set myself the task, guided by the knowledge gained from this video, to try to do the same thing but on a different microcontroller from STMicro.

My Test Project:
I want to change the NSH console from the default /dev/ttyS0 (UART1) to /dev/ttyACM0 (USB CDC/ACM) on an STM32F411 (Black Pill) board.

What I’ve Tried:
Successfully replicated the USB console setup on STM32F103 (as shown in the video).
Tried the same steps on the STM32F411 (with adjusted configure.sh settings).
Compilation succeeds, but /dev/ttyACM0 does not appear on my Debian host (dmesg/lsusb show nothing).

My configuration was:
./tools/configure.sh stm32f411-minimum:nsh
CONFIG_STM32_OTGFS=y
CONFIG_USBDEV=y
CONFIG_CDCACM=y
CONFIG_CDCACM_CONSOLE=y
CONFIG_NO_SERIAL_CONSOLE=y
CONFIG_BOARDCTL_USBDEVCTRL=y
CONFIG_CONFIG_NSH_USBCONSOLE=y
CONFIG_CONFIG_NSH_USBCONDEV=/dev/ttyACM0

And I sure that the USB pins are worked properly and there is no problem with any hardware on the board.

I hope you now understand my struggle — I feel like I have hit a dead end in learning NuttX.

Could you please:

Explain what I might be missing in the configuration?
Suggest an approach for working with new microcontroller or untested configurations:
What steps should I take to understand the full setup (kconfig, source code, application settings, etc.)?

Or it could it be a bug?

Any advice would be greatly appreciated!

### Verification

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.