Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Sa Jun 08, 2024 22:35

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 10 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Mi Sep 20, 2006 21:51 
help me to make FreePascal win32 for crosscompiling GP2X. I can`t make software floating point (there are errors with long number 200*** and linker say, that modules *.o with hard fp but need soft target)
I compile fpc 2.0.2 with make all install CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=c:\fpc\arm-linux BINUTILSPREFIX=arm-linux- INSTALL_PREFIX=d:\FPC\2.0.2 COMPILER_OPTIONS="cpufpemu" and comile my project with -Ce -CfSOFT, but this not work.
I can't compile fpc 2.1.2 dev version
second problem - during link there are undefined references "libSDL_gfx.so: undefined reference to `ceil@GLIBC_2.0'"
may be anyboby have cmpiled fpc for this target?


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 21, 2006 13:11 
Offline
DGL Member
Benutzeravatar

Registriert: Di Mai 18, 2004 16:45
Beiträge: 2622
Wohnort: Berlin
Programmiersprache: Go, C/C++
The Last time who i code for GP2X there was only a linux package for arm(nov-dez 2005).
I installed the FPC for linux and copy the arm linux in the right folders.
After that i load the right *.so files from a beta programmer for gp2x.
Today you can load the SDK from the GP2X site and setup your fpc.cfg to the sdk lib folders.
If you compile now with arm toolchain it use the so files from the gp2x sdk and there is no error.
Its very usefull if you update your gp2x firmware to 2.0 because then you can use the usb interface for coding.
I mount on the sd card a dir to my developer dir on my pc an if i start the app it read it via smb from pc.
That is very fast and you must not copy your program to sdcard, start gp2x, start programm, shut off and code some lines till next test.

_________________
"Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren"
Benjamin Franklin

Projekte: https://github.com/tak2004


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 21, 2006 17:18 
Yes, I use so files from SDK. I have too linux with fcp and can compile executable file for gp2x, but with hardware FP. There are some error with demo SDL. ttf fonts hav`nt color and program with sdl_gfx nothing display (may be it freeze on start). I know win32 beter and I wont to use fcp under win32, but now not successfuly :( And I`ll try samba. Thanks for tip.


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 21, 2006 22:25 
Offline
DGL Member
Benutzeravatar

Registriert: Di Mai 18, 2004 16:45
Beiträge: 2622
Wohnort: Berlin
Programmiersprache: Go, C/C++
I test only the sdl.so and on the end i used no lib only devices like fb.
I worked on a OpenGL ES driver for FPC and GP2X but i froze the project because not much time and a other project with more coder.
The gp2x sdl_.. stuff ist not the same like win and linux, check the sdk and c code for right usage.
Look at your headers for the libs, it can be that the headers are wrong.
Use the SDL headers only on beginning because they slow down the speed of your app.

_________________
"Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren"
Benjamin Franklin

Projekte: https://github.com/tak2004


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Sep 22, 2006 18:27 
Thanks. And stay single question - software FP. I can't now use math function like sin or cos


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Sep 22, 2006 22:12 
Offline
DGL Member
Benutzeravatar

Registriert: Di Mai 18, 2004 16:45
Beiträge: 2622
Wohnort: Berlin
Programmiersprache: Go, C/C++
Try uses math; ^^
I used sin and some other math functions in my app so it must work.
http://tak2004.dyndns.org/share/3dengine.rar
This is a old code of my testapp but i dont know if it compile correct.

_________________
"Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren"
Benjamin Franklin

Projekte: https://github.com/tak2004


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Sep 29, 2006 06:50 
I can't create working gpe. :( I try lot of variants, but now unsuccessfuly. Next three variants:

dynamic linking from command line - gpe after starting write that some functions not defined
in gp2x's libraries (__truncdfsd2)

static linking from command line
ld wrote for same functions from libgcc undefined - "undefined reference to `__divsi3'",
but in dynamic mode no these messages

ppcrossarm -dgp2x sdltest.dpr
ld wrote for each *.o
"arm-linux-ld.exe: ERROR: *.o uses hardware FP, whereas sdltest uses software FP"
and undefined some functions in same libraries (libgcc, libmikmod ...)

gpe from your samples I can make only with dynamic linking from command line. 3d.gpe work, but
in screen only two white line, and ortho.gpe put error in start.

And another question - with math I can use math function and float constant, but I can't compile code like next
var r: single;
n: integer;
...
n:=round(r / 200 * sin(pi/2));

Is there different beetveen libs in SDK gp2x for linux and windows? I think no. I use libs from windows SDK.

May be wont I many from freepascal? but Delphi compiled this project without error and work it fine with sdl dll-s


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Sep 29, 2006 12:57 
Offline
DGL Member
Benutzeravatar

Registriert: Di Mai 18, 2004 16:45
Beiträge: 2622
Wohnort: Berlin
Programmiersprache: Go, C/C++
I think your fpc.cfg is not correct.

Add following stuff with correct paths to your /etc/fpc.cfg.
Code:
  1. ...
  2. # For a debug version compile with debuginfo and all codegeneration checks on
  3. #IFDEF DEBUG
  4.   -g
  5.   -Crtoi
  6.   #WRITE Compiling Debug Version
  7. #ENDIF
  8.  
  9. # set binutils prefix
  10. #IFDEF FPC_CROSSCOMPILING
  11.   -XP-
  12. #ENDIF
  13.  
  14. #IFDEF gp2x
  15.   -XParm-linux-
  16.   -Xd
  17.   -Fu/usr/local/lib/fpc/2.0.4/units/arm-linux/*
  18.   -Fl/usr/local/arm-dev/arm-linux/usr/lib/
  19.   -Fl/usr/local/arm-dev/arm-linux/lib/
  20. #ENDIF


If you will compile a programm you use
Code:
  1. ppcarm unitname -dgp2x
and it use the right libs.

_________________
"Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren"
Benjamin Franklin

Projekte: https://github.com/tak2004


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Sep 30, 2006 22:32 
I did that fpc on windows compiled static gpe. I made batch file from ppas.bat

@echo off
ppcrossarm -s -dgp2x %1.dpr
SET THEFILE=sdltest
echo Assembling %THEFILE%
D:\FPC\2.0.2\bin\arm-linux\arm-linux-as.exe -mfpu=softfpa -o %1.o %1.s
if errorlevel 1 goto asmend
SET THEFILE=sdltest
echo Linking %THEFILE%
D:\FPC\2.0.2\bin\arm-linux\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 %THEFILE%
goto end
:linkend
echo An error occured while linking %THEFILE%
:end
Del %1.s
Del link.res
Del ppas.bat
Del %1.o

But I can't get software FP. For line "str(cos(pi/4),stri);"
With option -Ce wrote "Fatal: Unknown compilerproc "fpc_single_div". Check if you use the correct run time library."
With -CfSOFT - Internal error 200308252
else - Error: selected processor does not support `ldfd f1,[r0]'


Nach oben
  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Sep 30, 2006 23:44 
Offline
DGL Member
Benutzeravatar

Registriert: Di Mai 18, 2004 16:45
Beiträge: 2622
Wohnort: Berlin
Programmiersprache: Go, C/C++
At the moment there is now way to compile gp2x under windows.
The only supported platform for arm ist linux.

_________________
"Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren"
Benjamin Franklin

Projekte: https://github.com/tak2004


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 10 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 8 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.014s | 14 Queries | GZIP : On ]