blackfin gcc-toolchain 链接错误未定义对“Ret_Add”的引用
以下讨论:
我正在转换VDSP 编译器的 FFT 算法到裸机应用程序在核心 B 上运行并让 uclinux 在核心 A 上运行。我有一个链接错误,但我没有了解它来自哪里:
调用: '/opt/uClinux/bfin-elf/bin/../bfin-elf/bin/ld.real' '-v' '-o' 'test_ad1836_driver' '-T' 'coreb_test_ad1836_driver .lds' '--只是符号' '../../icc_core/icc' 'queue.o' 'ezkit_561.o' 'heap_2.o' 'port.o' 'tasks.o' 'test_ad1836_driver.o' 'list.o' 'crooutine.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''-lc' 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:未定义引用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:对 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:对 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:未定义引用
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”的未定义引用
代码如下所示:
.l1.data节;
.对齐4;
.var _Ret_Add =0;
.var _Save_R7 =0;
.l1.text;
.global _Compute_Cycle_Count;
.对齐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;
........
谢谢威廉
Following discution:
I'm converting the FFT algo for VDSP compiler to bare metal app to run on core B and have uclinux running on core A. I've a linking error I do not understand where it come from:
Invoking: '/opt/uClinux/bfin-elf/bin/../bfin-elf/bin/ld.real' '-v' '-o' 'test_ad1836_driver' '-T' 'coreb_test_ad1836_driver.lds' '--just-symbol' '../../icc_core/icc' 'queue.o' 'ezkit_561.o' 'heap_2.o' 'port.o' 'tasks.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' '-lc'
GNU ld version 2.17
cycle_count.o: In function Compute_Cycle_Count':
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:22: undefined reference to
/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: undefined reference to Ret_Add'
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:27: undefined reference to
/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: undefined reference to Save_R7'
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
/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: undefined reference to Save_R7'
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:48: undefined reference to
/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: undefined reference to `Ret_Add'
the code looks like:
.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;
........
Thanks
William
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的代码中没有 GNU 汇编程序可以理解的 _Ret_Add 和 _Save_R7 声明。您应该将其从 VDSP asm 移植到 GNU asm:
或者如果您希望保持向后兼容:
请查看 这个。
You have no declaration of _Ret_Add and _Save_R7 in your code to be understood by GNU assembler. You should port it from VDSP asm to GNU asm:
or maybe if you prefer keep it backwards compatible:
Take a look at this.