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 不响应。
请告知:
- 怎么会这样呢 手动设置 基于 Clang 的工程适用于 TM4C1294NCPDT?
- 在哪里可以找到 正确的启动文件和链接器脚本 与 TI Clang 工具链兼容?
- 在 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