DSP

uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(16):使用head.s做

2019-07-13 16:03发布

  快乐虾 http://blog.csdn.net/lights_joy/ lights@hb165.com   本文适用于 ADI bf561 DSP 优视BF561EVB开发板 uclinux-2008r1.5-rc3 Visual DSP++ 5.0(update 5)   欢迎转载,但请保留作者信息   创建uclinux工程时,默认的入口是uclinux _basiccrt.s,而我们需要用head.s做为入口,因此需要修改ldf文件中的相关定义。 uclinux.ldf文件中有这么几行: $OBJECTS_CORE_A =   /*$VDSG                */ /* Text inserted between these $VDSG comments will be preserved */ /*$VDSG                */      "uclinux_basiccrt.doj"    , RT_LIB_NAME(profile561)    , $COMMAND_LINE_OBJECTS {!DualCoreMem("CoreB")}    , "cplbtab561a.doj"    , RT_OBJ_NAME(crtn561) 在此先删除uclinux _basiccrt.doj,于是就变成了 $OBJECTS_CORE_A =   /*$VDSG                */ /* Text inserted between these $VDSG comments will be preserved */ /*$VDSG                */      , RT_LIB_NAME(profile561)    , $COMMAND_LINE_OBJECTS {!DualCoreMem("CoreB")}    , "cplbtab561a.doj"    , RT_OBJ_NAME(crtn561) 此外,还要在processor p0中保留__start的位置。在默认生成的LDF文件中,是这样的:    RESOLVE(start, 0xFFA00000)    KEEP(start,_main) 我们将其指向head.s中的__start,修改后变成:    RESOLVE(__start, 0xFFA00000)    KEEP(__start,_main) 当然,这样修改后会造成一系列的错误: [Error li1021]  The following symbols referenced in processor 'p0' could not be resolved:         '__bss_start [___bss_start]' referenced from 'corea.dlb[head.doj]'         '__bss_stop [___bss_stop]' referenced from 'corea.dlb[head.doj]'         '_sdata [__sdata]' referenced from 'corea.dlb[head.doj]'         '_stext [__stext]' referenced from 'corea.dlb[head.doj]'         'bf53x_relocate_l1_mem [_bf53x_relocate_l1_mem]' referenced from 'corea.dlb[head.doj]'         'cmdline_init [_cmdline_init]' referenced from 'corea.dlb[head.doj]'         'init_pda [_init_pda]' referenced from 'corea.dlb[head.doj]'         'init_thread_union [_init_thread_union]' referenced from 'corea.dlb[head.doj]'         'start_kernel [_start_kernel]' referenced from 'corea.dlb[head.doj]' 没关系,这正好说明我们的head.s已经开始起作用了。    

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) uclinux-2008R1.5-RC3(bf561)VDSP5的移植(15)CONFIG_BANK_x(2009-1-13)