Oct 7

在EDK/SDK中使用/制作Library 不指定

RickySu , 18:10 , 技术经验 , 评论(0) , 引用(0) , 阅读(132) , Via 本站原创 | |
先来看Xilinx的两个Answer Record:
AR #31256 - 10.1 EDK - How to add a user software library in a project?
AR #29926 - 10.1 EDK - How can I create a user library in SDK?

一个说怎么用,一个说怎么做,看似很好,但是那个说怎么做的基本上等于没说。

于是找到另一个教程:Creating a shared and static library with the gnu compiler (gcc)

于是在SDK里实现的基本过程就变成:

1. 在SDK中首先需要把原来的程序调试成功,能得到正确的elf文件
2. 把SDK_projects\\Debug 目录中的.o文件都copy到另一个文件夹
3. 打开edk shell,用命令mb-ar -rcs libuser.a xx.o xx.o xx.o 把所有的.o文件集合为.a文件
4. 删除原来的.c文件
5. 在SDK的project properities中设置library的名字=user,并添加路径
6. 重新编译工程

[更多资料]
http://www.dwheeler.com/program-library/Program-Li...
Tags: , ,
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]