主题中讨论的其他器件:C2000WARE
工具/软件:Code Composer Studio
为什么我的链接器在 F021_API_F2837xD_FPU32.lib 中找不到应用程序属性中正确指向的任何 FAPI 例程
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.
工具/软件:Code Composer Studio
为什么我的链接器在 F021_API_F2837xD_FPU32.lib 中找不到应用程序属性中正确指向的任何 FAPI 例程
以下是 CCS 输出:
****为项目 HDMServo_cpu01构建配置 CPU1_RAM_DEBUG ****
"C:\\TI\\ccs1010\\ccs\\utils\bin\\gmake"-k all
构建目标:"HDMServo_cpu01.out"
调用:C2000链接器
"c:/TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/bin/cl2000 /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/lib /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/include -v28 -ml -mt --cla_support=cla1 -float_support=fpu32 -tmu_support=tmu0 -vcu_support=vcu2 -off -opt_for_speed=0 -fp_mode=relaxed -advice:performance_u1=CPU1=cpu=cpu_support=vcu2 -off-opt_for_speed=cluse-time_display-ccpp -cn_time_display-cn-copy_default-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn_guide-cprise_display-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn_off-cn/cpref-cn_off-cn-display-cn_off-cn-cn-cn/cpref-cn-cn-cn-cn/cop-cn/cop-display-cn /CCSWorkspace/lib Display_error_number --xml_link_info="HDMServo_cpu01_linkInfo.xml"-rom_model -o "HDMServo_cpu01.out""/f2837xD_adc.obj "./f2837xd"/f2837xd"_defintrl./f2837xd"s/f2837xd_sobt.micro.micro.filterm/f2837d.micro.micro.micro./f2837d.trl./f2837d.micro.micro.obj /CCSWorkspace/Cmd/F2837xD_Headers_nonBIOS_cpu1.cmd /CCSWorkspace/Cmd/2837xD_RAM_lnk_cpu1.cmd
未定义 的首次引用
符号
------ --------
fapi_checkFsmForReady() ./HDM_Flash_PR01.obj
Fapi_doVerify (unsigned long *、unsigned long、unsigned long *、Fapi_FlashStatusWordType *) ./HDM_Flash_PR01.obj
fapi_getFsmStatus() ./HDM_Flash_PR01.obj
fapi_initiatileAPI (volatile FMC_registers *、unsigned long) ./HDM_Flash_PR01.obj
Fapi_issue19 CommandWithAddress (Fapi_FlashStateCommandType、unsigned long *) ./HDM_Flash_PR01.obj
fapi_issueProgrammingCommand (unsigned long *、unsigned int *、unsigned int、unsigned int *、unsigned int、 Fapi_FlashProgrammingCommandsType)./HDM_Flash_PR01.obj
Fapi_setActiveFlashBank (Fapi_FlashBankType) ./HDM_Flash_PR01.obj
错误#10234-D:未解析的符号仍然存在
错误#10010:链接过程中遇到错误;"HDMServo_cpu01.out"未出现
已构建
>>编译失败
Makefile:169:目标'HDMServo_cpu01.out'的配方失败
gmake:***[HDMServo_cpu01.out]错误1.
gmake:目标"全部"不会由于错误而重新生成。
[引用 user="Henk Schutte">我担心它与我最喜欢的语言 C++有什么关系、尽管编译器很容易接受 C++、但幸运的是! F021闪存 API 的 include 文件似乎没有打包在 extern "C"块中、 从 C++调用时会导致链接器错误、原因是 为什么链接器会为从 C/C++函数调用的 C/C++函数提供错误?
因此、请尝试按照 如何在 C++代码中包含非系统 C 头文件的说明将 F021 .h 头文件包含在 extern "C"块中?
您好 Santosh、
非常感谢、我取得了进一步的进步。 三个函数仍然找不到、可能在其他某个对象中。
以下是最新的生成控制台日志:
****为项目 HDMServo_cpu01构建配置 CPU1_RAM_DEBUG ****
"C:\\TI\\ccs1010\\ccs\\utils\bin\\gmake"-k all
编译文件:"../HDM48K_cpu01.cpp"
调用:C2000编译器
"c:/TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/bin/cl2000 /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/include /CCSWorkspace/include/include -v28 -ml -mt --cla_support=cla1 -float_support=fpu32 -tmu_support=tmu0 -vcu_support=vcu2 -off -opt_for_speed=0 -fp_mode=relaxed -include_path="-include_support=vcuit_support=vcu-inc=v48k=-board-board-display_prob-board-board-display-display_guide-dcpp /CCSWorkspace/include -d_warning_decnature=d_cpp -cpp -guide-guide-d_guide-d_cpp -cepd_guide-guides=-cep-cep-cep-cep-regularit_guide-d_cp_cp.cp_cp_guide-d_guidep-cep-cep-cep-regularity-cep-cep-cep-
已完成构建:"../HDM48K_cpu01.cpp"
编译文件:"../HDM_Flash_PR01.CPP"
调用:C2000编译器
"c:/TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/bin/cl2000 /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/include /CCSWorkspace/include/include -v28 -ml -mt --cla_support=cla1 -float_support=fpu32 -tmu_support=tmu0 -vcu_support=vcu2 -off -opt_for_speed=0 -fp_mode=relaxed -include_path="cus_support=vcu_support=vcu-inc=vcu2-intrab-build_probe-board-d_display_prob_probd-board-display_probuld=d_prob_prob_probuld_probe-board-display-display_gui_gui_gui="-cpf-nateginature=d_guide-cpf-nature=g_guide-d_guide-cpf-nature=g.cpp -cep_display_guide-cep_guidep-cep-cep-cep-cep-/CCSWorkspace/include
完成构建:"../HDM_Flash_PR01.CPP"
构建目标:"HDMServo_cpu01.out"
调用:C2000链接器
"c:/TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/bin/cl2000 /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/lib /CCSWorkspace/lib -v28 -ml -mt --cla_support=cla1 -float_support=fpu32 -tmu_support=tmu0 -vcu_support=vcu2 -off -opt_for_speed=0 -fp_mode=relaxed -advice:performance_u1=CPU1=cpu=cpu_support=vcu2 -off-opt_for_speed=-opt_speed=0-cpp -ccpp -display-cn-cn_time_display-命令-cn-cn-cn_guide-cn-cn_guide-cn-cn-cn-cn_guide-cn-cn-cn-cn-cn-cn-display-cn-cn-cn_guide-difore_display-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn/cop-cn-cn-cn-cn-cn-cn /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/include /TI/C2000Ware_3_02_00_00/libraries/flash_api/f2837xd/include Display_error_number --xml_link_info="HDMServo_cpu01_linkInfo.xml"-rom_model -o "HDMServo_cpu01.out""/f2837xD_adc.obj "./f2837xd"/f2837xd"_defintrl./f2837xd"s/f2837xd_sobt.micro.micro.filterm/f2837d.micro.micro.micro./f2837d.trl./f2837d.micro.micro.obj /CCSWorkspace/Cmd/F2837xD_Headers_nonBIOS_cpu1.cmd /CCSWorkspace/Cmd/2837xD_RAM_lnk_cpu1.cmd
未定义 的首次引用
符号
------ --------
_fapi_serviceWatchdogTimer C:/CCSWorkspace/lib/F021_API_F2837xD_FPU32.lib
_Fapi_setupBankSectorEnable C:/CCSWorkspace/lib/F021_API_F2837xD_FPU32.lib
_fapi_setupEepromSectorEnable C:/CCSWorkspace/lib/F021_API_F2837xD_FPU32.lib
错误#10234-D:未解析的符号仍然存在
错误#10010:链接过程中遇到错误;"HDMServo_cpu01.out"未出现
已构建
>>编译失败
Makefile:169:目标'HDMServo_cpu01.out'的配方失败
gmake:***[HDMServo_cpu01.out]错误1.
gmake:目标"全部"不会由于错误而重新生成。
****构建完成****
"c:/TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/bin/cl2000 /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/lib /CCSWorkspace/lib -v28 -ml -mt --cla_support=cla1 -float_support=fpu32 -tmu_support=tmu0 -vcu_support=vcu2 -off -opt_for_speed=0 -fp_mode=relaxed -advice:performance_u1=CPU1=cpu=cpu_support=vcu2 -off-opt_for_speed=-opt_speed=0-cpp -ccpp -display-cn-cn_time_display-命令-cn-cn-cn_guide-cn-cn_guide-cn-cn-cn-cn_guide-cn-cn-cn-cn-cn-cn-display-cn-cn-cn_guide-difore_display-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn-cn/cop-cn-cn-cn-cn-cn-cn /TI/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/include /TI/C2000Ware_3_02_00_00/libraries/flash_api/f2837xd/include Display_error_number --xml_link_info="HDMServo_cpu01_linkInfo.xml"-rom_model -o "HDMServo_cpu01.out""/f2837xD_adc.obj "./f2837xd"/f2837xd"_defintrl./f2837xd"s/f2837xd_sobt.micro.micro.filterm/f2837d.micro.micro.micro./f2837d.trl./f2837d.micro.micro.obj /CCSWorkspace/Cmd/F2837xD_Headers_nonBIOS_cpu1.cmd /CCSWorkspace/Cmd/2837xD_RAM_lnk_cpu1.cmd
它应该是 -i"D:/TI/C2000Ware_3_02_00_00/libraries/flash_api/f2837xd/lib
您需要在 项目中添加 Fapi_UserDefinedFuncations.c 作为链接资源。
右键单击项目、添加新文件、然后单击"高级"。 请参阅下面的屏幕截图以供参考。