diff --git a/Documentation/platforms/xtensa/esp32s3/boards/lckfb-szpi-esp32s3/index.rst b/Documentation/platforms/xtensa/esp32s3/boards/lckfb-szpi-esp32s3/index.rst index 8760c443663..fae527ac37f 100644 --- a/Documentation/platforms/xtensa/esp32s3/boards/lckfb-szpi-esp32s3/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/boards/lckfb-szpi-esp32s3/index.rst @@ -486,3 +486,42 @@ Then test the IMU sensor:: object_name:sensor_accel, object_instance:0 sensor_gyro(now:113510000):timestamp:113510000,x:1.468750,y:1.562500,z:-0.093750,temperature:22.855469 sensor_accel(now:113510000):timestamp:113510000,x:-0.810913,y:0.027343,z:0.571167,temperature:22.855469 + +sdmmc +----- + +Basic NuttShell configuration console and SD card enabled via SDMMC peripheral +in 1-bit mode. The SD card pin mapping is as follows: + +===== ====== +Pin GPIO +===== ====== +CLK GPIO47 +CMD GPIO48 +D0 GPIO21 +===== ====== + +You can run the configuration and compilation procedure:: + + $ ./tools/configure.sh lckfb-szpi-esp32s3:sdmmc + $ make flash -j$(nproc) ESPTOOL_PORT=/dev/ttyUSB0 + +Then format and mount the SD card:: + + # Format the SD card with FAT32 + nsh> mkfatfs -F 32 /dev/mmcsd1 + + # Create mount point and mount + nsh> mkdir -p /mnt/sd + nsh> mount -t vfat /dev/mmcsd1 /mnt/sd + + # Verify + nsh> df + Block Number + Size Blocks Used Available Mounted on + 0 0 0 0 /proc + 512 124702720 0 124702720 /mnt/sd + + nsh> echo "hello" > /mnt/sd/test.txt + nsh> cat /mnt/sd/test.txt + hello diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/sdmmc/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/sdmmc/defconfig new file mode 100644 index 00000000000..1c605f5fbe3 --- /dev/null +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/sdmmc/defconfig @@ -0,0 +1,57 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_ARCH_LEDS is not set +# CONFIG_NSH_ARGCAT is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_ARCH="xtensa" +CONFIG_ARCH_BOARD="lckfb-szpi-esp32s3" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_ESP32S3_LCKFB_SZPI=y +CONFIG_ARCH_CHIP="esp32s3" +CONFIG_ARCH_CHIP_ESP32S3=y +CONFIG_ARCH_CHIP_ESP32S3WROOM1N16R8=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARCH_XTENSA=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BUILTIN=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_ESP32S3_SDMMC=y +CONFIG_ESP32S3_SDMMC_CLK=47 +CONFIG_ESP32S3_SDMMC_CMD=48 +CONFIG_ESP32S3_SDMMC_D0=21 +CONFIG_ESP32S3_UART0=y +CONFIG_FAT_LFN=y +CONFIG_FS_FAT=y +CONFIG_FS_PROCFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_IDLETHREAD_STACKSIZE=3072 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INIT_STACKSIZE=3072 +CONFIG_INTELHEX_BINARY=y +CONFIG_LINE_MAX=64 +CONFIG_MMCSD_CHECK_READY_STATUS_WITHOUT_SLEEP=y +CONFIG_MMCSD_MULTIBLOCK_LIMIT=128 +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_TIMERS=4 +CONFIG_RAM_SIZE=114688 +CONFIG_RAM_START=0x20000000 +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_WAITPID=y +CONFIG_SDIO_WIDTH_D1_ONLY=y +CONFIG_START_DAY=6 +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2011 +CONFIG_SYSLOG_BUFFER=y +CONFIG_SYSTEM_NSH=y +CONFIG_UART0_SERIAL_CONSOLE=y