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.

[参考译文] LAUNCHXL-F28P55X:FreeRTOS 和 C++

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1510112/launchxl-f28p55x-freertos-and-c

器件型号:LAUNCHXL-F28P55X
Thread 中讨论的其他器件:C2000WARESysConfig

工具/软件:

您好、

我正在尝试将 FreeRTOS 集成到我的现有工程中。 我已经从 freertos_ex1_c28x_led_blinky_syscfg 的 F28P55X 示例工程开始。

而且由于我将主文件从 C 更改为 C++、编译失败、并 在./freertos_ex1_c28x_led_blinky_syscfg.obj 中作为 freertos_init ()  的未定义符号显示错误。

CCS: 20.0.12__1.6.0

SDK:C2000Ware 5.04.00.00

示例: c:\ti\c2000\C2000Ware_5_04_00_00\kernel\freertos\Demo\C2000_F28P55x_C28x_CCS

附件是构建日志和工程。

 

[0]**** Build of configuration CPU1_FLASH for project freertos_ex1_c28x_led_blinky_syscfg ****
[1]"C:\\ti\\ccs2000\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
 
[2]Building file: "../freertos_ex1_c28x_led_blinky_syscfg.cpp"
[3]Invoking: C2000 Compiler
[4]"C:/ti/ccs2000/ccs/tools/compiler/ti-cgt-c2000_22.6.1A23259/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu1 --vcu_support=vcrc -Ooff --include_path="C:/Users/workspace/freertos_ex1_c28x_led_blinky_syscfg" --include_path="C:/ti/c2000/C2000Ware_5_04_00_00" --include_path="C:/Users/workspace/freertos_ex1_c28x_led_blinky_syscfg/device" --include_path="C:/ti/c2000/C2000Ware_5_04_00_00/driverlib/f28p55x/driverlib" --include_path="C:/ti/ccs2000/ccs/tools/compiler/ti-cgt-c2000_22.6.1A23259/include" --define=DEBUG --define=_FLASH --define=_LAUNCHXL_F28P55X --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="freertos_ex1_c28x_led_blinky_syscfg.d_raw" --include_path="C:/Users/workspace/freertos_ex1_c28x_led_blinky_syscfg/CPU1_FLASH/syscfg" --cmd_file="syscfg/board.opt" --cmd_file="syscfg/c2000ware_libraries.opt" --cmd_file="syscfg/c2000_freertos.opt"  "../freertos_ex1_c28x_led_blinky_syscfg.cpp"
[5]Finished building: "../freertos_ex1_c28x_led_blinky_syscfg.cpp"
 
[6]Building target: "freertos_ex1_c28x_led_blinky_syscfg.out"
[7]Invoking: C2000 Linker
[8]"C:/ti/ccs2000/ccs/tools/compiler/ti-cgt-c2000_22.6.1A23259/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu1 --vcu_support=vcrc -Ooff --define=DEBUG --define=_FLASH --define=_LAUNCHXL_F28P55X --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"freertos_ex1_c28x_led_blinky_syscfg.map" --heap_size=0x100 --stack_size=0x200 --warn_sections -i"C:/ti/ccs2000/ccs/tools/compiler/ti-cgt-c2000_22.6.1A23259/lib" -i"C:/ti/c2000/C2000Ware_5_04_00_00" -i"C:/Users/workspace/freertos_ex1_c28x_led_blinky_syscfg/CPU1_FLASH/syscfg" -i"C:/ti/ccs2000/ccs/tools/compiler/ti-cgt-c2000_22.6.1A23259/include" --reread_libs --define=_FLASH --diag_wrap=off --display_error_number --xml_link_info="freertos_ex1_c28x_led_blinky_syscfg_linkInfo.xml" --entry_point=code_start --rom_model -o "freertos_ex1_c28x_led_blinky_syscfg.out" "./freertos_ex1_c28x_led_blinky_syscfg.obj" "./syscfg/board.obj" "./syscfg/c2000ware_libraries.obj" "./syscfg/c2000_freertos.obj" "./tasks.obj" "./queue.obj" "./list.obj" "./timers.obj" "./event_groups.obj" "./stream_buffer.obj" "./port.obj" "./portasm.obj" "./heap_4.obj" "./device/device.obj" "./device/f28p55x_codestartbranch.obj" "../28p55x_freertos_flash_lnk.cmd" "C:/ti/c2000/C2000Ware_5_04_00_00/driverlib/f28p55x/driverlib/ccs/Debug/driverlib.lib"  -lc2000ware_libraries.cmd.genlibs -llibc.a 
[9]<Linking>
 
[10] undefined       first referenced                         
[11]  symbol             in file                              
[12] ---------       ----------------                         
[13] FreeRTOS_init() ./freertos_ex1_c28x_led_blinky_syscfg.obj
 
[14]error #10234-D: unresolved symbols remain
[15]error #10010: errors encountered during linking; "freertos_ex1_c28x_led_blinky_syscfg.out" not built
 
[16]>> Compilation failure
[17]makefile:153: recipe for target 'freertos_ex1_c28x_led_blinky_syscfg.out' failed
[18]gmake[1]: *** [freertos_ex1_c28x_led_blinky_syscfg.out] Error 1
[19]makefile:149: recipe for target 'all' failed
[20]gmake: *** [all] Error 2
[21]**** Build Finished ****

我是否缺少任何配置?

e2e.ti.com/.../freertos_5F00_ex1_5F00_c28x_5F00_led_5F00_blinky_5F00_syscfg.zip

谢谢、

小号

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

    你好、小

    此问题是由于名称改编造成的。 您可以通过将 C2000Ware 和 SysConfig 包含在 extern "C"块中来解析它、如下所示:

    //
    // Included Files
    //
    extern "C" {
    #include "driverlib.h"
    #include "device.h"
    #include "board.h"
    #include "c2000_freertos.h"
    }

    有关这方面的更详细说明、请参阅此主题。

    此致、

    Arnav