DSP

uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(15):CONFIG_BA

2019-07-13 16:12发布

  快乐虾 http://blog.csdn.net/lights_joy/ lights@hb165.com   本文适用于 ADI bf561 DSP 优视BF561EVB开发板 uclinux-2008r1.5-rc3 Visual 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_0                          0x7BB0 #define CONFIG_BANK_1                          0x7BB0 #define CONFIG_BANK_2                          0x7BB0 #define CONFIG_BANK_3                          0xAAC3 #define CONFIG_C_AMBEN_ALL                     1 当然,根据需要,它们可以配置为其它的值。      

1       参考资料

uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(1):前言(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5移植(2):代码注释(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(3):vdsp项目创建(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(4):目录差异(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(5):'bf561.h'的问题(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(6):CONFIG_BFIN_KERNEL_CLOCK(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(7):CONFIG_MEM_MT48LC16M16A2TG_75(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(8):CONFIG_CLKIN_HZ(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(9):CONFIG_MEM_SIZE(2009-1-12) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(10):CONFIG_FLASH_SPEED_BTT(2009-1-13) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(11):__INIT(2009-1-13) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(12):trace_buffer_init(2009-1-13) uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(13):ENDPROC(2009-1-13) uclinux-2008R1.5-RC3(bf561)VDSP5的移植(14)__FINIT(2009-1-13)