How to link object (.o) file in Eclipse

断了今生、忘了曾经 提交于 2019-11-27 08:30:11

问题


I'm trying to compile µcOSIII for my board (XMC4500 Relax Kit) but when I try to compile my files I get following output:

'Building target: XMC4500_uCOSIII.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../XMC4500_uCOSIII.ld" -nostartfiles -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"XMC4500_uCOSIII.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "XMC4500_uCOSIII.elf" "@makefile.rsp"  
Libraries/uCOS-III/Source/os_core.o: In function `OSIntExit':
D:\Dokumente\Dropbox\FH\4Semester\BAK Arbeit\workspace\XMC4500_uCOSIII\Debug/../Libraries/uCOS-III/Source/os_core.c:344: undefined reference to `OSIntCtxSw'
Libraries/uCOS-III/Source/os_core.o: In function `OSSched':
D:\Dokumente\Dropbox\FH\4Semester\BAK Arbeit\workspace\XMC4500_uCOSIII\Debug/../Libraries/uCOS-III/Source/os_core.c:421: undefined reference to `OSCtxSw'
Libraries/uCOS-III/Source/os_core.o: In function `OSStart':
D:\Dokumente\Dropbox\FH\4Semester\BAK Arbeit\workspace\XMC4500_uCOSIII\Debug/../Libraries/uCOS-III/Source/os_core.c:728: undefined reference to `OSStartHighRdy'
Libraries/uCOS-III/Ports/ARM-Cortex-M4/Generic/GNU/os_cpu_c.o: In function `OSTaskSwHook':
D:\Dokumente\Dropbox\FH\4Semester\BAK Arbeit\workspace\XMC4500_uCOSIII\Debug/../Libraries/uCOS-III/Ports/ARM-Cortex-M4/Generic/GNU/os_cpu_c.c:335: undefined reference to `OS_CPU_FP_Reg_Push'
D:\Dokumente\Dropbox\FH\4Semester\BAK Arbeit\workspace\XMC4500_uCOSIII\Debug/../Libraries/uCOS-III/Ports/ARM-Cortex-M4/Generic/GNU/os_cpu_c.c:339: undefined reference to `OS_CPU_FP_Reg_Pop'
collect2.exe: error: ld returned 1 exit status
make: *** [XMC4500_uCOSIII.elf] Error 1

**** Build Finished ****

if I get it right, the files os_core.o and os_cpu_c.o are not linked correctly to the project. I've tried linking these object files by clicking "Properties->C/C++ Build->Settings->ARM GCC Linker->Miscellaneous->Other objects". After compiling again I get to following output:

'Building target: XMC4500_uCOSIII.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../XMC4500_uCOSIII.ld" -nostartfiles -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"XMC4500_uCOSIII.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "XMC4500_uCOSIII.elf" "@makefile.rsp" D:/Dokumente/Dropbox/FH/4Semester/BAK\ Arbeit/workspace/XMC4500_uCOSIII/Release/Libraries/uCOS-III/Ports/ARM-Cortex-M4/Generic/GNU/os_cpu_c.o D:/Dokumente/Dropbox/FH/4Semester/BAK\ Arbeit/workspace/XMC4500_uCOSIII/Release/Libraries/uCOS-III/Source/os_core.o 
arm-none-eabi-gcc: error: D:/Dokumente/Dropbox/FH/4Semester/BAK\: No such file or directory
arm-none-eabi-gcc: error: Arbeit/workspace/XMC4500_uCOSIII/Release/Libraries/uCOS-III/Ports/ARM-Cortex-M4/Generic/GNU/os_cpu_c.o: No such file or directory
arm-none-eabi-gcc: error: D:/Dokumente/Dropbox/FH/4Semester/BAK\: No such file or directory
arm-none-eabi-gcc: error: Arbeit/workspace/XMC4500_uCOSIII/Release/Libraries/uCOS-III/Source/os_core.o: No such file or directory
make: *** [XMC4500_uCOSIII.elf] Error 1

**** Build Finished ****

file and directory exist other than said in this error :( anybody an idea how I can solve this problem or was my first step already wrong?

来源:https://stackoverflow.com/questions/23396199/how-to-link-object-o-file-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!