QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2058|回复: 6

驱动编译的问题请教

[复制链接]
发表于 2005-3-30 20:34:40 | 显示全部楼层 |阅读模式
为什么头文件会有那么多的错误呢???????请大侠们帮忙啊!敢时间完成爱!
[root@localhost arm]# arm-elf-gcc  -msoft-float -mcpu=arm7tdmi -fomit-frame-pointer -fsigned-char -mcpu=arm7tdmi -Os -Wall -DEMBED -D_uclinux_
-D__KERNEL__ -c -elf2flt -o adc3 adc3.c
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:19,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
                 from adc3.c:6:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/string.h:16: warning: conflicting types for built-in function `memcpy'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/string.h:26: warning: conflicting types for built-in function `memset'
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
                 from adc3.c:6:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:79: warning: conflicting types for built-in function `memcmp'
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda_fs_i.h:14,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:308,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
                 from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
                 from adc3.c:6:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:259: parse error before `u_quad_t'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:259: warning: no semicolon at end of struct or union
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:267: parse error before `va_bytes'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:267: warning: data definition has no type or storage class
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:268: parse error before `va_filerev'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:268: warning: data definition has no type or storage class
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:435: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:443: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:485: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:494: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:539: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:546: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:566: field `attr' has incomplete type
[root@localhost arm]#
发表于 2005-3-31 16:30:48 | 显示全部楼层
-D__linux__
回复

使用道具 举报

 楼主| 发表于 2005-3-31 21:09:35 | 显示全部楼层
为什么要用-D__linux__呢?我不是用在linux上的,我是用在uclinux上的.你的这个参数是什么意思呢??
回复

使用道具 举报

发表于 2005-4-6 03:31:26 | 显示全部楼层
试一下这个?
#arm-elf-gcc -Wall -elf2flt -mcpu=arm7tdmi hello.c -lc -o hello
回复

使用道具 举报

发表于 2006-6-23 11:46:46 | 显示全部楼层

驱动编译的问题请教

我的错误一样的,但我用的是-D__linux__,哪位大虾帮帮忙,谢了!
回复

使用道具 举报

发表于 2006-6-26 12:23:50 | 显示全部楼层
以上的错误问题有人解决了吗,在线等,谢谢
回复

使用道具 举报

发表于 2006-8-1 17:23:24 | 显示全部楼层
If it is indeed named arm-elf-gcc, it might not be compiled for Linux.. If it does not define __linux__, linux/coda.h will not compile. If this is indeed the case, the real fix would be to fix the cross compiler. As a quick test, you could also just add -D__linux__ to CFLAGS.

--
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 12:37 , Processed in 0.041836 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表