工具/软件:
您好 TI 社区、
我在 CCS 中的 MSPM0G3105的工程时遇到编译问题。 我的目标是将 SDK 与 TI 驱动程序库一起用于对 MSPM0进行编程。
但是、当我从ADC.h
库调用函数(如ADC_init()
)时、生成过程会失败。 经过一些测试后、我注意到编译器似乎能识别 SDK 头文件(.h)中的错误、但没有发现相应的源文件(.c)中的错误。
#include <stdbool.h> #include <stdint.h> #include <string.h> #include <stdio.h> #include "ti_msp_dl_config.h" #include <ti/drivers/ADC.h> #define ADC_SAMPLE_COUNT 10 int main(void) { SYSCFG_DL_init(); ADC_init(); printf("Hello\n"); return 0; }
[0]**** Build of configuration Debug for project Dongle_ble **** [1]"D:\\ti\\ccs2011\\ccs\\utils\\bin\\gmake" -k -j 8 all -O [2]Building file: "../Dongle_BLE.c" [3]Invoking: Arm Compiler [4]"D:/ti/ccs2011/ccs/tools/compiler/ti-cgt-armllvm_4.0.2.LTS/bin/tiarmclang.exe" -c @"syscfg/device.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -I"D:/Deping/4. Code/Dongle_ble" -I"D:/Deping/4. Code/Dongle_ble/Debug" -I"D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source/third_party/CMSIS/Core/Include" -I"D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source" -gdwarf-3 -MMD -MP -MF"Dongle_BLE.d_raw" -MT"Dongle_BLE.o" -I"D:/Deping/4. Code/Dongle_ble/Debug/syscfg" @"syscfg/device.opt" -o"Dongle_BLE.o" "../Dongle_BLE.c" [5]Finished building: "../Dongle_BLE.c" [6]Building target: "Dongle_ble.out" [7]Invoking: Arm Linker [8]"D:/ti/ccs2011/ccs/tools/compiler/ti-cgt-armllvm_4.0.2.LTS/bin/tiarmclang.exe" @"syscfg/device.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -gdwarf-3 -Wl,-m"Dongle_ble.map" -Wl,-i"D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source" -Wl,-i"D:/Deping/4. Code/Dongle_ble/Debug/syscfg" -Wl,-i"D:/ti/ccs2011/ccs/tools/compiler/ti-cgt-armllvm_4.0.2.LTS/lib" -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="Dongle_ble_linkInfo.xml" -Wl,--rom_model -o "Dongle_ble.out" "./Dongle_BLE.o" "./syscfg/ti_msp_dl_config.o" "./startup_mspm0g310x_ticlang.o" -Wl,-l"syscfg/device_linker.cmd" -Wl,-ldevice.cmd.genlibs -Wl,-llibc.a [9]makefile:137: recipe for target 'Dongle_ble.out' failed [10]warning #10210-D: creating ".sysmem" section with default size of 0x800; use the -heap option to change the default size [11] undefined first referenced [12] symbol in file [13] --------- ---------------- [14] ADC_config D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source/ti/drivers/lib/ticlang/m0p/drivers_mspm0g1x0x_g3x0x.a<ADC.o> [15] ADC_count D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source/ti/drivers/lib/ticlang/m0p/drivers_mspm0g1x0x_g3x0x.a<ADC.o> [16] HwiP_disable D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source/ti/drivers/lib/ticlang/m0p/drivers_mspm0g1x0x_g3x0x.a<ADC.o> [17] HwiP_restore D:/ti/ccs2011/mspm0_sdk_2_04_00_06/source/ti/drivers/lib/ticlang/m0p/drivers_mspm0g1x0x_g3x0x.a<ADC.o> [18]error #10234-D: unresolved symbols remain [19]error #10010: errors encountered during linking; "Dongle_ble.out" not built [20]tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation) [21]gmake[1]: *** [Dongle_ble.out] Error 1 [22]makefile:133: recipe for target 'all' failed [23]gmake: *** [all] Error 2 [24]**** Build Finished *
我想知道是否有人以前遇到过这种类型的行为、可能会弄清楚编译器为什么似乎没有将 SDK .c 文件考虑在内。
如有任何指导或建议、将不胜感激。
提前感谢您的帮助!