快乐虾http://blog.csdn.net/lights_joy/lights@hb165.com本文适用于ADI bf561 DSP优视BF561EVB开发板uclinux-2008r1.5-rc3Visual 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已经开始起作用了。