QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 891|回复: 3

ADC驱动程序调试问题

[复制链接]
发表于 2005-3-22 10:50:12 | 显示全部楼层 |阅读模式
[root@localhost arm]# arm-elf-gcc -Wl,-elf2flt -o adc adc.c
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:14,
                 from adc.c:5:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:18,
                 from adc.c:5:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h:18: parse error before `wait_queue_head_t'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h:18: warning: no semicolon at end of struct or union
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h: In function `sema_init':
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h:47: dereferencing pointer to incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h:48: dereferencing pointer to incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h:49: dereferencing pointer to incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h: In function `sem_getcount':
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/semaphore.h:130: dereferencing pointer to incomplete type
adc.c: At top level:
adc.c:24: variable `adc_fops' has initializer but incomplete type
adc.c:25: warning: excess elements in struct initializer
adc.c:25: warning: (near initialization for `adc_fops')
adc.c:26: warning: excess elements in struct initializer
adc.c:26: warning: (near initialization for `adc_fops')
adc.c:27: warning: excess elements in struct initializer
adc.c:27: warning: (near initialization for `adc_fops')
adc.c:28: warning: excess elements in struct initializer
adc.c:28: warning: (near initialization for `adc_fops')
adc.c:29: warning: excess elements in struct initializer
adc.c:29: warning: (near initialization for `adc_fops')
adc.c:30: warning: excess elements in struct initializer
adc.c:30: warning: (near initialization for `adc_fops')
adc.c:31: warning: excess elements in struct initializer
adc.c:31: warning: (near initialization for `adc_fops')
adc.c:32: warning: excess elements in struct initializer
adc.c:32: warning: (near initialization for `adc_fops')
adc.c:33: warning: excess elements in struct initializer
adc.c:33: warning: (near initialization for `adc_fops')
adc.c:34: warning: excess elements in struct initializer
adc.c:34: warning: (near initialization for `adc_fops')
adc.c:35: warning: excess elements in struct initializer
adc.c:35: warning: (near initialization for `adc_fops')
adc.c:36: warning: excess elements in struct initializer
adc.c:36: warning: (near initialization for `adc_fops')
adc.c:37: warning: excess elements in struct initializer
adc.c:37: warning: (near initialization for `adc_fops')
调试中竟然出现那么多的错误,有哪位大侠可以帮忙吗?感谢不尽!!!!
发表于 2005-3-22 21:41:55 | 显示全部楼层
检查一下adc.c中的语法有没有错吧…………
回复

使用道具 举报

发表于 2005-3-22 22:24:39 | 显示全部楼层
struct file operation 语法有问题
回复

使用道具 举报

发表于 2005-3-23 11:10:19 | 显示全部楼层
昨天漏了一点,
这句也有错:arm-elf-gcc -Wl,-elf2flt -o adc adc.c

你可以看看书上范例驱动的Makefile是怎么写的…………
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-5 15:53 , Processed in 0.103303 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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