Trying To Setup Development On Windows Using Devkitgp2x
#1
Posted 14 June 2009 - 01:33 AM
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.com...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?
#2
Posted 14 June 2009 - 01:38 AM
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
Edited by Eclipse, 14 June 2009 - 01:08 PM.
#3
Posted 14 June 2009 - 03:41 AM
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...
PS ARGH! i did the 6 AM and i need to be at work at 9... good night
Edited by Eclipse, 14 June 2009 - 03:42 AM.
#4
Posted 14 June 2009 - 07:39 AM
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.
#5
Posted 14 June 2009 - 10:10 AM
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...
#6
Posted 14 June 2009 - 11:13 AM
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
#7
Posted 14 June 2009 - 04:40 PM
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.
#8
Posted 14 June 2009 - 04:54 PM
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
#9
Posted 14 June 2009 - 05:13 PM
The method im refering to is described on this page too:
http://www.opengroup...ons/dlopen.html
#10
Posted 14 June 2009 - 05:36 PM
The method im refering to is described on this page too:
http://www.opengroup...ons/dlopen.html
oh i see! I'll use nanoGL code as reference, thank you! I'll report here if and when i manage to compile something working
#11
Posted 14 June 2009 - 11:01 PM
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!
#12
Posted 15 June 2009 - 01:03 AM
It can certainly be a frustrating process!
#13
Posted 15 June 2009 - 08:17 AM
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 :\
#14
Posted 15 June 2009 - 08:58 AM
Regards.
Stephan
#15
Posted 15 June 2009 - 09:33 AM
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?
Edited by Eclipse, 15 June 2009 - 11:19 AM.











