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.

[参考译文] TM4C1294KCPDT:已编译并链接、但加载到电路板时会出现一些问题

Guru**** 2393725 points
Other Parts Discussed in Thread: EK-TM4C1294XL

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1514556/tm4c1294kcpdt-compiled-and-linked-but-when-loaded-on-board-have-some-problems

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

工具/软件:

大家好

我编写了一个简单的 main.c、如下所示:

内部 main (void)

   //设置端口
   PortFunctionInit();


   返回0;
}

在链接项目期间、有以下警告:


警告#10247-D:创建不带 SECTIONS 规范的输出段".text"
警告#10247-D:创建不带 SECTIONS 规格的输出段".const"
警告#10247-D:创建不带段规格的输出段".cinit "
警告#10247-D:创建不带段规格的输出段".vtable"
警告#10247-D:创建不带 SECTIONS 规范的输出段".stack"
完成构建目标:"test-arm.out"

构建辅助目标:"test-arm.hex"
调用:ARM Hex 实用程序
"C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armhex --diag_swrap=off -o "test-arm.hex""test-arm.out"  
转换为扩展的 Tektronix 格式...
  "test-arm.out".text =>.text
  "test-arm.out".const =>.const
  "test-arm.out".cinit =>.cinit
已完成二级目标的构建:"test-arm.hex"
 
警告:数据正在写入自动生成的文件 test-arm.x1
警告:数据正在写入自动生成的文件 test-arm.x2
警告:正在将数据写入自动生成的文件 test-arm.x3

然后、二进制文件会加载 JTAG 接口(XSD200)、固件会立即启动并在进行以下调用时停止:

Cortex-M4:GEL 输出:
存储器映射初始化完成
Cortex-M4:无法运行目标 CPU:(错误-1268 @ 0x1090001)器件在硬故障或 NMI 中被锁定。 重置器件、然后重试此操作。 如果错误仍然存在、请确认配置、对电路板进行下电上电、和/或尝试更可靠的 JTAG 设置(例如下 TCLK)。 (仿真包20.0.0.3178)

所以,内存映射似乎是好的并加载(是我的板,不是套件),但软件锁定在这个功能:

___attribute__((section (".text:_c_int00 _noargs")、used、naked))
void _c_int00 _noargs (void)

  c_int00 _template (0、1);
}

问题:

1)没有设置内存分配?

2)启动时是否可以启用监视程序?

3)当然,在哪里我错了?

任何建议均已收到

此致、Daniele

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

    您好、

     我想您遇到链接器问题。 链接器文件定义了每个段映射到器件上哪个存储器的位置。 以下是 TM4C129 MCU 的典型链接器文件片段。 正如我在另一篇文章中提到的、我强烈建议您从 hello 工程或 project0等示例开始。 您可以在 C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hello 和 C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\project0中找到这些示例。 您还可以使用许多其他示例并将其用作参考。 编译这些工程并将其加载到闪存中、并了解其工作原理。 使它们正常工作后、您可以将源文件替换为您自己的代码。 使用这些示例工程可保证您具有正确的 CCS 设置。  

    --retain=g_pfnVectors
    
    /* The following command line options are set as part of the CCS project.    */
    /* If you are building using the command line, or for some reason want to    */
    /* define them here, you can uncomment and modify these lines as needed.     */
    /* If you are using CCS for building, it is probably better to make any such */
    /* modifications in your CCS project and leave this file alone.              */
    /*                                                                           */
    /* --heap_size=0                                                             */
    /* --stack_size=256                                                          */
    /* --library=rtsv7M3_T_le_eabi.lib                                           */
    
    /* The starting address of the application.  Normally the interrupt vectors  */
    /* must be located at the beginning of the application.                      */
    #define APP_BASE 0x00000000
    #define RAM_BASE 0x20000000
    
    /* System memory map */
    
    MEMORY
    {
        /* Application stored in and executes from internal flash */
        FLASH (RX) : origin = APP_BASE, length = 0x00100000
        /* Application uses internal RAM for data */
        SRAM (RWX) : origin = 0x20000000, length = 0x00040000
    }
    
    /* Section allocation in memory */
    
    SECTIONS
    {
        .intvecs:   > APP_BASE
        .text   :   > FLASH
        .const  :   > FLASH
        .cinit  :   > FLASH
        .pinit  :   > FLASH
        .init_array : > FLASH
    
        .vtable :   > RAM_BASE
        .data   :   > SRAM
        .bss    :   > SRAM
        .sysmem :   > SRAM
        .stack  :   > SRAM
    #ifdef  __TI_COMPILER_VERSION__
    #if     __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
    #endif
    #endif
    }
    
    __STACK_TOP = __stack + 512;
    

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

    亲爱的查尔斯

    实际上、我在设计内存/截面器件中没有看到

    我是按照你的建议去做的

    再次感谢您的快速支持

    Daniele