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.

[参考译文] EK-TM4C1294XL:帮助设置适用于 TM4C1294NCPDT 的 TI Clang 工程–缺少启动和链接器文件

Guru**** 2391415 points
Other Parts Discussed in Thread: TM4C1294NCPDT, EK-TM4C1294XL

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1519284/ek-tm4c1294xl-help-with-ti-clang-project-setup-for-tm4c1294ncpdt-missing-startup-and-linker-files

器件型号:EK-TM4C1294XL
Thread 中讨论的其他器件:TM4C1294NCPDT、

工具/软件:

尊敬的 TI 团队:

我目前使用的是 Code Composer Studio (CCS) v12.8.1 并评估的使用 TI Clang v4.0.2.LTS 使用进行开发的编译器 TM4C1294NCPDT 低功耗微控制器 EK-TM4C1294XL 评估板

使用此器件和 TI Clang 工具链创建新工程时、我会收到以下警告:

"所选器件当前不提供 TICLANG 工具链的工程初始化详细信息。 该项目可能需要进一步的手动设置。"

因此:

  • 启动文件 连接器命令文件  该工程中。
  • 编译会生成以下警告:
    警告#10247-D:创建不带 SECTIONS 规范的输出段".text"
    警告#10247-D:创建不带 SECTIONS 规范的输出段".stack"
    警告#10210-D:创建默认大小为0x800的".stack"段;

我添加了一个最小示例来将 LED 设置为开启(端口 N、引脚0)、当工程编译并闪烁时、代码似乎显示为开启 不输入 main() 、并且 LED 不响应。

请告知:

  1. 怎么会这样呢 手动设置 基于 Clang 的工程适用于 TM4C1294NCPDT?
  2. 在哪里可以找到 正确的启动文件和链接器脚本 与 TI Clang 工具链兼容?
  3. 在 CCS 中是否有将 TI Clang 与 TM4C129x 系列配合使用的官方示例或权变措施?

#include <stdbool.h>
#include <stdint.h>

#include "driverlib/debug.h"
#include "driverlib/gpio.h"
#include "driverlib/sysctl.h"
#include "inc/hw_memmap.h"

int main(void) {
  // Enable the GPIO port that is used for the on-board LED.
  SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);

  // Check if the peripheral access is enabled.
  while (!SysCtlPeripheralReady(SYSCTL_PERIPH_GPION)) {
  }

  // Enable the GPIO pin for the LED (PN0).  Set the direction as output, and
  // enable the GPIO pin for digital function.
  GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_0);
  GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, GPIO_PIN_1);

  // Turn on the LED.
  GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, GPIO_PIN_0);

  while (1) {
  }
}

提前感谢您的帮助或见解。

此致、

Hassan