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/TM4C123GH6PM:CCS 中的编译错误在0x702处读取存储器块时出现故障

Guru**** 2606725 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/753907/ccs-tm4c123gh6pm-compile-error-in-ccs-trouble-reading-memory-block-at-0x702

器件型号:TM4C123GH6PM

工具/软件:Code Composer Studio

你(们)好。

我将通过 CCS 8.2.0.0007在 TM4C123G LaunchPad 上编译以下代码

#include
#include

#define rows 2 //行数
#define cols 3 //列数
#define pixels rows*cols//条带中的像素

struct Node{//build A structure for pointer、R、G、B
struct Node *Next;(结构节点*Next;)
uint8_t var1;
uint8_t var2;
uint8_t var3;
};
typedef struct Node NodeArr;

NodeArr theArray[行][cols];

NodeArr *头点=&the Array[0][0];
NodeArr *点;
PT =头点;

while (1){


就在构建时、我会收到以下错误消息:

Cortex_M4_0:读取长度为0x4的第0页上0x702001e7处的存储器块时出现问题:发生调试端口错误。
Cortex_M4_0:读取长度为0x4的第0页上0x702001e7处的存储器块时出现问题:发生调试端口错误。
Cortex_M4_0:读取长度为0x4的第0页上0x702001e7处的存储器块时出现问题:发生调试端口错误。

两个方面:

-此处显示的存储器空间是"外部 SRAM"!

-在联机 C 编译器上编译相同的程序时不会出现问题(并运行),而不会出现任何问题。

有什么想法、为什么会发生这种情况?

感谢您的关注!

dv

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

    您的 main()在哪里? 您应该尝试类似这样的操作。  

    #include 
    #include 
    
    //
    //
    //打印"Hello World!" 连接到评估板上的 UART。
    ////
    *****************
    #define rows 2 //number of rows
    #define cols 3 //列数
    #define pixels rows * cols // strip 中的像素
    
    
    int
    main (void)
    {
    struct Node{//build A structure for pointer、R、G、B
    struct Node *Next;(结构节点*Next;)
    uint8_t var1;
    uint8_t var2;
    uint8_t var3;
    };
    typedef struct Node NodeArr;
    
    NodeArr theArray[行][cols];
    
    NodeArr *头点=&the Array[0][0];
    NodeArr *点;
    PT =头点;
    
    while (1){
    
    }
    }