Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS(Cross-compiling FORTE)
Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS [message #1839916] Thu, 01 April 2021 05:10 Go to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 33
Registered: November 2018
Member
I create all my 4diac applications on Linux (currently 64-bit Ubuntu on a Virtual Box). I am trying to cross-compile forte for a 64-bit Raspberry Pi 4 that is currently running Ubuntu 20.04 LTS. That is a 64-bit architecture (dpkg -- print-architecture shows "arm64" on the Pi, and "amd64" on my Ubuntu Virtual Box)

I followed all the 4diac instructions to cross-compile forte for a Raspberry Pi. That worked fine. However, the cross-compiled forte ends up as a 32-bit application. The command "file forte" shows this:

forte: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.16, BuildID[sha1]=098efaa4d5bddcd88e63309664bb0c294213d091, with debug_info, not stripped

Obviously that will not run on the Pi. Entering ./forte displays "./forte: No such file or directory".

I have tried enabling 32-bit support on Ubuntu but that is not working. Lots of missing libraries that would not load.

Is there a way of cross-compiling forte as a 64-bit app by configuring CMake differently?

Thank you in-advance for any help. If I can get this going, I am happy to document the process of setting it up and make it available on the forum. The 4diac cross-compilation instructions worked really well - I am almost there <smile>.

Another thought - an alternative might be to switch the Pi OS to be Ubuntu Server 20.04.2 LTS which is the 32-bit version. I suspect the forte performance difference would be minimal ???

Cheers,
Barry



.

[Updated on: Thu, 01 April 2021 06:17]

Report message to a moderator

Re: Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS [message #1839995 is a reply to message #1839916] Sat, 03 April 2021 12:58 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1213
Registered: January 2014
Senior Member
Hi Barry,

I haven't yet worked with RaspberryPI 4. But from your description I assume that you downloaded the cross compile toolchain for Arm 32bit. You would need a dedicated toolchain for arm64. I quickly googled and several people even said that PI 4 is powerfull enough to directly compile on it. Maybe that is the quickest and simplest solution for you.

Cheers,
Alois
Re: Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS [message #1840003 is a reply to message #1839995] Sun, 04 April 2021 00:50 Go to previous messageGo to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 33
Registered: November 2018
Member
Thank you Alois,
The 32-bit runtime is proving to be fine for the thesis examples I am building in 4diac. The Raspberry Pi 4 is performing very well with FORTE, far faster than I expected. The GPIO interfaces are also working fine.

At the moment, the cross-compilation is working very well, but I plan to investigate how to get the correct arm64 g++ cross-compile libraries installed so that CMake can use them. There is clear evidence from what I have played with so far that the Raspberry Pi 4 under 64-bit Ubuntu 20.4 is stunning, so I would love to be able to run FORTE up on it in 64-bit mode. A lot of the lag with earlier Raspberry Pi models has gone away; it is now a very serious embedded platform.

Once I have that going, I will document the differences in the CMake cross-compiler documentation and send it through to you.

Thank you again,
Barry
Re: Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS [message #1840061 is a reply to message #1840003] Tue, 06 April 2021 08:58 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1213
Registered: January 2014
Senior Member
Great to hear that. Looking forward to any documentation updates.
Previous Topic:compile with utils and rt_events
Next Topic:force value for composite fb doesn't work
Goto Forum:
  


Current Time: Sun May 16 19:32:47 GMT 2021

Powered by FUDForum. Page generated in 0.02373 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top