Raspberry Pi cross Kompilierung und remote debugging

Forum für alles rund um die MSEide und MSEgui
Antworten
mse
Beiträge: 2013
Registriert: Do 16. Okt 2008, 10:22
OS, Lazarus, FPC: Linux,Windows,FreeBSD,(MSEide+MSEgui 4.6,git master FPC 3.0.4,fixes_3_0)
CPU-Target: x86,x64,ARM

Raspberry Pi cross Kompilierung und remote debugging

Beitrag von mse »

Die aktuelle git master Version von MSEide+MSEgui hat ein template Projekt für einen i386-linux host und arm-linux target, getestet mit dem Raspberry Pi.
Aus README.TXT:

Code: Alles auswählen

 
Crosscompiling and remote debugging i386-linux -> arm-linux
***********************************************************
For Raspberry Pi:
- Establish a ssh login without password (public key authentication).
 
- On the i386-linux host download and extract
http://sourceforge.net/projects/mseide- ... ihf.tar.gz
to <your crossfpc directory>.
 
- Start MSEide, in 'Settings'-'Configure MSEide'-'Global Macros' add:
 
Name          Value
 
CROSSMSEDIR   <MSEide+MSEgui directory>
CROSSFPCDIR   <your crossfpc directory>
HOSTIP        <the IP of the host>
REMOTEIP      <the IP of the remote target>
REMOTEPORT    <the remote port, ex: 2345>
REMOTEUSER    pi
 
- 'Project'-'New'-'From Template', select "crossarmdefault.prj".
- Create the new project.
- 'Project'-'Options'-'Macros', set the TARGETPROJECTDIR value to the project
  path in remote target, ex: "/home/pi/proj/testcase".
- Check the TARGETENV macro.
 
Press F9 and hope the best. ;-)
 
 

Der benötigte cross-Compiler, cross-binutils und cross-gdb sind hier:
http://sourceforge.net/projects/mseide- ... ihf.tar.gz
Mit diesem Paket und dem "crossarmdefault.prj" Projekttemplate kann man mit MSEide arbeiten wie wenn es sich auf dem Raspberry Pi befinden würde.
MSEide läuft auch direkt auf dem Raspbberry Pi erstaunlich flüssig, die Kompilierzeiten sind relativ lang. Im Gegensatz zu MSElang hat die Übersetzungsgeschwindigkeit bei Free Pascal leider keinen grossen Stellenwert mehr.

Martin
Zuletzt geändert von mse am Do 27. Nov 2014, 12:40, insgesamt 2-mal geändert.

Socke
Lazarusforum e. V.
Beiträge: 3158
Registriert: Di 22. Jul 2008, 19:27
OS, Lazarus, FPC: Lazarus: SVN; FPC: svn; Win 10/Linux/Raspbian/openSUSE
CPU-Target: 32bit x86 armhf
Wohnort: Köln
Kontaktdaten:

Re: Raspberry Pi cross Kompilierung und remote debugging

Beitrag von Socke »

Hallo Martin,

kannst du einen kurzen Überblick über den Inhalt des Archivs geben? Was ist darin enthalten?
MfG Socke
Ein Gedicht braucht keinen Reim//Ich pack’ hier trotzdem einen rein

mse
Beiträge: 2013
Registriert: Do 16. Okt 2008, 10:22
OS, Lazarus, FPC: Linux,Windows,FreeBSD,(MSEide+MSEgui 4.6,git master FPC 3.0.4,fixes_3_0)
CPU-Target: x86,x64,ARM

Re: Raspberry Pi cross Kompilierung und remote debugging

Beitrag von mse »

Free Pascal cross Compiler, cross binutils, cross gdb und die von FPC und MSEide+MSEgui benötigten Bibliotheken und Objektdateien.

mse
Beiträge: 2013
Registriert: Do 16. Okt 2008, 10:22
OS, Lazarus, FPC: Linux,Windows,FreeBSD,(MSEide+MSEgui 4.6,git master FPC 3.0.4,fixes_3_0)
CPU-Target: x86,x64,ARM

Re: Raspberry Pi cross Kompilierung und remote debugging

Beitrag von mse »

Die Hard-Float cross-fpc Version ist hier:
https://sourceforge.net/projects/mseide ... z/download
crossarmdefault.prj MSEide+MSEgui git master 37b4faede9e260b89ad6d0f209773fef0032d283 unterstützt nun sowohl eabi als auch eabihf. Bitte beachte das geänderte README.TXT.

mse
Beiträge: 2013
Registriert: Do 16. Okt 2008, 10:22
OS, Lazarus, FPC: Linux,Windows,FreeBSD,(MSEide+MSEgui 4.6,git master FPC 3.0.4,fixes_3_0)
CPU-Target: x86,x64,ARM

Re: Raspberry Pi cross Kompilierung und remote debugging

Beitrag von mse »

Es gibt neue Versionen für Free Pascal fixes_3_0:

http://mseide-msegui.sourceforge.net/pics/crossarm.png
http://sourceforge.net/projects/mseide- ... pcrossarm/

Code: Alles auswählen

 
Crosscompiling and remote debugging i386-linux -> arm-linux
***********************************************************
For Raspberry Pi:
- Establish a ssh login without password (public key authentication).
 
- On the i386-linux host install the scp program
- download and extract
 
http://sourceforge.net/projects/mseide- ... 0_1.tar.gz
  to <your crossfpc directory>.
 
- Start MSEide, in 'Settings'-'Configure MSEide'-'Global Macros' add:
 
Name          Value
 
CROSSMSEDIR   <MSEide+MSEgui directory>
CROSSFPCDIR   <your crossfpc directory>
HOSTIP        <the IP of the host>
REMOTEIP      <the IP of the remote target>
REMOTEPORT    <the remote port, ex: 2345>
REMOTEUSER    pi
 
- 'Project'-'New'-'From Template', select "crossarmdefault.prj" or
  "crossarmconsole.prj".
- Create the new project.
- 'Project'-'Options'-'Macros', set the TARGETPROJECTDIR value to the project
  path in remote target, ex: "/home/pi/proj/testcase".
- Check the TARGETENV macro.
- If your application needs additional libraries copy them from Raspberry Pi
  /lib/arm-linux-gnueabihf or /usr/lib/arm-linux-gnueabihf to
  <your crossfpc directory>/eabihf/lib
 
Press F9 and hope the best. ;-)
 


FPC 3.0.1 benötigt MSEide+MSEgui git master Version:
https://gitlab.com/mseide-msegui/mseide-msegui

Antworten