Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!

Difference between revisions of "RAD with FPC/Lazarus"

From Openembedded.org
Jump to: navigation, search
 
Line 2: Line 2:
  
 
[[File:Lazarus-ide-1.png]]
 
[[File:Lazarus-ide-1.png]]
 +
 +
 +
[[File:Lazarus-ide-2.png]]
 +
 +
 +
[[File:Lazarus-ide-3.png]]
  
  
Line 57: Line 63:
 
   -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
 
   -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
 
   -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/lib/gcc
 
   -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/lib/gcc
 +
 +
 +
[[Category:User]]

Latest revision as of 13:27, 11 November 2010

The Free Pascal Compiler and the Lazarus IDE are good alternatives for development.

Lazarus-ide-1.png


Lazarus-ide-2.png


Lazarus-ide-3.png


[edit] Install FPC and Lazarus

Reference: http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM

But the binutils part should be omitted and instead use the binutils built by OE.

[edit] Use OE built binutils

Bake the binutils-cross-sdk:

 bitbake binutils-cross-sdk


Install the baked ipk, eg. binutils-cross-sdk_2.18-r13.1.6_i686-armv6-sdk.ipk, on the host:

 sudo dpkg --install --force-architecture binutils-cross-sdk_2.18-r13.1.6_i686-armv6-sdk.ipk


Create links to the binutils programs:

 cd ~/lazarus/fpc/binutils
 ln -s /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-ld ld
 ln -s /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-ar ar
 cat <<EOT > as
 #!/bin/sh
 /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-as -meabi=5 \$@
 EOT
 chmod 755 as


Config fpc to use the binutils, edit ~/.fpc.cfg to include:

 #IFDEF CPUARM
 -XP/home/mike/lazarus/fpc/binutils/

[edit] Get target library files

Copy the target library files from OE to the host:

 cd /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi
 sudo mkdir -p {lib/gcc,usr/lib}
 sudo rsync -av 192.168.0.24::oe/build/ok6410-tmp/sysroots/armv6-angstrom-linux-gnueabi/lib/* lib/
 sudo rsync -av 192.168.0.24::oe/build/ok6410-tmp/sysroots/armv6-angstrom-linux-gnueabi/usr/lib/* usr/lib/
 sudo rsync -av 192.168.0.24::oe/build/ok6410-tmp/sysroots/i686-linux/usr/armv6/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/* lib/gcc/


Config fpc to use the libraries, edit ~/.fpc.cfg to include:

 #IFDEF CPUARM
 -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/lib
 -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
 -Fl/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/lib/gcc
Personal tools
Namespaces

Variants
Actions
Navigation
Categories
OE services
Toolbox