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.

[参考译文] CCS/CC3220SF-LAUNCHXL:在 CCS 中使用 CC3220SF-LAUNCHXL 时遇到链接错误。

Guru**** 2533370 points
Other Parts Discussed in Thread: CC3220SF-LAUNCHXL, CC3220SF

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/819168/ccs-cc3220sf-launchxl-getting-linking-error-while-working-with-cc3220sf-launchxl-in-ccs

器件型号:CC3220SF-LAUNCHXL
主题中讨论的其他器件: CC3220SF

工具/软件:Code Composer Studio

您好!

 

我不熟悉 CCS IDE 并使用 CC3220SF-LAUNCHXL、我做了一些基本实验、如 GPIO、ADC、DAC、PWM、LCD、RTC 和 UART。

我已成功完成的每个实验。

但是、在进行 UART 实验时、我会得到以下错误

 

  1. 说明链接期间遇到资源路径位置类型#10010错误;“dem5_uart.out”未生成 dem5_uart C/C++问题”
  2. “说明资源路径位置类型
  3. href="processors.wiki.ti.com/.../10234"> 未解析的符号仍为 demo5_UART C/C++问题"
  4. "说明资源路径位置类型未解析符号 main、首先在 C:\ti\ccsv7\tools\compiler\ti-cgt-arm_16.9.1.LTS \lib\rtsv7M4_T_le_eabi.lib 中引用 demo5_UART C/C++问题”

 

该错误不在程序中、但链接时会出现其他一些错误。

我使用的是 CCS V_7.1.0和 SDK 版本 simplelink_cc32xx_sdk_3_10_00_04

我已按照以下步骤进行实验。 我还在 attachmentse2e.ti.com/.../pin_5F00_mux_5F00_config.ce2e.ti.com/.../pin_5F00_mux_5F00_config.h 中附加了屏幕截图

  1. 使用以下配置创建 CCS 工程  

我已选择电路板作为 CC3220SF、调试器作为 TI XDS110 USB 调试探针

然后、我添加了必要的库作为

  1.    ARM 编译器下的 include 选项中的以下内容
    1. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\kernel\nortos"
    2. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\kernel\nortos\posix"
    3. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\source"
    4. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\source\ti\devices\cc32xx\driverlib"
    5. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\source\ti\devices\cc32xx\inc"
    6. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\source\ti\drivers\uart"

 

  1.  ARM 连接器下文件搜索路径中的以下内容
  2. "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\source\ti\devices\cc32xx\driverlib\ccs\Release\driverlib.a"

我正在使用的程序如下所示

 

#include "rom.h"

#include "rom_map.h"

#include "hw_memmap.h"

#include "hw_common_reg.h"

#include "hw_types.h"

#include "hw_ints.h"

#include "UART.h"

#include "interrupt.h"

#include "utils.h"

#include "prcm.h"

unsigned int i;

#include "pin_mux_config.h"

unsigned char msg[]={"嵌入式实验室- UART 演示"};

voidmain()

PinMuxConfig();

UARTConfigSetExpClk (UARTA1_base、PRCMPeripheralClockGet (PRCM_UARTA1)、115200、

(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE);

while (1)

for (i=0;msg[i]!='\0';i++)

UARTCharPut (UARTA1_base、msg[i]);

UARTCharPut (UARTA1_BASE、0x0D);

UARTCharPut (UARTA1_BASE、0x0A);

UtilsDelay (8000000);

 

我还 使用 PINMUX 工具生成了 pin_mux_config.h & PIN_MUX_CONFIG.c、其屏幕截图如下所示

然后下载  pin_mux_config.h 和 pin_mux_config.c 并将其添加到程序中。

在构建项目后、我在程序中没有遇到错误、但仅遇到链接错误、我在文档中提到过这一点。 错误的屏幕截图位于附件中。

 我还在  附件中附加了 pin_mux_config.h 和 PIN_MUX_CONFIG.c。

 

注:- 我在其他实验中遵循的上述程序,它们工作正常。 我已经尝试过其他版本的编译器和其他 SDK 版本 simplelink_cc32xx_sdk_3_20_00_06、但遇到了相同的错误。 我还添加了一个提及上述数据和 error.e2e.ti.com/.../UART_5F00_error.docx 的字文件

 请指导我。

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

    [引用用户="Rajeev Gupta"]

    voidmain()

    PinMuxConfig();

    [/报价]

    Rajeev、

    问题是在 main.c 中,您在 void 和 main()之间缺少空格。
    链接器会生成错误、因为它将此函数名视为 voidmain 而不是它所期望的 main。

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

    非常感谢。