Chinaunix
标题:
LPC3250 BSP Header Files' Position
[打印本页]
作者:
chenxibing008
时间:
2009-10-14 20:11
标题:
LPC3250 BSP Header Files' Position
LPC3250 BSP Header Files' Position
需求 用户驱动一般都会有这样类似的文件包含:#include 这就要求平台相关的头文件必须放在include/asm/arch/目录下,而LPC3250的平台相关头文件却放在arch/arm/mach-lpc32xx/include/mach/目录下,如下所示:[chenxibing@localhost linux-2.6.27.8]$ ls arch/arm/mach-lpc32xx/include/mach/board.h i2c.h lpc32xx_gpio.h lpc32xx_rtc.h lpc32xx_uart.h uncompress.hclock.h io.h lpc32xx_hsuart.h lpc32xx_sdcard.h lpc32xx_usbd.h vmalloc.hdebug-macro.S irqs.h lpc32xx_i2c.h lpc32xx_slcnand.h memory.hdma.h lpc32xx_clcdc.h lpc32xx_i2s.h lpc32xx_ssp.h platform.hentry-macro.S lpc32xx_clkpwr.h lpc32xx_kscan.h lpc32xx_timer.h system.hhardware.h lpc32xx_dmac.h lpc32xx_mac.h lpc32xx_tsc.h timex.h
为了不修改驱动程序代码,以保证代码的最大兼容性,我们可以做一个连接,将arch/arm/mach-lpc32xx/include/mach/连接到include/asm/arch/目录:[chenxibing@localhost asm-arm]$ pwd/home/chenxibing/lpc3250/linux-2.6.27.8/include/asm-arm[chenxibing@localhost asm-arm]$ ln -s ../../arch/arm/mach-lpc32xx/include/mach/ arch 最后得到的结果就是:
[chenxibing@localhost linux-2.6.27.8]$ ls include/asm-arm/arch/board.h i2c.h lpc32xx_gpio.h lpc32xx_rtc.h lpc32xx_uart.h uncompress.hclock.h io.h lpc32xx_hsuart.h lpc32xx_sdcard.h lpc32xx_usbd.h vmalloc.hdebug-macro.S irqs.h lpc32xx_i2c.h lpc32xx_slcnand.h memory.hdma.h lpc32xx_clcdc.h lpc32xx_i2s.h lpc32xx_ssp.h platform.hentry-macro.S lpc32xx_clkpwr.h lpc32xx_kscan.h lpc32xx_timer.h system.hhardware.h lpc32xx_dmac.h lpc32xx_mac.h lpc32xx_tsc.h timex.h
这样,使用了#include 的文件编译也不会出错了。
本文来自ChinaUnix博客,如果查看原文请点:
http://blog.chinaunix.net/u1/51797/showart_2070469.html
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2