View Full Version : FreePascal on Nokia 770
04-21-2006, 05:07 PM
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?
04-23-2006, 01:45 PM
Amper_CZ, can you add download link?
I don't have it now (I'm on 770 now) but I want prepare 770 Pascal how-to.
I was started with http://www.freepascal.org/wiki/index.php/Setup_Cross_Compile_For_ARM but there is few bugs (invalid links,names and so ...) but all required files can be located on Freepascal sourceforge.
04-30-2006, 12:33 PM
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)
NoDebug=" -CX -Xs -XX "
if [ "$1" ]; then
echo "Compile for: $1"
rm *.ppu *.o
if [ "$1" = "maemo" ]; then
ppcarm $NoDebug -XParm-linux- -n \
elif [ "$1" = "i386" ]; then
fpc $NoDebug test.pp
echo " ./compile maemo"
echo " ./compile i386"
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.
06-23-2006, 05:28 AM
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.
09-18-2010, 03:37 PM
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.
05-05-2011, 04:27 PM
05-08-2011, 03:19 PM
oh great, u guys r great! soon I will be able to code in this nice language :) keep working keep trying cheers
05-13-2011, 10:52 AM
I think this is because freepascal compiled binaries are linked statically to the runtime. There is no such thing as separate libpascal
You can also write programs with pure gtk (without the component suite of lazarus).
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.
05-13-2011, 11:15 AM
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. :)
12-15-2011, 02:12 PM
take a look on photolightmeter or txpad deb sources in repos.
first compiled with lcl-gtk and second with lcl-qt
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.