传统嵌入式设备对SD卡的读取一般基于硬件层面,这么做省资源但是换来的是时序麻烦,移植困难,读取文件不灵活.针对资源较为丰富的嵌入式方案,利用SoPC技术和灵活的NIOSⅡ软核,提出了一种在SD卡上建立了FAT32文件系统的方法,实现了对文件的基本操作如新建、读取、删除等,并在SD卡根目录里放置测试文档.对NIOSⅡ的代码实现进行测试,结果表明NIOSⅡ顺利地读出了文档里的内容,以及根目录其他文件夹.测试实验在Terasic的DE2系列开发板上通过验证.该方案方便了开发者对不同嵌入式设备进行移植,使其更加专注于顶层操作.%Generally, the traditional embedded devices read the SD card based on the hardware level, which can reduce the hardware resource consumption for sure, but comes with the complicated timing, difficult transplant and inconvenient file reading. For the rich-resource embedded solution, a method of establishing FAT32 file system in SD card by using SoPC and NIOS II is proposed. It is tha way to implement the file operation including New, Read and Delete, and place the test document in root directory to test the code of NIOS II. The result shows that the contents in the file and other files in root directory can be read successfully by NIOS H. The testing experiment was validated in the DE2-115 development board. The solution helps the developers to transplant different embedded devices to other devices and allows them to focus on the top-level operation.
展开▼