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.

[参考译文] MSPM0G3105:错误#10234-D:保留未解析的符号

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1506061/mspm0g3105-error-10234-d-unresolved-symbols-remain

器件型号:MSPM0G3105

工具/软件:

您好 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 文件考虑在内。

如有任何指导或建议、将不胜感激。

提前感谢您的帮助!

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

    尊敬的 Deping:

    根据错误消息、我想您可以将相关路径添加到"Properties"->"Arm Linker"->"File Search Path"中。 您可以参考 SDK 中提供的基于 TI 驱动程序库的现有示例来配置环境。 顺便说一下、根据 TI 驱动程序库中的"adc.c"、需要 自行定义"ADC_CONFIG"和"adc_count"变量。 希望对您有所帮助。

    第1步:  

    第2步:

    此致、
    彼得

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

    谢谢、这真的很有帮助! 您还能提供一个有关如何使用"ADC_CONFIG"和"ADC_COUNT"的示例吗?

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

    尊敬的 Deping:

    您可以直接参阅 SDK 的 TI Divers 目录中的 adc.c 和 ADC.h 文件、以了解 ADC_CONFIG 和 ADC_COUNT 的含义(其中对这些变量有注释)、您可以根据需要进行设置。

    此外、如您所见、基于驱动程序库的示例目前非常有限。 如果您没有使用此库的必备要求、建议您选择基于开发项目 driverlib [您的 MSPM0_SDK 位置\mspm0_sdk_xxxx\examples\nortos] 因为我们提供了一组基于它的丰富的示例。  您可以将空工程导入 CCS 或其他基于器件的 IDE 以开发应用。

    此致、
    彼得