Jump to content


Photo

Trying To Setup Development On Windows Using Devkitgp2x


  • Please log in to reply
19 replies to this topic

#1 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 01:33 AM

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.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 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 01:38 AM

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

Edited by Eclipse, 14 June 2009 - 01:08 PM.


#3 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 03:41 AM

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.gif

PS ARGH! i did the 6 AM and i need to be at work at 9... good night tongue.gif

Edited by Eclipse, 14 June 2009 - 03:42 AM.


#4 mittens

mittens

    GP32 Hardcore

  • GP32 Hardcore
  • PipPipPipPip
  • 242 posts
  • Location:Now: On.

Posted 14 June 2009 - 07:39 AM

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.

#5 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 10:10 AM

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...

#6 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 11:13 AM

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 sad.gif

#7 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 14 June 2009 - 04:40 PM

QUOTE (Eclipse @ Jun 14 2009, 07:13 AM) <{POST_SNAPBACK}>
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 sad.gif


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 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 04:54 PM

thanks for the reply Pickle, i was just waiting for you tongue.gif

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 sad.gif

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 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 14 June 2009 - 05:13 PM

Im glad to hear you got it working.
The method im refering to is described on this page too:
http://www.opengroup...ons/dlopen.html

#10 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 05:36 PM

QUOTE (Pickle @ Jun 14 2009, 05:13 PM) <{POST_SNAPBACK}>
Im glad to hear you got it working.
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 tongue.gif

#11 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 14 June 2009 - 11:01 PM

HURRAH biggrin.gif

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 satacoy

satacoy

    GP32 User

  • Members
  • PipPipPip
  • 81 posts

Posted 15 June 2009 - 01:03 AM

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!



#13 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 15 June 2009 - 08:17 AM

QUOTE (satacoy @ Jun 15 2009, 01:03 AM) <{POST_SNAPBACK}>
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 :\

#14 sbock

sbock

    Chaos is our mode and modus

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1372 posts
  • Gender:Male
  • Location:Germany

Posted 15 June 2009 - 08:58 AM

Which firmware do you use, Eclipse? I noticed that the problems with the demos are gone with 1.0.1.

Regards.
Stephan

#15 Eclipse

Eclipse

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 197 posts
  • Location:Italy

Posted 15 June 2009 - 09:33 AM

Thanks Stephan smile.gif

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 smile.gif

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.