Welcome! Log In Create A New Profile

Advanced

HBC + USB Gecko + ??? = good times

Posted by giantpune 
HBC + USB Gecko + ??? = good times
August 04, 2009 10:36AM
Ok, I used that fancy search button and tried #usbgecko and got no answers. Maybe somebody here can fill me in.

I went and got a USB gecko, set it up like the instructions said, and I am able to use it with WiiRD & gecko OS and mess with games (hacking codes and dumping the memory). But I know this little guy is able to do a whole lot more. I see that gecko icon lit up on HBC but I have no idea how to make this thing talk to HBC. The HBC wiibrew page says to use wiiload, but wiiload is only sending stuff via tcp.

Also, is there a cool PC app (hopefully with a gui) that i can run to debug dol/elf files like Wiird lets me do with games? I read the debugging page about this on wiibrew but it doesn't really say...
1) put this line in your source code... blablabla
2)start your dol with this method ...blablalba
3)use this app on your PC to run your code 1 line at a time... blablabla

you guys always answer my questions with helpful answers, don't let me down now = )
Re: HBC + USB Gecko + ??? = good times
August 04, 2009 12:07PM
As far as Wiiload goes, you need to enable the VCP driver for the USB Gecko, and set your WIILOAD variable to the appropriate COM port. Personally, I haven't bothered, Wifi works well enough for that, though it would be useful for MINI apps.
As far as debugging goes, you will want refer to the debugging page on the wiki most of the time.
Basic instructions:

1) Add the following to your application:
#include 

DEBUG_Init(GDBSTUB_DEVICE_USB, 1);
_break();
And add -ldb to the list of libraries to link in your makefile. Change any Cflag optimisations to O0 (usually O2).
2) Start application however you like, I tend to use wiiload over wifi launched from a make target.
3) Unfortunately, it isn't quite that simple. You have a few options... using gdb (console), gdb insight (gui), or my personal choice of Eclipse's GUI, using gdb.
To use gdb, try googling for "gdb basics" or something similar. A general debugging guide may be useful too (covering step into, step over, step return, breakpoints etc.)
Re: HBC + USB Gecko + ??? = good times
August 05, 2009 12:34AM
I have already set the gecko driver to use the com port (COM3). but i can't figure out what to set the environmental variable to. Ive tried WIILOAD and COM:3, COM3. neither work. any clue what I need to set it to?

Also, for insight or eclipse's gui, are there any binaries floating around? All I could find are huge piles of source code that I have no idea how to build into a usable app.
Re: HBC + USB Gecko + ??? = good times
August 05, 2009 09:40AM
There seem to be others with issues there... Like I said I haven't used my usbgecko for Wiiload, but that is what you are supposed to do... =/
Well, Eclipse's debugger perspective is part of Eclipse. I wrote a guide that might be somewhat useful: Setting up Eclipse for Wii Development

Insight should be included with your devkitpro install, I think. (devkitPro\insight\bin)
Re: HBC + USB Gecko + ??? = good times
August 06, 2009 12:21PM
Sweet. I just used your tutorial and got this set up in no time. A few parts were different in the version of eclipse i got, but i managed to get it. i was able to insert a breakpoint in teh hello world example and "debug" it with eclipse and my gecko. But then i closed eclipse and restarted it, the debugger fails to work. I guess i need to sit down and learn this thing.

Thank you very much for bringing this to my attention. it is like devkit had sex with insight and they had a beautiful baby that can build projects and run them and debug them.


As far as the usb gecko+HBC trouble i am having, it seems like it an error in the wiiload program somewhere. I have completely reinstalled the drivers for gecko and i am positive that my com port is the correct number because i just used it to connect and control teh hello world mess. I talked with the creator of wiiload on irc and i have the variable set exactly as he told me so i guess it just wasnt meant to work on my pc
Re: HBC + USB Gecko + ??? = good times
August 06, 2009 01:58PM
Quote
giantpune
Sweet. I just used your tutorial and got this set up in no time. A few parts were different in the version of eclipse i got, but i managed to get it. i was able to insert a breakpoint in teh hello world example and "debug" it with eclipse and my gecko. But then i closed eclipse and restarted it, the debugger fails to work. I guess i need to sit down and learn this thing.
Yeah, I need to update the instructions for the Galileo release. As far as the fail after restart goes, I don't know. Provided you are loading the .dol, then launching/relaunching the debugger profile in Eclipse, it should work.

Quote
giantpune
Thank you very much for bringing this to my attention. it is like devkit had sex with insight and they had a beautiful baby that can build projects and run them and debug them.
You're welcome. Eclipse has really grown on me over time. Nice analogy there, too.

Quote
giantpune
As far as the usb gecko+HBC trouble i am having, it seems like it an error in the wiiload program somewhere. I have completely reinstalled the drivers for gecko and i am positive that my com port is the correct number because i just used it to connect and control teh hello world mess. I talked with the creator of wiiload on irc and i have the variable set exactly as he told me so i guess it just wasnt meant to work on my pc
Weird, like I said, you don't seem to be the only one with issues. I'll see how it goes for me when I have some spare time in a week or so.
Re: HBC + USB Gecko + ??? = good times
August 16, 2009 09:06AM
I have a little solution to the project setup for eclipse. To deal with all the clicking and typing when starting a new project, I got my hands on a macro recorder that is able to compile exe files. I used it to record all the steps to start a new project and made it into a exe. So just run that exe and it opens up eclipse and sets everything up for you. It isn't the best way, but it sure beats all that typing.
Re: HBC + USB Gecko + ??? = good times
August 17, 2009 02:05AM
Sounds cool, feel like adding it to the wiki page? Orr upload it somewhere and I'll get around to it.
Sorry, only registered users may post in this forum.

Click here to login