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: Trouble Reading Memory Block Error(C6678)

Tool/software: Code Composer Studio

Currently, I am developing with JTAG (XDS100v2) at C6678.
At one time, the following error appeared and it became impossible to debug.
Although connection is possible, an error occurs immediately after loading, immediately after execution of the program.


Trouble Reading Memory Block at 0x5fbe123e on Page 0 of Length 0x4: (Error-1178 @ 0x5FBE123C) Device functional clock appears to be off. Power-cycle the board. If error persists, confirm configuration and / or try more reliable JTAG settings Lower TCLK). (Emulation package 6.0.407.3)

However, increasing the size of heap would cause no error.
However, as heap can not be increased anymore, heap has returned to the size when there was no error. Then, no error came out.

Why does this happen?
Also, please tell me a valid countermeasure to prevent errors.

CCS Ver: 6.2.0
Processor SDK Ver: 03.01.00.06

  • Hi,

    user1432743 said:
    Although connection is possible, an error occurs immediately after loading, immediately after execution of the program.

    I am not entirely sure if I understand all the details, but from what I read it seems you are able to load your code to the device, it stops at main(), then immediately after you click on Resume (the small green play button) you get the error above, is that so?

    If that is what is happening, that indicates your code is properly initializing the runtime environment (between the entry point _c_int00 and main) but your application is failing. That is a good sign the system is stable at the point where your code reaches the main() routine.

    user1432743 said:
    However, increasing the size of heap would cause no error.
    However, as heap can not be increased anymore, heap has returned to the size when there was no error. Then, no error came out.

    The first sentence indicates that insufficient heap is causing the error. However, I don't quite understand the second sentence as it seems contradictory. It seems to say that you adjusted the heap but the error never came back?

    Regardless of the error, the heap exhaustion is a common source for errors and several of them can behave unpredictably. Our compiler and tools do not have a dynamic heap monitor, but a few techniques can be used to verify its usage. They are mentioned in the following forum threads:

    https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/51831

    https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/54338

    https://e2e.ti.com/support/development_tools/compiler/f/343/t/306169

    Hope this helps,

    Rafael

  • Hi desouza. Thank you for your reply.

    > it stops at main(), then immediately after you click on Resume (the small green play button) you get the error above, is that so?

    No.

    After pushing the debug button (green insect button), the program loading began.

    After the loading is completed, an error appears and stops before pressing the Resume button.

    >  It seems to say that you adjusted the heap but the error never came back?

    Yes.

    An error occurred when heap size was 0x40000. Heap size was set to 0x44000. Then, no error came out.
    After that, I corrected the program and I got an error again. However, I could not increase heap anymore. Therefore, when heap was returned to 0x40000, no error came out. I can not understand this behavior.

    By the way, it works correctly when the program is operated as a binary file. An error occurs only when JTAG is connected and operated with the CCS debug button.

    Please let me ask questions in addition. When debugging using CCS, where is the debug information stored? Does CCS use heap for debugging?

    Best regards.