+ -
当前位置:首页 → 问答吧 → 7年嵌入式内核驱动工作,把这些年读过还不错的书籍推荐给大家

7年嵌入式内核驱动工作,把这些年读过还不错的书籍推荐给大家

时间:2009-10-05

来源:互联网

在用友善之臂的SBC2410开发板。编译提供的LED驱动范例时,碰到以下问题,不知是什么原因,希望大家帮忙看看。谢谢

代码:

alexander@alexander-desktop:/opt/FriendlyARM/SBC2410/kernel/drivers/char$
arm-linux-gcc   -D__KERNEL__ -I/opt/FriendlyARM/SBC2410/kernel/include/linux
-Wall   -Wstrict-prototypes -Wno-trigraphs   -Os   -mapcs
-fno-strict-aliasing   -fno-common  -fno-common   -pipe   -mapcs-32
-march=armv4   -mtune=arm9tdmi  -mshort-load-bytes   -msoft-float   -DMODULE
-c   -o  sbc2410_leds.o   sbc2410_leds.c


In file included from sbc2410_leds.c:2:
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys
-include/linux/module.h:297: linux/version.h: ????????
In file included from sbc2410_leds.c:11:
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys
-include/linux/irq.h:69: asm/hw_irq.h: ????????
In file included from
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys
-include/asm/hardware.h:16,
                 from sbc2410_leds.c:14:
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys
-include/asm/arch/hardware.h:16: asm/mach-types.h: ????????
In file included from sbc2410_leds.c:2:
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys
-include/linux/module.h:299: parse error before `UTS_RELEASE'
sbc2410_leds.c:20: `GPIO_B7' undeclared here (not in a function)
sbc2410_leds.c:20: initializer element is not constant
sbc2410_leds.c:20: (near initialization for `led_table[0]')
sbc2410_leds.c:21: `GPIO_B8' undeclared here (not in a function)
sbc2410_leds.c:21: initializer element is not constant
sbc2410_leds.c:21: (near initialization for `led_table[1]')
sbc2410_leds.c:22: `GPIO_B9' undeclared here (not in a function)
sbc2410_leds.c:22: initializer element is not constant
sbc2410_leds.c:22: (near initialization for `led_table[2]')
sbc2410_leds.c:23: `GPIO_B10' undeclared here (not in a function)
sbc2410_leds.c:23: initializer element is not constant
sbc2410_leds.c:23: (near initialization for `led_table[3]')
sbc2410_leds.c: In function `sbc2410_leds_ioctl':
sbc2410_leds.c:34: warning: implicit declaration of function
`write_gpio_bit'
sbc2410_leds.c: In function `sbc2410_leds_init':
sbc2410_leds.c:58: warning: implicit declaration of function `set_gpio_ctrl'
sbc2410_leds.c:58: `GPIO_PULLUP_EN' undeclared (first use in this function)
sbc2410_leds.c:58: (Each undeclared identifier is reported only once
sbc2410_leds.c:58: for each function it appears in.)
sbc2410_leds.c:58: `GPIO_MODE_OUT' undeclared (first use in this function)
alexander@alexander-desktop:/opt/FriendlyARM/SBC2410/kernel/drivers/char$



最后由 alexanderzhong 编辑于 2009-10-06 16:27,总共编辑了 1 次

作者: alexanderzhong   发布时间: 2009-10-05

版本是UBUNTU 9.04环境。arm-linux-gcc 2.95.3

作者: alexanderzhong   发布时间: 2009-10-05

你好!请问一下,下面的这些资源怎么才能下载到?
arm-linux-toolchains.tgz
matrix5-kernel-v5.5.tgz
vivi.tar.gz
Jflash.tgz
root-for-nfs-v5.5.tgz
我上网找了一下,但是没发现在哪里可以下载的。我现在才开始在学友善之臂的sbc2410这块板子,但是没有这些资源来建立开发环境。能否把这些资源发给我一份?谢谢!
我的邮箱是[email protected]
非常感谢!!!

作者: noreasona   发布时间: 2010-09-28