UCFS的结构:
API 对外的一些接口
CLIB 一些基本的标准C库函数的实现,主要是字符串,内存的处理。
CONFIG 针对各个target的一些配置项,包括各个类型的配置
DEVICE 设备层的封装,当前有硬盘,ram,smc,windows(IO接口)等;
主要实现FS__device_type的接口
FSL 文件系统层(对各种文件系统的支持),当前有FAT文件系统
LBL 逻辑块层(对os,device层的封装)
4.3. Integrating μC/FS into your system
In this chapter, you will learn how to add μC/FS to your system.
We assume that you are familiar with the tools you have selected for your
project (compiler, project manager, linker, etc.). You must thus be able to add
files, directories to the include search path, etc. It is also assumed, that you are
familiar with the OS you will be using in your target system, if you are using one.
4.3.1. Create a simple project without μC/FS
We recommend, that you create a small “hello world” program for your system.
That project should already use your OS and there should be a way to display
text on a screen or serial port.
4.3.2. Add your μC/FS configuration
In order to configure μC/FS for your system, you should create a new subdirectory
in μC/FS’s config directory and copy the files fs_conf.h and
fs_port.h from one of the other sub-directories to your directory. For the
following chapters, we assume that you have created a directory
FS\CONFIG\myconfig. Usually, the only file you have to modify is
fs_conf.h. For an easy startup, we recommend, that you disable all drivers
except the RAM disk driver. Please check out the chapter “Configuration of
μC/FS” for detailed information about the configuration.
4.3.3. Add μC/FS generic source code
Add all source files in the following directories:
FS\API
FS\FSL
FS\LBL
FS\OS
FS\DEVICE\RAM
and their sub-directories to your project.
4.3.4. Configure the search path
In order to build all the files that you added, you will have to add the following
directories to your path for include files:
FS\API
FS\CONFIG\myconfig
FS\LBL
FS\OS
4.3.5. Add generic sample code
For a quick and easy test of your μC/FS integration, you should use the code
found in FS\sample\main.c.
4.3.6. Build and test your application
If everything is configured correctly, you should now be able to build an
application containing a RAM disk on your target system.. If you encounter any
problem during the build process, please check your include path and your
configuration. Usually μC/FS‘s source code builds without any compiler warning.
Once you can build the application, you should be able to use it with your
target’s debugger environment just like we did with the Visual C++ sample
project.
Congratulations, you have successfully integrated μC/FS into your system.
填写好头文件的路径是工程编译不出错很重要的一步。
用户377235 2014-6-1 10:22
垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾
用户377235 2013-7-5 09:33
用户1053025 2007-3-14 11:29