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] Several file utilities only occasually work #13857

Open
1 task done
UAV-Pilot opened this issue Oct 6, 2024 · 2 comments
Open
1 task done

[BUG] Several file utilities only occasually work #13857

UAV-Pilot opened this issue Oct 6, 2024 · 2 comments
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: File System File System issues

Comments

@UAV-Pilot
Copy link

UAV-Pilot commented Oct 6, 2024

Description / Steps to reproduce the issue

On Pi Pico W board with Pi Pico SDK 2.0, setup a system with working flash SmartFS file system and USB console, e.g.,
./tools/configure.sh -l raspberrypi-pico-w:nsh-flash
reference raspberrypi-pico-w:usbnsh base configuration to add USB console
or execute the following script:

#!/bin/bash

#kconfig-tweak --set-val CONFIG_BASE_DEFCONFIG "raspberrypi-pico-w:telnet-dirty"
kconfig-tweak --disable CONFIG_DEBUG_USB
kconfig-tweak --enable CONFIG_BOARDCTL_USBDEVCTRL
kconfig-tweak --disable CONFIG_DEV_CONSOLE
kconfig-tweak --enable CONFIG_SERIAL_REMOVABLE
kconfig-tweak --enable CONFIG_SERIAL_TXDMA
kconfig-tweak --enable CONFIG_SERIAL_RXDMA
kconfig-tweak --disable CONFIG_UART0_SERIAL_CONSOLE
kconfig-tweak --enable CONFIG_NO_SERIAL_CONSOLE
kconfig-tweak --enable CONFIG_USBDEV

# USB Device Controller Driver Options
kconfig-tweak --set-val CONFIG_USBDEV_EPBUFFER_ALIGNMENT 0
kconfig-tweak --enable CONFIG_USBDEV_SELFPOWERED
kconfig-tweak --set-val CONFIG_USBDEV_MAXPOWER 100
kconfig-tweak --set-val CONFIG_USBDEV_TRACE_INITIALIDSET 0

# USB Device Class Driver Options
kconfig-tweak --enable CONFIG_CDCACM
kconfig-tweak --enable CONFIG_CDCACM_CONSOLE
kconfig-tweak --enable CONFIG_CDCACM_HAVE_EPINTIN
kconfig-tweak --set-val CONFIG_CDCACM_EP0MAXPACKET 64
kconfig-tweak --set-val CONFIG_CDCACM_EPINTIN 1
kconfig-tweak --set-val CONFIG_CDCACM_EPINTIN_FSSIZE 64
kconfig-tweak --set-val CONFIG_CDCACM_EPBULKOUT 3
kconfig-tweak --set-val CONFIG_CDCACM_EPBULKOUT_FSSIZE 64
kconfig-tweak --set-val CONFIG_CDCACM_EPBULKIN 2
kconfig-tweak --set-val CONFIG_CDCACM_EPBULKIN_FSSIZE 64
kconfig-tweak --set-val CONFIG_CDCACM_NRDREQS 4
kconfig-tweak --set-val CONFIG_CDCACM_NWRREQS 4
kconfig-tweak --set-val CONFIG_CDCACM_BULKOUT_REQLEN 256
kconfig-tweak --set-val CONFIG_CDCACM_BULKIN_REQLEN 96
kconfig-tweak --set-val CONFIG_CDCACM_RXBUFSIZE 257
kconfig-tweak --set-val CONFIG_CDCACM_TXBUFSIZE 193
kconfig-tweak --set-val CONFIG_CDCACM_VENDORID 0x0525
kconfig-tweak --set-val CONFIG_CDCACM_PRODUCTID 0xa4a7
kconfig-tweak --set-val CONFIG_CDCACM_VENDORSTR "NuttX"
kconfig-tweak --set-val CONFIG_CDCACM_PRODUCTSTR "CDC/ACM Serial"

kconfig-tweak --enable CONFIG_NSH_USBCONSOLE
kconfig-tweak --set-val CONFIG_NSH_USBCONDEV "/dev/ttyACM0"
kconfig-tweak --set-val CONFIG_USBDEV_MINOR 0
kconfig-tweak --disable CONFIG_NSH_USBDEV_TRACE
kconfig-tweak --disable CONFIG_SYSTEM_CDCACM

The problem happens with df, free and also with ifconfig. The following is an example for df.

nsh> cd /flash
nsh> ls -l
/flash:
 -rwsrwsrwx          14 test
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Moun         0          0           0 /proc

nsh> df .
  Block    Number
  Size     Blocks       Used   Available Moun         0          0           0 /proc

nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounted on
  1024       1468         12        1456 /flash
     0 nsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Moun         0          0           0 /proc

nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounted on
  1024       1468         12        1456 /flash
     0 nsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounted on
  1024       1468         12        1456 /flash
     0          0          0           0 /proc

nsh> df .
  Block    Number
  Size     Blocks       Used   Available Moun         0          0           0 /proc

nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounted on
  1024       1468         12        1456 /flash
     0 nsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounted on
  1024       1468         12        1456 /flash
     0 nsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>
nsh> df .
  Block    Number
  Size     Blocks       Used   Available Mounnsh>

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Windows 11 WSL2 Ubuntu 22.04.2

NuttX Version

NuttX 12.7.0-RC0 0976258-dirty Oct 4 2024 22:58:36 arm rasp

Issue Architecture

[Arch: arm]

Issue Area

[Area: File System]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Area: File System File System issues labels Oct 6, 2024
@xiaoxiang781216
Copy link
Contributor

could you switch to littlefs and compare the result?

@UAV-Pilot
Copy link
Author

Created a related bug: #13882 (Flash file system creation process does not take configured parameters on Pi Pico #13882), don't know how to create a working littlefs. Note that in menuconfig, selecting RP2040_FLASH_FILE_SYSTEM (Configure a read/write filesystem on unused flash memory) will automatically select SmartFS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: File System File System issues
Projects
None yet
Development

No branches or pull requests

2 participants