Welcome! Log In Create A New Profile

Advanced

Console over USB Gecko?

Posted by DrTwox 
Console over USB Gecko?
October 18, 2009 06:48AM
I'm currently using TekWarrior's syslog code to send messages to my development machine (for simple logging, debugging etc) but I'd rather use the USB Gecko; can the console output be sent to the Gecko and seen on a Linux box?
Re: Console over USB Gecko?
October 18, 2009 06:58PM
Ive seen videos of people doing this so it is definitely possible. I have still yet to run across the app they are using to try out, but I assume its just a little app to run in the console with a while() loop and the receivebuffer() from the gecko libs and just printf() whatever it receives.
Re: Console over USB Gecko?
October 19, 2009 09:49AM
Are you meaning to redirect stderr and stdout to the gecko, ie: so you can see printf's?
If so, try the code here:

[code.google.com]

And just load up a terminal app, and viola!
Re: Console over USB Gecko?
October 19, 2009 10:19AM
Thank you! That's exactly what I meant. Will it interfere with gdb debugging?



Edited 1 time(s). Last edit at 10/19/2009 10:20AM by DrTwox.
Re: Console over USB Gecko?
October 20, 2009 08:42AM
Well yes follow the directions for usb gecko gdb

DEBUG_Init(GDBSTUB_DEVICE_USB, 1);

and then insert breakpoints _break();
Re: Console over USB Gecko?
October 20, 2009 12:40PM
I already use the gecko with gdb, I was just wondering if the two will play nicely together. Nevermind, I will try it out in the next few days and see for myself! Thanks again.
Re: Console over USB Gecko?
October 22, 2009 11:17AM
I used the gecko code from your link, and it works until fopen is called; and then the Wii just freezes and needs to be powered off... any ideas?

EDIT: fopen also 'freezes' if I disable the framebuffer console too. Very strange.



Edited 1 time(s). Last edit at 10/22/2009 11:25PM by DrTwox.
Re: Console over USB Gecko?
October 23, 2009 10:44AM
Here's something i MacGyvered to output to the gecko. [pastie.org]. I just use the 2 bottom functions. First init the gecko (in slot B) and then you can use gprintf(); just like printf(). It accepts arguments and all. If you comment out the line 305, then it will not output to the TV but only to the gecko. So far, the only hangup Ive noticed is that it doesn't handle %016llx arguments right, but %08x and %02x work right. The downside is that you have to go through the source and change your printf()'s to gprintf()'s.

EDIT>>>
heres a video of it in action [www.youtube.com] . its not much to look at, but here you go.



Edited 1 time(s). Last edit at 10/23/2009 10:51AM by giantpune.
Re: Console over USB Gecko?
October 30, 2009 10:45PM
Thank you both for the help; I went with Tantric's idea to redirect stdout and sterr... I wonder if stdin can be captured from the gecko...
Sorry, only registered users may post in this forum.

Click here to login