I'm taking a look at the XLOG module to be able to redirect stdout to LCD or Ethernet instead of UART.
But - what is standard out by default using XDE?, is it transferred to the console by XTAG, and if, how can XTAG get it from each core?
Can anyone tell me what happens if I write (without XLOG):
printstr("Hello World")
How does XLOG redirect the stdout stream to channels ?
... or do I have to read the debug code... :mrgreen:
Where is Standard Out
-
- XCore Expert
- Posts: 956
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
Where is Standard Out
Probably not the most confused programmer anymore on the XCORE forum.
-
- Member++
- Posts: 16
- Joined: Wed Jun 29, 2011 5:39 pm
Did you ever find an answer to this? I have a similar ambition to redirect stdout to a channel so that I can use printf() to talk to my LCD driver...
Thanks!
Thanks!
-
- Respected Member
- Posts: 318
- Joined: Tue Dec 15, 2009 12:46 am
lilltroll wrote:Can anyone tell me what happens if I write (without XLOG):
printstr("Hello World")
- printstr() calls _write() (see syscall.h for the prototype of this function)
- _write() calls _DoSyscall() with r0 set to OSCALL_WRITE (6) and r1 to r3 set to the arguments of _write() (See the Tools development guide for details of this mechanism).
- The jump to _DoSyscall() causes a breakpoint setup by the debugger to fire.
- The debugger reads the arguments of _DoSyscall() and translates it into a call to _write() on the host machine. It then writes the return value back to r0 and tells the processor to return from debug.