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: 49
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: 1560
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: 49
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 messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Great to hear that. Looking forward to any documentation updates.
Re: Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS [message #1850898 is a reply to message #1840061] Mon, 21 March 2022 15:51 Go to previous messageGo to next message
Laurin Prenzel is currently offline Laurin PrenzelFriend
Messages: 1
Registered: June 2017
Junior Member
Just in case anyone else is looking for an answer, I was able to compile forte for a Raspberry Pi 4 with Raspberry Pi OS (64-bit) Lite using the following toolchain:

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
AArch64 GNU/Linux target (aarch64-none-linux-gnu)
https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz

Just had to replace the links in the tutorial.

[Updated on: Mon, 21 March 2022 17:48]

Report message to a moderator

Re: Running forte on 64-bit Raspberry Pi 4 running Ubuntu 20.04.2 LTS [message #1851183 is a reply to message #1840003] Tue, 29 March 2022 21:25 Go to previous message
Sentekin Can is currently offline Sentekin CanFriend
Messages: 13
Registered: January 2022
Junior Member
Hi Barry and Alois,
RPI 4B is very powerful, I have done some MQTT and Node-RED work with python on RPI 4B. All worked great. However, we always expect a new version from RPI organization and RPI 5B may be at the door soon. Here is some unconfirmed information I copied from:
https://raspberryexpert.com/raspberry-pi-5-release-date-specs-price/#:~:text=There%20is%20no%20regularity%20in,will%20be%20a%20surprise%20launch.
"
In an interview with a popular news website, they asked the RPi co-founder Eben Upton whether they are working on a Raspberry Pi. And his answer was "We're thinking about it. We're not quite sure what it'll look like yet".

This is giving a hint that there are no drastic developments made for the next Pi. But they are in the early stages of development.

Raspberry Pi 5 Specifications (Expected)
Quad-core Cortex-A76 (ARM v8.2) 64-bit SoC @ 2GHz
4GB, 8GB or 16GB LPDDR5 SDRAM
2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.2
2 × traditional HDMI ports
Micro-SD card slot for loading OS and data
5V DC via USB-C connector
5V DC via GPIO header
"

[Updated on: Tue, 29 March 2022 21:29]

Report message to a moderator

Previous Topic:List of IEC 61499 Function Blocks
Next Topic:4Diac forte for Freertos + LwIP
Goto Forum:
  


Current Time: Thu Mar 28 13:44:28 GMT 2024

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

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

Back to the top