This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4c0a8af494eb2cdebcad7b262393989bd79c3092 Author: Filipe Cavalcanti <[email protected]> AuthorDate: Thu Aug 20 10:33:19 2026 -0300 documentation: add sdmmc_spi defconfig to esp32p4-tab5 Adds reference to the sdmmc_spi defconfig of esp32p4-tab5, with mounting instructions for the SD Card. Signed-off-by: Filipe Cavalcanti <[email protected]> --- .../risc-v/esp32p4/boards/esp32p4-tab5/index.rst | 36 ++++++++++++++++++++++ boards/risc-v/esp32p4/common/src/CMakeLists.txt | 2 -- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-tab5/index.rst b/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-tab5/index.rst index 5baf93de89e..2d031f73a35 100644 --- a/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-tab5/index.rst +++ b/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-tab5/index.rst @@ -187,6 +187,42 @@ python This configuration enables the Python for ESP32-P4 on Tab5. Please refer to the :doc:`Python Interpreter </applications/interpreters/python/index>` page. +sdmmc_spi +--------- + +This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem. +It uses SPI to communicate with the SD Card, defaulting to SPI3. + +The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``, +however those are fixed by board design. + +The bringup process will automatically mount the SD Card to ``/mnt`` if SD Card is present. + +To manually mount the SD Card, make sure ``/dev/mmcsd0`` exists and then execute the following commands:: + + nsh> ls /dev + /dev: + console + mmcsd0 + null + ttyS0 + zero + nsh> mount -t vfat /dev/mmcsd0 /mnt + +This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a normal filesystem. +For example, you can read a file and write to it:: + + nsh> ls /mnt + /mnt: + hello.txt + nsh> cat /mnt/hello.txt + Hello World + nsh> echo 'NuttX RTOS' >> /mnt/hello.txt + nsh> cat /mnt/hello.txt + Hello World! + NuttX RTOS + nsh> + Building and flashing ===================== diff --git a/boards/risc-v/esp32p4/common/src/CMakeLists.txt b/boards/risc-v/esp32p4/common/src/CMakeLists.txt index e552b40888e..a7d2dc2523f 100644 --- a/boards/risc-v/esp32p4/common/src/CMakeLists.txt +++ b/boards/risc-v/esp32p4/common/src/CMakeLists.txt @@ -86,6 +86,4 @@ if(CONFIG_ESPRESSIF_ULP_USE_TEST_BIN) include(${NUTTX_DIR}/arch/risc-v/src/common/espressif/ulp.cmake) endif() -endif() - target_sources(board PRIVATE ${SRCS})
