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: Compile error in CCS Trouble Reading Memory Block at 0x702

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hi there,

I'm compiling the following code on the TM4C123G LaunchPad via CCS 8.2.0.0007

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

#define ROWS 2 //Number of rows
#define COLS 3 //Number of columns
#define PIXELS ROWS*COLS // Pixels in the strip

struct Node { //Build a structure for pointer, R, G, B
struct Node *Next;
uint8_t var1;
uint8_t var2;
uint8_t var3;
};
typedef struct Node NodeArr;

NodeArr theArray[ROWS][COLS];

NodeArr *HeadPt = &theArray[0][0];
NodeArr *pt;
pt = HeadPt;

while (1) {

}
}

Just at build, I get the following error messages:

CORTEX_M4_0: Trouble Reading Memory Block at 0x702001e7 on Page 0 of Length 0x4: Debug Port error occurred.
CORTEX_M4_0: Trouble Reading Memory Block at 0x702001e7 on Page 0 of Length 0x4: Debug Port error occurred.
CORTEX_M4_0: Trouble Reading Memory Block at 0x702001e7 on Page 0 of Length 0x4: Debug Port error occurred.

Two things:

- The memory space shown here is "external SRAM"!

- The same program compiles without issues on an online C-compiler (and runs) with no issues.

Any ideas why this might be happening?

Thanks for your attention!

DV

  • Where is your main()? You should try something like this. 

    #include <stdint.h>
    #include <stdbool.h>
    
    //*****************************************************************************
    //
    // Print "Hello World!" to the UART on the evaluation board.
    //
    //*****************************************************************************
    #define ROWS 2 //Number of rows
    #define COLS 3 //Number of columns
    #define PIXELS ROWS*COLS // Pixels in the strip
    
    
    int
    main(void)
    {
        struct Node { //Build a structure for pointer, R, G, B
        struct Node *Next;
        uint8_t var1;
        uint8_t var2;
        uint8_t var3;
        };
        typedef struct Node NodeArr;
    
        NodeArr theArray[ROWS][COLS];
    
        NodeArr *HeadPt = &theArray[0][0];
        NodeArr *pt;
        pt = HeadPt;
    
        while (1) {
    
        }
    }