Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8549

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hi there,

I need to write a program (console application - no GUI) targeting the older CPUs arm4tl and armv5tej for an embedded linux. Both CPU types don't have a hardware float unit.
I know that the target devices uses an older Debian (Lenny) based version.
At this side wiki.debian.org/ArmHardFloatPort#ARM_EABI there are some ports defined.
The "armel" Port looks like what I need. So I download the Toolchain "win64-armel-linux" and try to build "FPC64 build cross element armel-linux".
The build process ends at "Stage 5: Copy Files and Units", see Attachment.

Can someone please help me here?

Kind regards,
Sörnt

Please Log in or Create an account to join the conversation.

Last edit: by Sörnt.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8550

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
Sir
try to use FPC32 and Typhon32 for CrossBuild
FPC64 has some problems with some CrossBuild targets
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8551

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Sir,
no luck - same result (see the Attachment).
At the "Cross-Build for RasberryPi" tutorial, there is the step "2. Download arm-linux-Raspbian OS Libraries". What OS-Libraries do I need for the "win-32-armel-linux" target? Is that needed for my target?

Kind regards,
Sörnt Poppe

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8552

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
Sir
for arm (32 bits) Crossbuild we need information

-Which Arm Debian version is the target OS?

We test many Pi CT arm applications ( info ), and all worked to any Arm Debian OS

Custom Arm Debian "Build" can make only 1-2 companies at Planet Earth
99,99% of the arm Debian distributions are "customization" distributions (change the logo, text etc...)

so, my suggestion is to build your application for RasberryPi and test to your Arm Linux Box

If this don't work, give us more info to help you :)
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8553

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Sir

thank you for helping me :-)

I did a "uname -r" for both boxes:
a) At the armv4 box, "uname -r" => "2.6.21.3"
b) At the armv5 box, "uname -r" => "3.4.11.ccu2"
These boxes are the central part of a homeautomation.

I will try your suggestion and go for the RasberryPI.

Kind regards,
Sörnt Poppe

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8555

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
For any help or custom FPC Element build script (x_FPC_Build_Element_zzzz.bat) we are here
HomeMatic CCU2...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8557

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Thank you very much for your guidance!

I uninstalled and remove CodeTypon and installed it once more. All fine.
I followed the Cross-Build for RasberryPi tutorial:
* Downloaded the "win32-arm-linux--RasberryPi.7z" ToolChain
* Downloaded the "arm-linux-Raspbian.zs" OS libraries
* Build FPC Cross arm-linux-RasberryPi element. All fine - it states "[FINAL INFO]: -- !!! win32 arm-linux Param:RapberryPi Cross Build Element Build OK !!! --"

I started Typhon32 and created a new Project of type "Console Application" and adjust the Project-Settings:
* set the "Libraries path" to "C:\codetyphon\binLibraries\arm-linux-Raspbian"
* set the "Target OS" to "Linux"
* set the "Target CPU family" to "arm"

I did not set the "LCLWidgetType=GTK2" at the "Additions and Overrides" page. Do I need to specify here something, since it is a console application?

This is my program:
program caHelloWorld;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { you can add units after this };

begin
  WriteLn('Hello World');
end.

* I build it without any error message :-)
* Copy the caHelloWorld program to the armv5 box (CCU2)
* Change the mode of caHelloWorld to 0755
* Start it via "sh caHelloWorld".

I get an error message:
caHelloWorld: line 1: syntax error: unexpected word (exepting ")")

I attached:
* the Build log for compiling "FPC Cross Arm Linux Raspberry Pi Element"
* my program
* a screenshot of error message at the ccu.

What can I do now?

Kind regards,
Sörnt Poppe

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8561

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
set platform = nogui
and try again
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8564

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Sir,
I am not sure where to set the "plattform=nogui" option.
I did set it within project options (see the attachment).
That way, I have no luck - same error mesage.

Rind regards,
Sörnt Poppe

Please Log in or Create an account to join the conversation.

Last edit: by Sörnt.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8565

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
Try to start with direct call, NOT "sh app"
please run to terminal
uname -a
to see what OS is....we don't have this arm Box
give us info
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8566

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Sir,
thank you for your patience.
I attached two screen shots of the outcome.

Kind regards,
Sörnt Poppe

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8567

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Arg - I now started
./caHeloWorld
and get "Illegal instructions"

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8569

  • Sörnt
  • Sörnt's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Sir,

I can provide you a ssh connection to both boxes. So you have a chance to test things on your side.
To which e-mail address should I send these connection information to?
I really appreciate your help here!

Kind regards,
Sörnt Poppe

Please Log in or Create an account to join the conversation.

Cross-compile for armv4t armv5tej on Win8.1(64) 8 years 5 months ago #8570

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
This email address is being protected from spambots. You need JavaScript enabled to view it.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1