Does Anyone Have An Example Of Using The Toolchain?


scrapheap

Still Fresh
Joined
Oct 31, 2006
Messages
28
I am just starting to look at developing for the wiz and I was wondering before I spend the next couple of days getting my head round compiling for it, does anyone have any good examples of using the tool-chain in linux?
 
Thank you, I was just about to ask the very same question. I got the prebuilt binary, but I don't know how to use it. I was hoping I could chroot into it or something similarly simple. Just telling CXX=arm-blahblah/gcc doesn't work when compiling stella.
 
OK, I have extracted the tool chain from the file archive into "/opt/arm-openwiz-linux-gnu" and I can compile hello world using it (Note, I don't have a wiz yet so I can't test it.) The next step for me will be SDL which doesn't seem to be included in the tool chain, do I have to build this with the tool chain or is there a binary version I can just grab and use?
 
The next step for me will be SDL which doesn't seem to be included in the tool chain, do I have to build this with the tool chain or is there a binary version I can just grab and use?
I think there's a special SDL package just for wiz... and i beleive GPH has yet to release it.. (please call me out if i'm wrong). I'm assuming that after they release it, you can just include the appropriate SDL header files that you need..

for the toolchain, you can really put it wherever you want, you just need to make sure your makefile indicates the location of the particular compiler you want to use..

I just opened my wiz yesterday so i'm going to try to fool with some stuff today.

I'm thinking there's got to be some kind of SDL that is in place, since SQDef works... that was originally a GP2X app, right?
 
Last edited by a moderator:
Someone in #wizdev on EFNet told me that we should just use a regular version of SDL for development. I guess if you have a Wiz you can probably steal your libSDL.so off the device and link your binaries against that (and using the stock header for a compile).

Has anyone tried this though?
 
I followed your instructions, but i can't seem to execute the compiler itself... cannot execute binary file..

maybe i don't have permissions set up correctly..
 
What happens when you try the following

CODE
/opt/arm-openwiz-linux-gnu/bin/arm-openwiz-linux-gnu-gcc -V
 
Well, I can get it to work now that' i'm running Ubuntu.

But... I dunno, can't really seem to get even like a hello world program working. I mean, it compiles and everything, but just freezes the console... Have you tested your own "hello world" program that you wrote on the wiki, or did you make that program solely to test the toolchain?

thanks a lot,

neogml
 
NeoGML posted on May 22 2009 at 05:35 PM said:
Well, I can get it to work now that' i'm running Ubuntu.

But... I dunno, can't really seem to get even like a hello world program working. I mean, it compiles and everything, but just freezes the console... Have you tested your own "hello world" program that you wrote on the wiki, or did you make that program solely to test the toolchain?

thanks a lot,

neogml
What console are you referring to? If you expect something to print to the screen then that probably isn't going to be happening. It's more likely that the printf will be going out over serial instead, if anywhere at all.
 
Last edited by a moderator:
Exophase posted on May 22 2009 at 07:11 PM said:
NeoGML posted on May 22 2009 at 05:35 PM said:
Well, I can get it to work now that' i'm running Ubuntu.

But... I dunno, can't really seem to get even like a hello world program working. I mean, it compiles and everything, but just freezes the console... Have you tested your own "hello world" program that you wrote on the wiki, or did you make that program solely to test the toolchain?

thanks a lot,

neogml
What console are you referring to? If you expect something to print to the screen then that probably isn't going to be happening. It's more likely that the printf will be going out over serial instead, if anywhere at all.
oh, by console i meant wiz... haha.

yeah, i was using printf... only reason i thought that would be okay is because i thought i had seen it somewhere in the MAME4ALL source, like, when it says "unable to start hardware emulation" etc...
 
Last edited by a moderator:
I've used the guide in the Wiki to set up the toolchain and then compile the lib castor test that seemed to work fine. Do you have to restart the menu after you run the hello world as maybe that is what is causing the hanging you speak of?
 
Speaking of which, it's about time GPH made a menu that correctly forks and merges with the executed program, like a normal shell does. Having to manually start the menu up again when the program exists is absurd, and is going to be inconsistent with running it from serial or a better menu. You'd think they'd have learned their lesson after having done this on the GP2X.
 
Hmm...

well, basically, when i run the hello world program, it runs for a second, and then i see the loading screen and it just sits there forever.

I'll try to see if i can get the libcastor thing to work, but i was also having problems w/ libcastor also, since, for whatever reason, compiling the testapp (as mentioned in the readme for libcastor) wouldn't work..

I installed libpng, zlib, and others in /usr/local/ but i installed the toolchain in /opt/, so when the toolchain was trying to compile libcastor it couldn't find png.h until i copied it from /usr/local to /opt/... libcastor itself compiled and installed, but when i tried to make the test application it says that it couldn't find a suitable png.h... I emailed orkie about it, but does this make any sense to you guys? i feel like i'm taking crazy pills.

neogml
 
Peter R posted on May 22 2009 at 09:13 PM said:
just remove all the libpng, libcastor_extra stuff etc. The test app doesn't actually use them as far as I know.
um... remove them from the Makefile?
 
Last edited by a moderator:
Peter R posted on May 22 2009 at 09:13 PM said:
just remove all the libpng, libcastor_extra stuff etc. The test app doesn't actually use them as far as I know.
just removed castor extra, libpng, and zlib from the makefile...

the program that i got was just a yellow screen, which then returned me to the loading screen rotated 90 degrees and "scanlined..." it was f'ed up, to say the least.

this makes me feel pretty stupid.
 
Last edited by a moderator:
Back
Top