AnsweredAssumed Answered

FFT convertion to bare metal : undefined reference to `Ret_Add'

Question asked by willrobot on Oct 31, 2011
Latest reply on Oct 31, 2011 by willrobot

Following discution:

 

https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=46813&action=ForumBrowse&forum_id=39

 

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':
/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: 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: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: 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: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: 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: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: 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

Outcomes