GP2X Trying To Setup Development On Windows Using Devkitgp2x


Eclipse

Member
Joined
May 18, 2006
Messages
196
Age
38
Location
Italy
Website
0xdeadc0de.org
Hi

thanks to Franxis hints on another thread, I've managed to setup Code::Blocks and the DevkitGp2x to compile dinamically, still when i try to run even a simple SDL init with a loop presenting a white screen the program crashes at the start, on the wiz with the GPH loading screen.

1) Is there a method i can use to debug it? like using the usb cable in some manner?

I'm using Octoate's DevkitGP2x toolchain (2006-03-06) with Guyfawke's SDL Libs (2006-10-21), the old gp2x stuff, changing some files as suggester by Franxis here: http://www.gp32x.de/board/index.php?showtopic=46371

i'm linking with -lz -lmad -lSDL -lgcc -lm -lc -lexpat -lpthread -msoft-float
and compiling with -mcpu=arm926ej-s -mtune=arm926ej-s

Is there any other toolchain for windows? What you people are using for Wiz development on Windows?
 
Last edited by a moderator:
ok solved linking only with -lSDL, still i don't know what the Wiz miss and what libraries it has...

Now i'll try with OpenGL ES... fingers crossed, if someone is interested i'll release a preconfigured windows toolchain after that

edit:

tried OpenGL ES, another problem occurred with the libs...

linking with "-lopengles_lite -lwizGLES"
gives this error

Compiling: test.cpp
Linking console executable: bin\Release\WizTest.gpe
..\..\wiz3d/libwizGLES.so: file not recognized: File format not recognized
 
I've recompiled Pickle's wizGLES using the devkitGP2X and i got rid of that error, but now

Compiling: test.cpp
Linking console executable: bin\Release\WizTest.gpe
b:\wizcoding\devkitgp2x\bin\..\lib\gcc\arm-linux\4.0.2\..\..\..\..\arm-linux\bin\ld.exe: ERROR: ..\..\wiz3d/libopengles_lite.so uses VFP instructions, whereas bin\Release\WizTest.gpe does not
b:\wizcoding\devkitgp2x\bin\..\lib\gcc\arm-linux\4.0.2\..\..\..\..\arm-linux\bin\ld.exe: failed to merge target specific data of file ..\..\wiz3d/libopengles_lite.so
..\..\wiz3d/libopengles_lite.so: undefined reference to `GLESOAL_SetDisplayAddress'
..\..\wiz3d/libopengles_lite.so: undefined reference to `GLESOAL_WaitForDisplayAddressPatched'
..\..\wiz3d/libopengles_lite.so: undefined reference to `GLESOAL_Sleep'



and i don't have the source for libopengles_lite as it is GPH stuff... so what? o_O

Also I see it has VFP instructions enabled, if i try to enable them on my code too using "-mfpu=vfp -mfloat-abi=softfp" (is it right?) i get also


b:\wizcoding\devkitgp2x\bin\..\lib\gcc\arm-linux\4.0.2\..\..\..\..\arm-linux\bin\ld.exe: ERROR: obj\Release\test.o uses VFP instructions, whereas bin\Release\WizTest.gpe does not


before the other errors...


:huh:

PS ARGH! i did the 6 AM and i need to be at work at 9... good night :p
 
Eclipse: Did you success excuting SDL test program by Guyfawkes?

I could compile with Franxis' fix but it just hanged on loading screen on my Wiz. (same to your first error stage)
If you could, please tell me how can I fix it.

Thanks.
 
I haven't tried that SDL test program again, I just compiled an SDL application that initialize and draw the screen white.
I suppose it crashed because the lack of one or more libraries.

Linking dinamically using only -lSDL works.

Try this code: http://pastebin.com/f1755dd4c and link only using -lSDL

I'll do some tests and make the full example run too as the other libraries are quite useful, If i manage to solve with OpenGL ES I promise to upload a full working toolchain for windows...

Now i really hope Pickle or someone can solve my problem with the libraries...
 
awww.... i need to work now ç_____________ç

Later i'll try to compile all the Guyfawkes' SDL Test... still no replies about OpenGL ES nor what's going on with that VFP instructions problem :(
 
awww.... i need to work now ç_____________ç

Later i'll try to compile all the Guyfawkes' SDL Test... still no replies about OpenGL ES nor what's going on with that VFP instructions problem :(
the wizGLES can always be compiled into your project it doesnt have to be a shared lib. The only way around the VFP ive found is to use realtime dynamic linking. This it what nanoGL uses.
Just be aware the opengles support is a mess, gph is been silent of late on the issue too.
 
Last edited by a moderator:
thanks for the reply Pickle, i was just waiting for you :p

I've already recompiled wizGLES using devkitGP2X so now my problem is how to enable VFP instructions on all my code, as it keeps saying that WizTest.gpe (my executable) does not have VFP instructions enabled even if i use -mfpu=vfp -mfloat-abi=softfp :(

And strangely it said that obj\Release\test.o (that's my .cpp file compiled object) has it.. so basically i don't know how to tell the linker to link the object files using VFP instructions...

I'll search around later, and thanks for the tip about nanoGL, i'll look how the project is configured
 
HURRAH :D

ok I've stolen the code from nanogl init and destroy functions and finally managed to compile AND it even runs!

Only that after it quits the application I see garbage on the screen.... like two blue bands and two yellow ones, on the top of the menu, and i need to reboot the console.
Is there a way to fix it?

I swear I call a destroy function that does the nanoGL_Destroy function do.

The code only init opengl es and do a swap buffer, just like the sample code Pickle has posted on that other thread, plus the nanogl code bits with dlopen to link dinamically that library....


Maybe tomorrow i'll try to render a spinning triangle... OMG!
 
You're doing better than I am. I too was trying to get some of the OpenGL stuff to compile under Windows. I could get it to compile, but now get an error when running that the gl lib can't find the functions in Pickle's code. I was using the Open2x windows tool chain, maybe I'll give the "normal" tool chain a shot to see if I can get it to work.

It can certainly be a frustrating process!
 
You're doing better than I am. I too was trying to get some of the OpenGL stuff to compile under Windows. I could get it to compile, but now get an error when running that the gl lib can't find the functions in Pickle's code. I was using the Open2x windows tool chain, maybe I'll give the "normal" tool chain a shot to see if I can get it to work.

It can certainly be a frustrating process!
Maybe I got that error too during the process, regarding functions like GLESOAL_Initalize, GLESOAL_Sleep and others if i remember well... but recompiling pickle's wizGLES library using this sources http://pickle.gp2x.de/wiz3d.zip got rid of them, because the error was about the compiler unable to find the functions referred by the code.


Now i *only* need to solve that stuff it does on quitting the application, I saw that even the GPH opengl demos do weird things... exiting my program totally mess up the screen with blue and yellow bard covering more than half of it, so i need to reboot the console :\
 
Last edited by a moderator:
Which firmware do you use, Eclipse? I noticed that the problems with the demos are gone with 1.0.1.

Regards.
Stephan
 
Thanks Stephan :)

if it's the number on Settings > Information it's the 1.0.0, good to know to the problem is fixed on the newer one :)

edit: I've read that the newer firmware has issues, like main menu slowdown and such, will it slows applications as well or is only because they tried to fix the diagonal tearing?
 
I don't think it slows down other application but menu.
(So I can bare with it)

But someone notice it increases diagnal problem in other applications which I cannot sure of it.

( :rolleyes: I'm looking forward your progress, eclipse I'm kind of lazy person to tackle all that problems)
 
Maybe I got that error too during the process, regarding functions like GLESOAL_Initalize, GLESOAL_Sleep and others if i remember well... but recompiling pickle's wizGLES library using this sources http://pickle.gp2x.de/wiz3d.zip got rid of them, because the error was about the compiler unable to find the functions referred by the code.
Now i *only* need to solve that stuff it does on quitting the application, I saw that even the GPH opengl demos do weird things... exiting my program totally mess up the screen with blue and yellow bard covering more than half of it, so i need to reboot the console :\


I've tried doing the same thing, compiling wizGLES directly, and including the .o file instead of using it as a library, and still get the error. My only theory was that the Open2x toolchain was causing issues with the GL lib. I'll give the Windows tool chain anther try, and see if I have any better luck there.

One tool I found useful was the Termula2x app for the Wiz. At least you can see console output using it, it saved me some pain when my program was crashing for unknown reasons. It's a pain to have to type with the onscreen keyboard, but it's better than nothing.
 
Last edited by a moderator:
Last edited by a moderator:
But someone notice it increases diagnal problem in other applications which I cannot sure of it.
( :rolleyes: I'm looking forward your progress, eclipse I'm kind of lazy person to tackle all that problems)


that's pretty weird... I think i'll live with that at the moment and do the update when i really need to launch the app a lot of times...

@Jan-Nik: thanks, I was thinking about searching how to do a script like that one too ;)

this night i'll try to renderize something, hoping everything works now
 
Last edited by a moderator:
I switched to the devkitGP2x tool chain, recompiled everything, and I still get the same error. I can see the nanoGL code I borrowed load the opengles_lite.so library and wrap it, but I still get run time errors that it can't find the functions in wizGLES.cpp. I can dump the binary and see them in there, so I have no idea what's going on.

Are you using Pickle's makefile to compile wizGLES.cpp, then link in the resultant .o file? Which include/.h files did you use? There's one set in wiz3d.zip/wizGLES, and another included with the nanoGL. Any chance of posting your makefile and source?

I apologize for all the questions, I've tried every combination that I can think of and still get the damn error, it's driving me crazy!
 
Back
Top