This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TM4C129ENCPDT:使用主机 MCU 对 CC3100进行主机编程 TM4C129ENCPDT 错误未解析符号

Guru**** 666710 points
Other Parts Discussed in Thread: CC3100
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1208248/tm4c129encpdt-host-programming-cc3100-with-host-mcu-tm4c129encpdt-error-unresolved-symbol

器件型号:TM4C129ENCPDT
主题中讨论的其他器件:CC3100

大家好!

我在为 CC3100执行主机编程时,在链接阶段遇到了未解析的符号,您能检查我缺少什么吗?  

提前感谢  

控制台输出:

**** Build of configuration Debug for project host_test ****

"C:\\ti\\ccs\\utils\\bin\\gmake" -k -j 2 all -O 
 
Building file: "../tm4c129encpdt_startup_ccs.c"
Invoking: Arm Compiler
"C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/Users/chira/workspace_v12/host_test" --include_path="C:/ti/CC3100SDK_1.3.0/cc3100-sdk/simplelink/include" --include_path="C:/ti/CC3100SDK_1.3.0/cc3100-sdk/simplelink" --include_path="C:/ti/CC3100SDK_1.3.0/cc3100-sdk/platform/tiva-c-connected-launchpad" --include_path="C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --define=ccs="ccs" --define=PART_TM4C129ENCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="tm4c129encpdt_startup_ccs.d_raw"  "../tm4c129encpdt_startup_ccs.c"
Finished building: "../tm4c129encpdt_startup_ccs.c"
 
Building file: "../main.c"
Invoking: Arm Compiler
"C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/Users/chira/workspace_v12/host_test" --include_path="C:/ti/CC3100SDK_1.3.0/cc3100-sdk/simplelink/include" --include_path="C:/ti/CC3100SDK_1.3.0/cc3100-sdk/simplelink" --include_path="C:/ti/CC3100SDK_1.3.0/cc3100-sdk/platform/tiva-c-connected-launchpad" --include_path="C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --define=ccs="ccs" --define=PART_TM4C129ENCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d_raw"  "../main.c"
"../main.c", line 216: warning #225-D: function "initLEDs" declared implicitly
Finished building: "../main.c"
 
Building target: "host_test.out"
Invoking: Arm Linker
"C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --define=ccs="ccs" --define=PART_TM4C129ENCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"host_test.map" --heap_size=0 --stack_size=512 -i"C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib" -i"C:/ti/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="host_test_linkInfo.xml" --rom_model -o "host_test.out" "./main.obj" "./tm4c129encpdt_startup_ccs.obj" "../tm4c129encpdt.cmd"  -llibc.a 
<Linking>
 
 undefined           first referenced
  symbol                 in file     
 ---------           ----------------
 CLI_Configure       ./main.obj      
 CLI_Write           ./main.obj      
 _sl_GetCreateFsMode ./main.obj      
 initClk             ./main.obj      
 initLEDs            ./main.obj      
 sl_DevGet           ./main.obj      
 sl_FsClose          ./main.obj      
 sl_FsOpen           ./main.obj      
 sl_FsWrite          ./main.obj      
 sl_Start            ./main.obj      
 sl_Stop             ./main.obj      
 stopWDT             ./main.obj      
 
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "host_test.out" not built
 
>> Compilation failure
makefile:136: recipe for target 'host_test.out' failed
makefile:132: recipe for target 'all' failed
gmake[1]: *** [host_test.out] Error 1
gmake: *** [all] Error 2

**** Build Finished ****

我在这里附上了项目

https://drive.google.com/file/d/1-SBy3ZWX205M_MnTwN1ZzPBzxzZ3m6Hf/view?usp=share_link

提前感谢

Chiranth

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     如果您得到如下所示的未定义符号、这通常意味着该库未链接。 您需要链接至定义这些符号的库、或编译包含这些符号的文件。

    第一个引用了未定义的
    符号的输入
    ---------------- ----------------
    CLI_Configure ./main.obj
    CLI_Write ./main.obj
    _sl_GetCreateFsMode ./main.obj
    initClk ./main.obj
    initLEDs ./main.obj
    sl_DevGet ./main.obj
    sl_FsClose ./main.obj
    sl_FsOpen ./main.obj
    sl_FsWrite ./main.obj
    sl_Start ./main.obj
    sl_Stop ./main.obj
    stopWDT ./main.obj

    例如,您的 main()正在调用 CLI_Configure()。    CLI_Configure 在哪里? 如果 CLI_Configure 是某个库的一部分、则需要将其包含在链接库路径中。 请参阅以下 CCS 构建设置、从中可以链接到您的库。  

    如果 CLI_Configure 是某些源文件的一部分、而不是库中的一部分、那么您需要编译/编译这些源文件、以便链接器链接目标文件。