GP32 Making Sdl Use Hardware Fp


Ksmiler

Member
Joined
Apr 30, 2003
Messages
123
Location
Yamaguchi, Japan
Hey people, How do you make SDL use hardware floating point? :unsure:

I get errors like:
c:\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: ERROR: c:/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1\libgcc.a(_udivsi3.o) uses hardware FP, whereas c:/Programming/GP32/Projects/Developing/sdl_test/SDLTest.elf uses software FP
c:\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: Warning: c:/devkitARM_r8/bin/../lib/gcc/arm-elf/3.4.1\libgcc.a(_udivsi3.o) does not support interworking, whereas c:/Programming/GP32/Projects/Developing/sdl_test/SDLTest.elf does
c:\devkitARM_r8\bin\..\lib\gcc\arm-elf\3.4.1\..\..\..\..\arm-elf\bin\ld.exe: failed to merge target specific data of file

...There is another to do with interworking but I dont know what that is, if you can find a fix to that also, would be great also. :p
 
I guess you should never use hardware fp, as the arm9 in the gp32 doesn't have one....

I think your libgcc.a file is not good, this is what causes the problem.
 
mATkEUpON posted on Oct 7 2004 at 12:12 AM said:
I guess you should never use hardware fp, as the arm9 in the gp32 doesn't have one....

I think your libgcc.a file is not good, this is what causes the problem.

Agreed. GP32 doesn't have hardware FPU, your toolchain is probably damaged, go reinstall it.
 
Last edited by a moderator:
Ksmiler posted on Oct 6 2004 at 11:59 PM said:
Hey people, How do you make SDL use hardware floating point? :unsure:

For some reason your SDL build is done with -msoft-float. This is not required since the compiler already knows that the chip doesn't have an FPU. However the compiler will refuse to link code built with -msoft-float and without it! You need to rebuild SDL without -msoft-float set. Also probably with -mno-thumb-interwork.

Mark
 
Last edited by a moderator:
foft posted on Oct 7 2004 at 09:24 PM said:
Ksmiler posted on Oct 6 2004 at 11:59 PM said:
Hey people at How do you make SDL use hardware floating point? :unsure:

For some reason your SDL build is done with -msoft-float. This is not required since the compiler already knows that the chip doesn't have an FPU. However the compiler will refuse to link code built with -msoft-float and without it! You need to rebuild SDL without -msoft-float set. Also probably with -mno-thumb-interwork.

Mark

SDL Makefile.gp32 said:
OPTFLAGS=-O2 -mtune=arm920 $(DEFS) -DGFXST -Wuninitialized -Wno-import -Wchar-subscripts -Wformat -Wimplicit-int -Wimplicit-function-declaration -Wmultichar -Wreturn-type -Wswitch -Wunused -Wuninitialized -Wsign-compare -msoft-float -mthumb-interwork

Okay, I am trying to compile a fresh copy of SDL for the GP32.
I have Cygwin installed. I downloaded the SDL 1.2.5 (stable) source code, and then downloaded the SDL-GP32 patch via the sourceforge project.
I patched the SDL source by extracting the orignal SDL 1.2.5 tarball and then overwrote it with the patch.

I then put the SDL 1.2.5 directory into my /usr directory and edited the makefile by removing -msoft-float and adding -mno-thumb-interwork.
Then I went to /usr/SDL 1.2.5/ in Cygwin.
After that I typed in "make -f Makefile.gp32"

And then I got this error: <_<
make: arm-thumb-elf-gcc: Command not found.
I did a full install of Cygwin but I have a funny feelling that I might have missed something.

I did arm-thumb-elf-gcc -v to see if it was installed and it wasnt.

So... how do I get it to work in Cygwin? :unsure:

P.S: If I ever get SDL to work with DevkitARM, I promise to make a tutorial for everyone as my token of gratitude. (If anyone wants it B) )
 
Last edited by a moderator:
Ksmiler posted on Oct 11 2004 at 08:24 PM said:
SDL Makefile.gp32 said:
OPTFLAGS=-O2 -mtune=arm920 $(DEFS) -DGFXST -Wuninitialized -Wno-import -Wchar-subscripts -Wformat -Wimplicit-int -Wimplicit-function-declaration -Wmultichar -Wreturn-type -Wswitch -Wunused -Wuninitialized -Wsign-compare -msoft-float -mthumb-interwork

Okay, I am trying to compile a fresh copy of SDL for the GP32.
I have Cygwin installed. I downloaded the SDL 1.2.5 (stable) source code, and then downloaded the SDL-GP32 patch via the sourceforge project.
I patched the SDL source by extracting the orignal SDL 1.2.5 tarball and then overwrote it with the patch.

I then put the SDL 1.2.5 directory into my /usr directory and edited the makefile by removing -msoft-float and adding -mno-thumb-interwork.
Then I went to /usr/SDL 1.2.5/ in Cygwin.
After that I typed in "make -f Makefile.gp32"

And then I got this error: <_<
make: arm-thumb-elf-gcc: Command not found.
I did a full install of Cygwin but I have a funny feelling that I might have missed something.

I did arm-thumb-elf-gcc -v to see if it was installed and it wasnt.

So... how do I get it to work in Cygwin? :unsure:

P.S: If I ever get SDL to work with DevkitARM, I promise to make a tutorial for everyone as my token of gratitude. (If anyone wants it B) )

Try using arm-elf-gcc for a start not the thumb compiler stub. Also try making -mtune=arm920t on later GCC versions 3.4+.

Do you have a GP32 tool-chain working for cygwin? If you are using DevKitArm then you just need to use that to compile it, no need to cygwin.

I have a tar of a correctly built 1.2.5 SDL but I can't seem to find it. I'll update the post if it tuns up.
 
Last edited by a moderator:
How about using precompiled SDL here it is.

The precompiled GP32 SDL use -msoft-float and thumb interworking to be compatable with the ancient dev kits like DevKitAdv. You will need to recompile from source if you want to use it on any decent kits or a roll your own GCC ;).

That said buiding Beta 3 (SDL 1.2.7) on a newer compiler gives respectable performance for very lightweight apps so it is worth a little bit of work to get going.
 
Last edited by a moderator:
How about using precompiled SDL here it is.


That's the problems, I use the precompiled version downloaded from the website ... and the last version is compiled using FP!! :)

The previous precompiled version in the same website links fine ;)

PD. Djwillis, sorry i missed your post ;)

Aiken
 
Last edited by a moderator:
Woohoo. Thanks for your help people :D. Took up the challenge again to get this working and I did ;) . Got all libs (SDL, SDL_Image, and SDL_Mixer) working with DevkitARM.

As promised above, will write a tutorial on how to get it set up and will hopefully provide with the new libs.

Again, thanks!

Ksmiler gp32_console
 
Ksmiler posted on Jul 23 2005 at 02:55 AM said:
Woohoo. Thanks for your help people :D. Took up the challenge again to get this working and I did ;) . Got all libs (SDL, SDL_Image, and SDL_Mixer) working with DevkitARM.

As promised above, will write a tutorial on how to get it set up and will hopefully provide with the new libs.

Again, thanks!

Ksmiler gp32_console

Hi Ksmiler, have you find the time for that tutorial ?

Could you please make the compiled libraries available for download ?

I'd like to have those libraries for an emulator porting project I'd like to do on the GP32.

Thanks a lot.

weirdo.
 
Last edited by a moderator:
Hey weirdocollector, unfortuately, the SDL source code compiles for some projects. but not for all :( Something to do with gpwrap i think due to my errors i get at compile time is

Code:
Linking files...
C:/devkitARM/gamepark_sdk/lib\libpng.a(pngrio.o): In function `png_default_read_data':
pngrio.c:(.text+0x58): undefined reference to `GpFileRead'
C:/devkitARM/gamepark_sdk/lib\libSDL.a(SDL_rwops.o): In function `fopen':
SDL_rwops.c:(.text+0x28c): undefined reference to `GpFileOpen'
SDL_rwops.c:(.text+0x2c8): undefined reference to `GpFileCreate'
SDL_rwops.c:(.text+0x2ec): undefined reference to `GpFatInit'
C:/devkitARM/gamepark_sdk/lib\libSDL.a(SDL_rwops.o): In function `stdio_seek':
SDL_rwops.c:(.text+0x32c): undefined reference to `GpFileSeek'
SDL_rwops.c:(.text+0x358): undefined reference to `GpFileSeek'
C:/devkitARM/gamepark_sdk/lib\libSDL.a(SDL_rwops.o): In function `stdio_read':
SDL_rwops.c:(.text+0x3ac): undefined reference to `GpFileRead'
C:/devkitARM/gamepark_sdk/lib\libSDL.a(SDL_rwops.o): In function `stdio_write':
SDL_rwops.c:(.text+0x3e8): undefined reference to `GpFileWrite'
C:/devkitARM/gamepark_sdk/lib\libSDL.a(SDL_rwops.o): In function `stdio_close':
SDL_rwops.c:(.text+0x444): undefined reference to `GpFileClose'
collect2: ld returned 1 exit status
make: *** [build/16b_test.elf] Error 1

:(

Ahh well, just read your thread and chui will remake the libraries :) . Sorry i didnt help ya much :p

Ksmiler
 
Last edited by a moderator:
Hey people. Downloaded the new SDL-GP32 source and i'm now trying to build it using cygwin... but I am not sure how to.

This is because the new libraries come with -mno-thumb-interwork and -msoft-float included.

How would one recompile the SDL-Gp32 source?

Ksmiler
 
Back
Top