登陆论坛
|
论坛注册
|
加入收藏
|
设为首页
|
RSS
首页
Linux频道
软件下载
开发语言
嵌入式频道
开源论坛
|
数据库开发
|
WEB开发
|
软件开发
|
嵌入应用
|
内核研究
|
SHELL
|
输入您的搜索字词
提交搜索表单
您当前的位置:
首页
>
Linux频道
>
Linux开发区
>
嵌入应用
添加uClinux用户应用程序
时间:2007-06-04 12:07:28 来源:
Linux联盟收集整理
作者:
1. uClinux-dist/user/Makefile
dir_$(CONFIG_USER_HELLO_WORLD) += hello
2. uClinux-dist/config/Configure.help
CONFIG_USER_HELLO_WORLD
A simple hello world program
3. uClinux-dist/config/config.in
找到下面两行
mainmenu_option next_comment
comment 'Miscellaneous Applications'
添加如下一行
bool 'hello' CONFIG_USER_HELLO_WORLD
4.1. uClinux-dist/user/hello/Makefile
EXEC = hello
OBJS = hello.o
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
romfs:
$(ROMFSINST) /bin/$(EXEC)
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
4.2. uClinux-dist/user/hello/hello.c
#include <stdio.h>
int main()
{
printf("Hello, World\n");
return 0;
}
5. 将用户程序编译进romfs
# cd ~/uClinux-dist
# make menuconfig
# make dep
# make romfs
参考资料:
uClinux-dist/Documentation/Adding-User-Apps-HOWTO
来顶一下
返回首页
发表评论
共有
条评论
用户名:
密码:
验证码:
匿名发表
相关文章
无相关信息
栏目更新
栏目热门
站内搜索:
Linux频道
下载频道
图库
商品
嵌入式频道
高级搜索
网站首页
|
栏目导航
|
服务条款
|
广告服务
|
联系我们
|
网站大全
|
免责声明
|
返回顶部
Copyright © 2007-2008 xxlinux.com, All rights reserved.
Powered by linux联盟
京ICP备05012402号