Edit online

测试指南

26 Nov 2024
Read time: 3 minute(s)

测试环境

  • 硬件
    • 开发板,或者 FPGA 板子

    • 板子上必须要接有 eMMC/SDCard

  • 软件
    • PC 端的串口终端软件,用于 PC 和开发板进行串口通信

    • RT-Thread DFS 组件自带了一些命令的文件操作工具,如 cp、mkdir 等

DFS 配置

参见 文件系统配置

读写测试
  • RT-Thread
    Luban-Lite 可以扩展 RT-Thread DFS 命令中的 cp 命令,以便在拷贝完成后显示读写速度,可以按照以下步骤进行:
    aic /> cd data
    aic /data> ls
    Directory /data:
    fb0.argb            1536000
    aic /data> cp fb0.argb fb2.argb
    Copy data 1536000 B, speed 2.29 MB/s
    aic /data> cp fb0.argb /ramfs/fb2.argb
    Copy data 1536000 B, speed 13.32 MB/s
    aic /data> cp fb0.argb /ramfs/fb2.argb
    Copy data 1536000 B, speed 13.56 MB/s
    aic /data> cp /ramfs/fb2.argb fb2.argb
    Copy data 1536000 B, speed 8.23 MB/s
  • Baremetal
    aic # ls
    Directory /:
    System Volume Information<DIR>
    aic # echo 123456 /1.txt
    aic # cat /1.txt
    123456

热插拔测试

参见 热插拔配置

  • RT-Thread
    card removal detected!
    card insertion detected!
    01-02 07:21:10 I/SDMC: SDMC1 BW 1, sclk 50400 KHz, clk 400 KHz(406 KHz), div 2-62
    
    01-02 07:21:10 I/SDIO: SD card capacity 30533632 KB.
    01-02 07:21:10 I/SDMC: SDMC1 BW 1, sclk 50400 KHz, clk 50000 KHz(50400 KHz), div 1-0
    
    [I] aic_sdmc_set_iocfg()435 SDMC1 Buswidth 4, DDR mode 0, Current clock: 50000 KHz
    found part[0], begin: 65536, size: 29.121GB
    01-02 07:21:10 I/SDIO: try to mount file system!
    01-02 07:21:10 I/SDIO: try to mount file system!
    01-02 07:21:10 E/DFS: mount fs[elm] device[sd0] to /sdcard failed.
  • Baremetal
    card removal detected!
    card insertion detected!
    SDMC1 BW 1, sclk 50400 KHz, clk 400 KHz(406 KHz), div 2-31
    SD card capacity 30533632 KB.
    SDMC1 BW 4, sclk 50400 KHz, clk 50000 KHz(50400 KHz), div 1-0