Reply
Thread Tools
Posts: 6 | Thanked: 0 times | Joined on Apr 2006
#1
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
 
Posts: 6 | Thanked: 0 times | Joined on Feb 2006
#2
Amper_CZ, can you add download link?
 
Posts: 6 | Thanked: 0 times | Joined on Apr 2006
#3
Originally Posted by zApe
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...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
 
Posts: 2 | Thanked: 0 times | Joined on Apr 2006
#4
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.
 
Posts: 1 | Thanked: 0 times | Joined on Nov 2005
#5
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.
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
 
norayr's Avatar
Posts: 148 | Thanked: 217 times | Joined on Jul 2010 @ Yerevan
#6
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.
 
norayr's Avatar
Posts: 148 | Thanked: 217 times | Joined on Jul 2010 @ Yerevan
#7
 
Posts: 154 | Thanked: 33 times | Joined on Oct 2009 @ Lima-Perú
#8
oh great, u guys r great! soon I will be able to code in this nice language keep working keep trying cheers
__________________
Sent from my Nokia1112
Follow me @ Twitter Arrancamos
Testing Qt, Qt Mobility, Maemo SDK
 
Posts: 323 | Thanked: 116 times | Joined on Jul 2010
#9
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.

Last edited by gerdich; 2011-05-14 at 16:17.
 
ajack's Avatar
Posts: 288 | Thanked: 175 times | Joined on Oct 2010 @ Petaling Jaya, Selangor, Malaysia
#10
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.
__________________
Visit my blog at http://lifewithmaemo.blogspot.com or my website at http://www.renegade-uiq.com
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:47.