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/AM3358: Application dies during debugging with XDS100v2

Genius 5820 points
Part Number: AM3358

Tool/software: Code Composer Studio

I try to debug my application which is running on a BeagleBone Black using a XDS100v2. Downloading, starting and stepping through it works fine until I come to a position in code where the SD-card is accessed (or more specifically: where EDMA-stuff is done in order to access the SD-card). Then the application dies, there is no response from the debugger and I only can reset the board to download and start my application again. Here it does not matter if I step through my program or if I let my application run freely with a breakpoint after the suspicious code, this breakpoint is never reached.

The same application is working fine when it is started normally and with no debug probe involved. So my questions:

What could cause this behaviour? Is there any specific with EDMA-calls/anything I would have to configure in CCS-settings in such cases?

Or alternatively: is there a possibility to start the application normally and without the debug probe and later attach to the running process to see what it's current state is?

Thanks :-)

  • Short update: it has nothing to do with EDMA but seems to be somehow random and timing-dependant. When it happens I end up in exceptionhandler.asm in an endless loop:

    AbortHandler:
    UndefInstHandler:
    ;
    ; Disable all the interrupts
    ;
    MRS r0, cpsr ; Read from CPSR
    ORR r0, r0, #0xC0 ; Clear the IRQ and FIQ bits
    MSR cpsr_c, r0 ; Write to CPSR
    ADD r14, pc, #0 ; Store the return address
    LDR pc, _CPUAbortHandler ; Go to C handler
    ;
    ; Go to infinite loop if returned from C handler
    ;
    loop0:
    B loop0
  • Hi,

    Let me see if I understand this correctly; the application runs fine if it starts and runs by itself with no debug session, booing from a SD card or other external source but, if you load the code via CCS and put the device to run, it fails to complete execution. Is that correct?

    If that is the case, I would definitely double-check the boundary conditions for this to happen, such as the execution of GEL scripts (which are not present if the device runs by itself) or the executable itself (it may be different between the two methods - I have done that).

    qxc said:
    Or alternatively: is there a possibility to start the application normally and without the debug probe and later attach to the running process to see what it's current state is?

    Certainly. That may certainly help either uncover differences between the two methods of runtime. Check:

    http://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html#manual-launch 

    Hope this helps,

    Rafael

  • desouza said:
    Let me see if I understand this correctly; the application runs fine if it starts and runs by itself with no debug session, booing from a SD card or other external source but, if you load the code via CCS and put the device to run, it fails to complete execution. Is that correct?

    Yes, this is correct. More than this: as long as I single-step through my application, it also works properly, but as soon as I let it run to reach some far breakpoint or to do what the applications is intended to do, I end up in this exceptionhandler.asm again.

    Thanks, I'll try that!

  • I tried to follow the description in given link but do not see a "Connect" option. Please refer to the image below: when I right-click CortxA8, a popup-menu opens but it does not contain this option: