以下讨论:
我正在将用于VDSP编译器的FFT算法转换为裸机应用程序以在核心B上运行并且在核心A上运行uclinux。我有一个链接错误我不明白它来自哪里:
调用:'/ opt / uClinux / bfin -elf / bin /../ bfin-elf / bin / old.real''-v''-o''test_ad1836_driver''-T''coreb_test_ad1836_driver.lds' '--just-symbol''../../icc_core / icc''queue.o''ezkit_561.o''duper_2.o''port.o''admand.o''test_ad1836_driver.o''list .o''croutine.o''user_isr.o''bfin_isr.o''app_c.o''context_sl_asm.o''cycle_count.o''CFFT_Rad4_NS_NBRev.o''-Ttext''0x3c00000''-L'' / opt / uClinux / bfin-elf / bfin-elf / lib'' - L''/ opt / uClinux / bfin-elf / bfin-elf / lib''-lib'
GNU ld版本2.17
cycle_count.o:在函数Compute_Cycle_Count':
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:22: undefined reference to
Ret_Add'中
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:23:对Ret_Add'
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:27: undefined reference to
Save_R7'的未定义引用
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:28:对Save_R7'
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:44: undefined reference to
Save_R7'的未定义引用
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:45:对Save_R7'
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:48: undefined reference to
Ret_Add'的未定义引用
/home/william/Development_new/Music_Recognition/code/uCLinux/uclinux-dist/user/blkfin-apps/icc_utils/example/DSP_imp/CFFT_Rad4_NS_NBRev/corea/cycle_count.asm:49:对“Ret_Add”的未定义引用
代码如下:
.section l1.data;
.align 4;
.var _Ret_Add = 0;
.var _Save_R7 = 0;
.section l1.text;
.global _Compute_Cycle_Count;
.align 8;
_Compute_Cycle_Count:
P0.L = _Ret_Add;
P0.H = _Ret_Add;
R3 = RETS;
[P0] = R3;
P0.L = _Save_R7;
P0.H = _Save_R7;
[P0] = R7;
........
由于
威廉
答案 0 :(得分:0)
您的代码中没有声明 _Ret_Add 和 _Save_R7 ,以便GNU汇编程序理解。您应该将它从VDSP asm移植到GNU asm:
_Ret_Add: .int 0;
或者如果您愿意,请保持向后兼容:
.if defined (__GNUC__)
_Ret_Add:
.int 0;
.else
.var _Ret_Add =0;
.endif
看看this。