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.

Cannot reliably step through code on TMS320F2812 device when external memory is in use.

So far, I've been developing code to run on the internal memory of the device. Debugging has worked OK on my XDS100 emulator.   The code has now grown such that it now requires the use of external memory.  I've built the code to put '.text' into external memory at 0x80000.  It builds OK, and the debug session seems to start up OK, but if I try to do anything other than single-step, the system seems to just free-run.   Any ideas what I'm missing?    Thanks for your help,    Julian.

  • Julian Woloszczuk said:
    It builds OK, and the debug session seems to start up OK, but if I try to do anything other than single-step, the system seems to just free-run.  

    Can you elaborate a bit more? Do you mean that if you set breakpoints, it does not halt at them but instead just runs free? Are you able to single step through C source/assembly, and does CCS throw any error messages at all when you try to single step? Does the code actually run properly if you just hit Run?

  • I've not tired breakpoints. If in single step through my source, things go OK. If I try to 'run to line' or 'step over', the code just runs. When I stop it running, it's in some assembler - not sure what at this moment in time. This is basic driver code that I'm testing, so it won't be obvious if it's OK if I just let it run.  The problem I'm having seems to coincide with moving over to using external memory at code memory at 0x80000 -

    OFFCHIP(RW) :

    origin = 0x080000, length = 0x1DFD0

    Could it be a limitation on breakpoints for the XDS100?

    I'll see if I can try a previous known sub-system, but put that in external memory, too.

  • Sorry for the poor typing!!   I meant that I've not tried breakpoints, and it's 'If I single step'.  :-)

  • Maybe there is some external memory set up that has not been done correctly that is leading to such issues. Also could be specific to the code you are trying to 'step over'. It is not a limitation of the xds100 emulator.

    As you mentioned, I would suggest testing a known good program that runs from external memory as a baseline. There is a example program for the F2812 that runs from external memory which is included with the C281x Header Files and Peripheral Examples package. You may want to give that a try as well to verify that breakpoints, stepping etc works. From there you can move on to your code to debug further.