![]() |
FreePascal on Nokia 770
I was successfully used FreePascal 1.9.8 for build of simple console "Hello Nokia 770 World" application.
Compiled without problems, started without problems - just with How-to for Zaurus I'll continue with testing and reporting |
Amper_CZ, can you add download link?
|
Quote:
I was started with http://www.freepascal.org/wiki/index...ompile_For_ARM but there is few bugs (invalid links,names and so ...) but all required files can be located on Freepascal sourceforge. best regards, Amper |
The steps to setup FPC compilation environment
1. Install a normal FPC rpm for i386 linux, you'd better use the newest FPC release.
2. Download a FPC tarball for arm linux. The newest one I can find is 2.0.0. Unpack and copy to the directory in step1. Normally it's /usr/lib/fpc/2.0.2/units/arm-linux. 3. Install a ftp software on you 770, and try to copy the whole /usr/lib and /lib to your Desktop. And if it reports can't find some .so file when compiling, make a link to the .so file. Such as, it reports: can't find shared library libpango-1.0.so, run "ln -s libpango-1.0.so.0 libpango-1.0.so". This will be a tedious work. 4. Write programs in FPC, and write a bash script to compile. My script is like this: (compile.sh) #! /bin/sh NoDebug=" -CX -Xs -XX " if [ "$1" ]; then echo "Compile for: $1" rm *.ppu *.o fi if [ "$1" = "maemo" ]; then MaemoLib="/home/kenny/temp/lib" ARMLinux="/usr/lib/fpc/2.0.2/units/arm-linux" ppcarm $NoDebug -XParm-linux- -n \ -Fu$ARMLinux \ -Fu$ARMLinux/* \ -Fl$MaemoLib \ test.pp elif [ "$1" = "i386" ]; then fpc $NoDebug test.pp else echo "Usage:" echo " ./compile maemo" echo " ./compile i386" fi Use this script, you can run "./compile i386" to compile and test on your desktop; and run "./compile maemo" to compile and transfer to your 770. |
fpc on N770
Dear all,
Some months ago, I also could generate code via FPC for the N770. I even have made a Hildon unit . But I have to admit that I gave up because at the end of the day the generated code was really too big comparing to the same in C. Almost 8 time. I used many options of the free pascal compiler but still too big code. :mad: If any of you have found a way to reduce the code size to at least 10% more that it equivalent to C I would be very pleased to know. cheers, Bertrand |
Re: FreePascal on Nokia 770
I think this is because freepascal compiled binaries are linked statically to the runtime. There is no such thing as separate libpascal.
If you try to compile programs with gcc statically then you will find out that resulting binaries are 5-10 times more fat than pascal compiled ones. Anyway, this doesn't simplify your task. I would suggest to use smartlinking (-XX flag, if libs are also compiled with smartlinking) and then UPX. You'll have binaries which are comparable, or even smaller than if you compile the same with gcc. |
Re: FreePascal on Nokia 770
|
Re: FreePascal on Nokia 770
oh great, u guys r great! soon I will be able to code in this nice language :) keep working keep trying cheers
|
Re: FreePascal on Nokia 770
Quote:
They compile well and are dynamically linked to the libraries of the n900. If the programs are stripped from debug information the binaries are not big. I've just tried it. |
Re: FreePascal on Nokia 770
My question to you guys is, how do you create a .deb installer file from the binary you compiled? I just ported my program to maemo (using N900), and I do not know how to create a .deb for it. Using Ubuntu, so Ubuntu centric instructions are appreciated. :)
|
All times are GMT. The time now is 00:24. |
vBulletin® Version 3.8.8