pthreads works fine on GP2X. In fact, the SDL libraries for GP2X require it.
pthreads works fine on GP2X. In fact, the SDL libraries for GP2X require it.
In the next three months I should have a lot of spare time (my gf will fly to Germany until June )
Unfortunately I don't have a gp2x and, AFAIK, there isn't any emulator available. Of course I can take a look at it and I could help in the porting development
Thanks for the encouragement WillOriginally Posted by WILL
To Legolas: I would be willing to be a gp2x fpc crosscompiler tester if this helps.
I just have to figure out how to use it properly <G>
I have almost no ARM assembly skills but I could learn if you need a hand in creating RTLs for the gp2x.
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Also, if it helps I already have the devkitGP2X downloaded which is what I am using currently to make c/c++ programs for the gp2x.
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
To see if I could create my own win32 arm-linux cross compiler from the fpc source, I downloaded the fpcbuild.zip source code (2.1.x version I think) and the win32crossbinutils2005.zip from the ftp site.
I ran the script below that I placed in the root folder of the fpcbuild
G:\fpc\2.0.4\bin\i386-win32 pointed to the native 2.0.4 folder containing the make.exe fileCode:set path=G:\fpc\2.0.4\bin\i386-win32 make distclean make all install CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=G:\fpc-crossbinutils\arm-linux BINUTILSPREFIX=arm-linux- INSTALL_PREFIX=G:\fpc\win32_arm-linux COMPILER_OPTIONS="cpufpemu" pause
G:\fpc-crossbinutils\arm-linux pointed to the win32 crossbin utils that I unzipped
G:\fpc\win32_arm-linux pointed to where I wanted to install the new version of the compiler that would be built.
Sometime later after the build finished I had a look in the win32_arm-linux install folder and found that there are no .exe files created. Is this correct?
How do I use the new install to cross compile arm-linux stuff if there are no .exe files?
Did I do the procedure correctly?
Edit: I did just notice that in the G:\fpcbuild\fpcsrc\compiler folder there is a newly created file ppcrossarm.exe...
do I use this ppcrossarm.exe and the new units in the install folder G:\fpc\win32_arm-linux\units\arm-linux\rtl to compile pascal programs for the arm?
If needed I could use the units here as well I assume? G:\fpc\win32_arm-linux\units\arm-linux
cheers,
Pau.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Ok, I tried using the ppcrossarm.exe and the G:\fpc\win32_arm-linux\units\arm-linux\* path to compile my simple almost blank pas file using SDL.Originally Posted by paul_nicholls
[pascal]Program Test;
Uses
SDL;
Begin
End.
[/pascal]
It now finds the pthreads unit ok, but it instead complains that it couldn't find the internal as.exe assembler, now switching to external assembler.
It then stops with that 1 error.
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Did you install cross binutils?
Excellent news!! I have gotten my first simple sdl program working for the GP2X using freepascal, compiled under Win32!!
Someone was able to give me advice
The process requires the fpcbuild source files and the normal freepascal binaries installed, for example v 2.0.4 so you can use the make.exe file included in the fpc\2.0.4\bin\i386-win32 folder to compile the source code.
It also requires the devkitGP2X (http://archive.gp2x.de/cgi-bin/cfile...,0,0,0,14,1362) downloaded and extracted to the rootfolder of a drive (c:\ in my case)
SDL.pas also needs to be slightly modified.
There are lots of instructions so instead of placing them here I will upload the files needed to a server so people can download them and have a play
to wet your appitite though here are some of the script batch files I have used.
I put all the scripts into the project folder and update the CompileProject to point to the files to compile
InitFiles.bat
CompileProject.batCode:Del *.s Del *.o Del *.ppu Del *.gpe
CompileAux.batCode:@echo off set path=C:\FPC_win32_arm-linux\bin\arm-linux call InitFiles.bat rem compile all needed units to allow compiling of main file call CompileAux.bat SDL.pas rem compile main file call CompileMain.bat gp2x_test call CleanupFiles.bat pause
CompileMain.batCode:echo compiling %1... ppcrossarm -dgp2x %1
CleanupFiles.batCode:echo Compiling %1.dpr ppcrossarm -s -dgp2x %1.dpr echo Assembling %1 arm-linux-as.exe -mcpu=arm920 -o %1.o %1.s if errorlevel 1 goto asmend echo Linking %1 arm-linux-ld.exe -static --no-warn-mismatch -s -L. -o%1.gpe link.res -lm -lstdc++ -lgcc_eh -lpthread -lvorbisidec -lmikmod -lpng -lpng12 -lz -lSDL -ljpeg -lfreetype -lc -lgcc if errorlevel 1 goto linkend goto end :asmend echo An error occured while assembling %1 goto end :linkend echo An error occured while linking %1 :end
Code:Del *.s Del link.res Del ppas.bat Del *.o Del *.ppu
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
<G> I did get a big start from a Eugene Proshkin who lurks in the gp32x formumsOriginally Posted by WILL
He created a program for the GP2X called blocks (http://www.gp32x.com/board/lofiversi...hp/t34048.html)
He sent me an email as a starting point containing an example fpc.cfg file, the batch file to compile the FPC source code, what devkitGP2X file paths were needed, what devkitGP2X files .so files needed modifying.
He also sent me a batch file to compile the project files to create the .gpe file.
I did have to make changes to various batch files and paths to make it work + fix a small error (i think), but it was a huge help
It took me a while to get all the stuff working, but it seems to be working now :-)
He sent me the new SDL.pas file that was modified as well.
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Bookmarks