摘 要: FreeRTOS作为一款免费的实时操作系统,系统内核小、裁剪方便、移植性好,广泛应用于对成本敏感的小型嵌入式系统中,但是FreeRTOS本身不带文件管理功能,不便于很多需要经常进行文件存储与读写的应用。为了提高该操作系统易用性,介绍一款免费、小巧并且读写高效的文件管理系统,即FATFS,详细说明FATFS在FreeRTOS上的移植与注意事项,重点说明了FATFS在FreeRTOS中如何解决重入的问题,最后在STM32F4平台上对U盘进行读写来验证其文件管理的效果。结果表明,其可以很好地完成文件管理的功能。
关键词: 嵌入式操作系统; FATFS; FreeRTOS; 文件管理系统
中图分类号: TN911?34; TP319 文献标识码: A 文章编号: 1004?373X(2017)06?0065?03
Abstract: As a free real?time operating system, FreeRTOS is widely used in cheap system due to its small system kernel, convenent trim and good portability. However, FreeRTOS itself does not have any file management function, so it is not inconvenient for some applications of often writing and reading files. To make it easy to use, a free?charge, small and efficient file management system, FATFS is introduced in this paper. The FATFS transplantation and matters needing attention on FreeRTOS are illustrated in detail. The method that how to solve the problem of FATFS′s re?entry in the FreeRTOS is described emphatically. A test to read and write something in a U?disk on the platform STM32F4 was conducted to verify its effect. The result sh