-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[HELP] Minimum configuration for CDC ECM to work? #15880
Comments
@tao-at-pricer seems like there are examples only for lpc17xx and sama5 boards. You need to look at these boards to understand how to configure the options in menuconfig and how to create the composite USB to use with ECM. @adamfeuer since you configured it to your board, could you please give some hints here? |
Thank you @acassis , yes I indeed found these two configurations and tried to copy the settings, but I was not able to reproduce. Since I don't have dev boards with these two MCUs I can't verify if the stock configures still work with them. I assume it worked at the time it was created, but with development evolving, I want to get a reassurance if someone can verify that. I'll post my settings based on these two moment later. |
I'm still not able to get it working, after referencing both LPC17xx and SAMa5 examples, just some different errors pop up such as compiler complaining address containing double forward slash and so on. If someone can give a working example on either STM32 or Pi Pico, it will greatly shorten my try-n-error effort, still new to NuttX. For example, by copying most of the configs from LPC17xx, I got error like this: nuttxspace/nuttx$ make -j4
Create version.h
LN: platform/board to nuttxspace/apps/platform/dummy
Register: nsh
Register: sh
Register: ping
CPP: nuttxspace/nuttx/boards/arm/rp2040/raspberrypi-pico-w/scripts/raspberrypi-pico-flash.ld-> nuttxspace/nuttx/boards/arm/rp2040/raspberrypi-pico-w/scripts/raLD: nuttx
arm-none-eabi-ld: nuttxspace/nuttx/staging/libarch.a(arm_initialize.o): in function `up_initialize':
arm_initialize.c:(.text.up_initialize+0x2): undefined reference to `arm_addregion'
arm-none-eabi-ld: nuttxspace/nuttx/staging/libapps.a(icmp_ping.c.home.tao.repos.nuttxspace.apps.netutils.ping_1.o): in function `icmp_ping':
icmp_ping.c:(.text.icmp_ping+0x6c): undefined reference to `socket'
arm-none-eabi-ld: icmp_ping.c:(.text.icmp_ping+0x14e): undefined reference to `sendto'
arm-none-eabi-ld: icmp_ping.c:(.text.icmp_ping+0x23a): undefined reference to `recvfrom'
Memory region Used Size Region Size %age Used
flash: 92 KB 2 MB 4.49%
sram: 7012 B 264 KB 2.59%
make[1]: *** [Makefile:214: nuttx] Error 1
make: *** [tools/Unix.mk:552: nuttx] Error 2 Configuration for Pico W: CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="raspberrypi-pico-w"
CONFIG_ARCH_BOARD_RASPBERRYPI_PICO_W=y
CONFIG_ARCH_CHIP="rp2040"
CONFIG_ARCH_CHIP_RP2040=y
CONFIG_BOARD_LOOPSPERMSEC=10450
CONFIG_BUILTIN=y
CONFIG_CDCACM=y
CONFIG_CDCACM_COMPOSITE=y
CONFIG_CDCACM_CONSOLE=y
CONFIG_CDCECM_COMPOSITE=y
CONFIG_COMPOSITE_IAD=y
CONFIG_FS_BINFS=y
CONFIG_FS_PROCFS=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_RP2040_UART0=y
CONFIG_RP2040_USBDEV=y
CONFIG_RP2040_USBDEV_NOVBUS=y
CONFIG_MM_REGIONS=2
CONFIG_NETDEV_LATEINIT=y
CONFIG_NETINIT_NOMAC=y
CONFIG_NET_CDCECM=y
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCP=y
CONFIG_NET_UDP=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_USBCONSOLE=y
CONFIG_RAM_SIZE=270336
CONFIG_RAM_START=0x20000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_LPWORK=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_PING=y
CONFIG_USBDEV_COMPOSITE=y
CONFIG_UART0_SERIAL_CONSOLE=y |
@tao-at-pricer @acassis Hey there. I am still on NuttX 11.x for my SAMA5 app, TCP/IP over CDC/ECM works there. I will install 12.x and see if anything has changed. I've never used CDC/ECM on a non-SAMA5 device, but I do have an STMF4-Discovery, so will try that out and see if I can get it to work, and report back. Some questions. How are you looking to see if the CDCECM device is being recognized on the Linux side? The NuttX system will appear as a new ethernet interface. You should be able to see it using In the meantime. I know this config works on the SAMA5 on 11.x: And you may have looked here, but this is the Kconfig file (used by the menuconfig system that configures NuttX) for CDCECM: Line 1251 in fd6d804
|
Thanks @adamfeuer , please let me know what you'll find out on the STM32F4 discovery board, I have exactly this and I read in multiple places that it's the recommended board for newbies to start with. I did try the Mongoose example and it worked out of the box, link (https://mongoose.ws/documentation/tutorials/rp2040/pico-rndis-dashboard/), the title says RNDIS but it also contains example implementing CDC ECM, and that's the profile I used. When plugged in to computer it shows up as a network device and indeed I could find it with ip addr show, and I could use Wireshark and ScaPy to send and monitor ethernet packets. So I was expecting the same behavior when running NuttX examples. |
Description
Dear community, I've been having trouble to get USB CDC ECM to work, tried on both Raspberry Pi Zero W and STM32F4Discovery. There doesn't seem to be examples of how to configure this profile. I tried to get it show up in Debian as a standalone device, and as a composite together with a CDC ACM, the ACM worked fine, but couldn't see ECM popping up. My latest configure for STM32F4Discovery looks like this (composite and NOT working):
Verification
The text was updated successfully, but these errors were encountered: