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: TM4C1294KCPDT Debug

Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: TM4C1294NCPDT,

The original chip is TM4C1294NCPDT. Now the chip is replaced with TM4C1294KCPDT. There is no change in the program, and there is no problem in rebuilding the project compilation.

 There is a dead loop in the IntDefaultHandler program during the debugging process. There is also a problem with "Break at address "0xfffff8" with no debug information available, or outside of program code".

Please help me solve it

...

  • 已为您联系TI资深工程师,一旦得到回复会立刻回复给您

  • TM4C1294NCPDT(1024kByte 闪存)和 TM4C1294KCPDT(512kByte 闪存)之间的区别在于闪存大小。请确保您的程序图像适合 TM4C1294KCPDT。查看 .map 文件并确定出程序图像大小。接下来您需要了解您的程序是否会为堆动态分配内存或跳转到任何超出闪存大小的内存位置。如果您动态分配的堆超出了您拥有的内存量,那么您会遇到内存故障或其他故障。

    接下来,对于 IntDefaultHandler,这通常意味着您没有为外设创建向量。您需要找出哪个外设正在生成中断并在启动文件中为其插入一个向量。如果外设没有关联的中断向量,处理器将跳转到默认 ISR,即 IntDefaultHandler。请看下面的典型启动文件。大多数向量默认为 IntDefaultHandler。假设您正在使用 GPIOA 生成中断。当处理器响应 GPIOA 中断时,它会跳转到 IntDefaultHandler。 IntDefaultHandler 只是在一个 while 循环中旋转。

    //*****************************************************************************
    //
    // Forward declaration of the default fault handlers.
    //
    //*****************************************************************************
    void ResetISR(void);
    static void NmiSR(void);
    static void FaultISR(void);
    static void IntDefaultHandler(void);

    //*****************************************************************************
    //
    // External declaration for the reset handler that is to be called when the
    // processor is started
    //
    //*****************************************************************************
    extern void _c_int00(void);

    //*****************************************************************************
    //
    // Linker variable that marks the top of the stack.
    //
    //*****************************************************************************
    extern uint32_t __STACK_TOP;

    //*****************************************************************************
    //
    // The vector table. Note that the proper constructs must be placed on this to
    // ensure that it ends up at physical address 0x0000.0000 or at the start of
    // the program if located at a start address other than 0.
    //
    //*****************************************************************************
    #pragma DATA_SECTION(g_pfnVectors, ".intvecs")
    void (* const g_pfnVectors[])(void) =
    {
    (void (*)(void))((uint32_t)&__STACK_TOP),
    // The initial stack pointer
    ResetISR, // The reset handler
    NmiSR, // The NMI handler
    FaultISR, // The hard fault handler
    IntDefaultHandler, // The MPU fault handler
    IntDefaultHandler, // The bus fault handler
    IntDefaultHandler, // The usage fault handler
    0, // Reserved
    0, // Reserved
    0, // Reserved
    0, // Reserved
    IntDefaultHandler, // SVCall handler
    IntDefaultHandler, // Debug monitor handler
    0, // Reserved
    IntDefaultHandler, // The PendSV handler
    IntDefaultHandler, // The SysTick handler
    IntDefaultHandler, // GPIO Port A
    IntDefaultHandler, // GPIO Port B
    IntDefaultHandler, // GPIO Port C
    IntDefaultHandler, // GPIO Port D
    IntDefaultHandler, // GPIO Port E
    IntDefaultHandler, // UART0 Rx and Tx
    IntDefaultHandler, // UART1 Rx and Tx

     

    static void
    IntDefaultHandler(void)
    {
    //
    // Go into an infinite loop.
    //
    while(1)
    {
    }
    }

    另请参阅此应用说明,了解如何诊断软件故障,这非常有用。

    https://www.ti.com/lit/pdf/spma043

  • 非常感谢您的回复,经过查看.map文件大小为157k,小于芯片flash容量上限。

    对于IntDefaultHandler持续运行问题,已经找到原因。是因为在新建工程后,外设向量依然为默认的IntDefaultHandler,所以导致出现中断立即进入了IntDefaultHandler循环中,现将对应的外设向量修改为正确的函数,修改完后编译出错误,Description Resource Path Location Type :unresolved symbol SoftI2CIntClear, first referenced in ./PI2C.obj MBcodesK1 C/C++ Problem,需要进一步调试编译了。

  • 经过调试,程序已经完成编译与调试,感谢帮助。

  • 不客气,感谢您的提问