Debugging session terminates suddenly (10.4.2)

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
gonse
Junior Member
Posts: 4
Joined: Fri Dec 10, 2010 9:55 am

Debugging session terminates suddenly (10.4.2)

Post by gonse »

Hi there,

I'm running the development tools 10.4.2 and use the XC-1A dev board.
I do let run my program in an infinite loop, but suddenly the debugger terminates.
The program seems to run further, because a led gets flashed even after the debugging session terminated.
This behavior is not reproducible in the sense that it does terminate at different time instances, but in the end it terminates.

The debugger throws the message: "3024-gdb-exit". I attached the log file.

Does everyone had similar problems?

Thanks in advance,
Stefan
Attachments
log_db.txt
(12.18 KiB) Downloaded 275 times
log_db.txt
(12.18 KiB) Downloaded 275 times


User avatar
aleonard
Member
Posts: 15
Joined: Thu Sep 16, 2010 8:19 pm

Post by aleonard »

I have seen this problem quite often. The debugger sometimes terminates when there is a timing problem or other error in the code and in this case the program also stops running (ie, LED would stop flashing). But I have also seen the case where the debugger stalls or terminates while the program still runs. I do not know why this happens, but when it does, I just restart the debugger and everything is fine.
The behavior in my experience is random. Often the debugger runs indefinitely without problem but sometimes it will stall or terminate.

My guess for the cause has been the slow interface over the XTAG connection. I think debug control commands have a tendency to get stuck due to timing issues. We can see similar behaviors with printf statements which also use the XTAG/debug connection. printf can sometimes can stall the program or create timing issues that interfere with other thread timing requirements. See eg: http://www.xcore.com/forum/viewtopic.ph ... lit=printf
gonse
Junior Member
Posts: 4
Joined: Fri Dec 10, 2010 9:55 am

Post by gonse »

Hi there,

I just wanted to try in Ubuntu 10.04, but unfortunately one needs an extra library. Still waiting for it.
My colleague tried a simple led example without any printf statements and the same behaviour occured.
We will now switsch to directly address the COM port and I'll state the result here.

Thanks so far,
Stefan
User avatar
aleonard
Member
Posts: 15
Joined: Thu Sep 16, 2010 8:19 pm

Post by aleonard »

I don't think the printf statements would cause the debugger to stall. Rather the debug commands themselves are unreliable due to the slow speed of the debug communication. Again, just my guess from observed behavior.
gonse
Junior Member
Posts: 4
Joined: Fri Dec 10, 2010 9:55 am

Post by gonse »

Just for the record:

The debugger still interrupts even without using printf statements. Right!

We are using the COM port for communication now and even if the debugger interrupts the program keeps on going. Fine!

BUT, my colleague left and I'm still facing the problem of running the XMOS tools in Ubuntu 10.04. I still did not get the necessary library by XMOS.
Could anybody help me out?

Regards,
Stefan
gonse
Junior Member
Posts: 4
Joined: Fri Dec 10, 2010 9:55 am

Post by gonse »

Got it to work.

Just a hint: In Linux the COM port is ttyUSB1 and cannot be used together with the JTAG interface.
That means, you have to write your program to the flash memory to use the serial interface.

Good luck,
Stefan
Post Reply