测试指南
测试环境
硬件
- 开发板,或者 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
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Baremetal
aic # ls
Directory /:
System Volume Information<DIR>
aic # echo 123456 /1.txt
aic # cat /1.txt
123456
1
2
3
4
5
6
2
3
4
5
6
热插拔测试
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.
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
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
1
2
3
4
5
2
3
4
5