在linux下编译驱动程序,用arm-linux-gcc编译时出现了很多错误?
PWM产生程序.c:1:26:error:linux/module.h:NosuchfileordirectoryPWM产生程序.c:4:24:error:linux/i...
PWM产生程序.c:1:26: error: linux/module.h: No such file or directory
PWM产生程序.c:4:24: error: linux/init.h: No such file or directory
PWM产生程序.c:5:25: error: linux/delay.h: No such file or directory
PWM产生程序.c:7:21: error: asm/irq.h: No such file or directory
PWM产生程序.c:8:20: error: asm/io.h: No such file or directory
PWM产生程序.c:9:29: error: linux/interrupt.h: No such file or directory
PWM产生程序.c:10:25: error: asm/uaccess.h: No such file or directory
PWM产生程序.c:11:27: error: mach/hardware.h: No such file or directory
PWM产生程序.c:12:29: error: plat/regs-timer.h: No such file or directory
PWM产生程序.c:13:27: error: mach/regs-irq.h: No such file or directory
PWM产生程序.c:14:27: error: asm/mach/time.h: No such file or directory
PWM产生程序.c:15:23: error: linux/clk.h: No such file or directory
PWM产生程序.c:16:24: error: linux/cdev.h: No such file or directory
PWM产生程序.c:17:26: error: linux/device.h: No such file or directory
PWM产生程序.c:18:30: error: linux/miscdevice.h: No such file or directory
PWM产生程序.c:20:27: error: plat/gpio-cfg.h: No such file or directory
PWM产生程序.c:21:29: error: plat/regs-clock.h: No such file or directory
PWM产生程序.c:22:28: error: plat/regs-gpio.h: No such file or directory
make -C /UP-Magic6410/SRC/kernel/linux-2.6.21_magic M=/UP-Magic6410/a直流电机(0110)/motor/driver modules
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `make -C /UP-Magic6410/SRC/kernel/linux-2.6.21_magic M=/UP-Magic6410/a直流电机(0110)/motor/driver modules'
make: *** [modules] 错误 2
这个又是怎么回事呢 展开
PWM产生程序.c:4:24: error: linux/init.h: No such file or directory
PWM产生程序.c:5:25: error: linux/delay.h: No such file or directory
PWM产生程序.c:7:21: error: asm/irq.h: No such file or directory
PWM产生程序.c:8:20: error: asm/io.h: No such file or directory
PWM产生程序.c:9:29: error: linux/interrupt.h: No such file or directory
PWM产生程序.c:10:25: error: asm/uaccess.h: No such file or directory
PWM产生程序.c:11:27: error: mach/hardware.h: No such file or directory
PWM产生程序.c:12:29: error: plat/regs-timer.h: No such file or directory
PWM产生程序.c:13:27: error: mach/regs-irq.h: No such file or directory
PWM产生程序.c:14:27: error: asm/mach/time.h: No such file or directory
PWM产生程序.c:15:23: error: linux/clk.h: No such file or directory
PWM产生程序.c:16:24: error: linux/cdev.h: No such file or directory
PWM产生程序.c:17:26: error: linux/device.h: No such file or directory
PWM产生程序.c:18:30: error: linux/miscdevice.h: No such file or directory
PWM产生程序.c:20:27: error: plat/gpio-cfg.h: No such file or directory
PWM产生程序.c:21:29: error: plat/regs-clock.h: No such file or directory
PWM产生程序.c:22:28: error: plat/regs-gpio.h: No such file or directory
make -C /UP-Magic6410/SRC/kernel/linux-2.6.21_magic M=/UP-Magic6410/a直流电机(0110)/motor/driver modules
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `make -C /UP-Magic6410/SRC/kernel/linux-2.6.21_magic M=/UP-Magic6410/a直流电机(0110)/motor/driver modules'
make: *** [modules] 错误 2
这个又是怎么回事呢 展开
展开全部
不改makefile文件,当然不能编译了,linux的驱动就是这么搞的啊,没办法的,反正是批处理的,也就多花点时间嘛,你可以把一些不需要的驱动,选择不编译,这样就能加快速度了。给你个办法,在windows虚拟机中安装交叉编译环境,你可以在windows下编辑你的程序,linux只起到编译的作用,这样,两个工作可以同时进行,有空你还可以上上网,这样你就不觉得时间长了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询