原创 ucfs 移植到stm32

2010-10-25 16:54 3435 4 6 分类: MCU/ 嵌入式

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.


填写好头文件的路径是工程编译不出错很重要的一步。


 

PARTNER CONTENT

文章评论2条评论)

登录后参与讨论

用户377235 2014-6-1 10:22

垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾垃圾

用户377235 2013-7-5 09:33

垃圾

用户1053025 2007-3-14 11:29

这个,avan在行,呵呵
相关推荐阅读
用户78924 2012-07-03 14:26
1
未保存截图_24                      ...
用户78924 2011-03-25 18:53
为人处世
我总是太顾及别人感受不知道如何拒绝别人 悬赏分:20 | 解决时间:2009-6-26 18:06 | 提问者:匿名 我总是太顾及别人感受,觉得拒绝别人会很不好意思,特别是不熟的人。 比如我同租的...
用户78924 2011-03-25 12:06
逻辑思维 摘要
不是你逻辑思维不行,而是你的思维方式不一样。碰到一个问题,你的思维方式可能和熟练程序员的思维方式不一样。还有就是你的基础知识不够好,不要以为编程只要会C++,JAVA就可以了,这只是很小而且很不重要的...
用户78924 2011-03-19 10:21
关于严密思维
                                                    程序员应当有这样的严密思维 某日,老师在课堂上想看看一学生智商有没有问题,问他 >   &...
用户78924 2011-02-23 11:42
没有找到MFC80UD.DLL
vs2005/8 没有找到MFC80UD.DLL,因此这个程序未能启动.重新安装应用程序可能会修复此问题 在vs2005 sp1中文版中,在“解决方案资源管理器”中的项目上右击,选择“属性”,找...
用户78924 2010-11-06 19:36
(转)不再害怕指针
前言:复杂类型说明要了解指针,多多少少会出现一些比较复杂的类型,所以我先介绍一下如何完全理解一个复杂类型,要理解复杂类型其实很简单,一个类型里会出现很多运算符,他们也像普通的表达式一样,有优先级,其优...
EE直播间
更多
我要评论
2
4
关闭 站长推荐上一条 /3 下一条