快乐虾http://blog.csdn.net/lights_joy/lights@hb165.com本文适用于ADI bf561 DSP优视BF561EVB开发板uclinux-2008r1.5-rc3(smp patch)Visual DSP++ 5.0(update 5)欢迎转载,但请保留作者信息有一个警告:"../../linux-2.6.x/arch/blackfin/kernel/early_printk.c", line 188: cc1080: {D} warning:Function does not have a full prototypebfin_write_EVT15(early_trap);^实际上bfin_write_EVT15是个宏定义:F:/embed/uClinux/uClinux-dist-2008R1.5-RC3/linux-2.6.x/include/asm/mach-common/cdef_LPBlackfin.h(248):#define bfin_write_EVT15(val)bfin_write32(EVT15,val)查找cdef_LPBlackfin.h可以发现有这样的包含:F:/embed/uClinux/uClinux-dist-2008R1.5-RC3/linux-2.6.x/include/asm/mach/cdefBF561.h(40):#include 但不幸的是,vdsp也提供了一个叫cdefBF561.h的文件,而且在文件头有这样的语句:#ifndef _CDEF_BF561_H#define _CDEF_BF561_H而linux-2.6.x/include/asm/mach/cdefBF561.h的文件头也有:#ifndef _CDEF_BF561_H#define _CDEF_BF561_H这样在我们包含了vdsp的文件之后,自然uclinux下的这个文件就没有作用了,为此将linux-2.6.x/include/asm/mach/cdefBF561.h文件头的这两行改为:#ifndef _UCLINUX_CDEF_BF561_H#define _UCLINUX_CDEF_BF561_H需要同样处理的还有以下几个文件:linux-2.6.x/include/asm/blackfin.hlinux-2.6.x/include/asm/mach-common/def_LPBlackfin.hlinux-2.6.x/include/asm/mach-common/cdef_LPBlackfin.h经过这样处理后,会有一些宏定义重名,类似于这样的警告:"../../linux-2.6.x/include/asm/mach-common/def_LPBlackfin.h", line 36: cc0047: {D} warning:incompatible redefinition of macro "MK_BMSK_" (declared at line 28of "E:/Program Files/Analog Devices/VisualDSP5.0/Blackfin/include/def_LPBlackfin.h")#define MK_BMSK_(x) (1<对于此类错误,直接在config.h中加上#undef MK_BMSK_屏蔽掉VDSP的定义。