快乐虾http://blog.csdn.net/lights_joy/lights@hb165.com本文适用于ADI bf561 DSP优视BF561EVB开发板uclinux-2008r1.5-rc3Visual DSP++ 5.0(update 5)欢迎转载,但请保留作者信息编译head.s时有几个警告:[Warning ea1092] "../linux-2.6.x/arch/blackfin/mach-bf561/head.S":199 Symbol 'CONFIG_BANK_0' is undefined.Check spelling. If 'CONFIG_BANK_0' is defined in a different file, use ".extern".[Warning ea1092] "../linux-2.6.x/arch/blackfin/mach-bf561/head.S":199 Symbol 'CONFIG_BANK_1' is undefined.Check spelling. If 'CONFIG_BANK_1' is defined in a different file, use ".extern".[Warning ea1092] "../linux-2.6.x/arch/blackfin/mach-bf561/head.S":192 Symbol 'CONFIG_BANK_2' is undefined.Check spelling. If 'CONFIG_BANK_2' is defined in a different file, use ".extern".[Warning ea1092] "../linux-2.6.x/arch/blackfin/mach-bf561/head.S":192 Symbol 'CONFIG_BANK_3' is undefined.Check spelling. If 'CONFIG_BANK_3' is defined in a different file, use ".extern".查一下CONFIG_BANK_x的定义,它们的作用是EBIU的配置,在asm/mach/bf561.h中是这样使用的:#define AMBCTL0VAL((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)#define AMBCTL1VAL((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)而在head.s中配置EBIU时使用了这两个值/* Code for initializing Async memory banks */p2.h = hi(EBIU_AMBCTL1);p2.l = lo(EBIU_AMBCTL1);r0.h = hi(AMBCTL1VAL);r0.l = lo(AMBCTL1VAL);[p2] = r0;ssync;p2.h = hi(EBIU_AMBCTL0);p2.l = lo(EBIU_AMBCTL0);r0.h = hi(AMBCTL0VAL);r0.l = lo(AMBCTL0VAL);[p2] = r0;ssync;p2.h = hi(EBIU_AMGCTL);p2.l = lo(EBIU_AMGCTL);r0 = AMGCTLVAL;w[p2] = r0;ssync;显然,编译器找不到CONFIG_BANK_x的定义,想当然地以为它是一个整数,所以出错,解决此错误的方法是在config.h中加上这样的定义:// EBIU_AMBCTL Control#define CONFIG_BANK_00x7BB0#define CONFIG_BANK_10x7BB0#define CONFIG_BANK_20x7BB0#define CONFIG_BANK_30xAAC3#define CONFIG_C_AMBEN_ALL1当然,根据需要,它们可以配置为其它的值。