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 » Build 4diac FORTE for Multiple Target (aarch64, aarch64 with musl, x86_64, x86_w64) on WSL
Build 4diac FORTE for Multiple Target (aarch64, aarch64 with musl, x86_64, x86_w64) on WSL [message #1863266] Sat, 20 January 2024 17:28 Go to next message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
Build 4diac FORTE for Multiple Target on WSL

Meanwhile, this is for the Raspberry Pi 4B and Windows targets, although I have also done it for the Ubuntu 20.04 server.

I wrote it as personal blog content but you can asking related questions here.

UPDATE:
I decided to upgrade Ubuntu WSL from 22.04 LTS "Jammy Jellyfish" to 24.04 LTS "Noble Numbat" to use gcc-mingw-w64 and g++-mingw-w64 packages from Ubuntu distribution but had a problem with FORTE that compilation result did not run without any error message. In order for FORTE compilation results run successfully we have to change gcc and g++ thread model from default win32 to posix, do the following:

$ sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
$ sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix


UPDATE:
Upgrade to Ubuntu 24.04 make me feel stupid because the compilation result for Raspberry doesn't work anymore with an error message "/lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found" even though I compiled using gcc version 11. Incompatible libc version!

I suggest sticking with Ubuntu version 22.04 or switch to GNU toolchain from Arm but then requires an adjustments in compilation: change compiler from aarch64-linux-gnu-* to aarch64-none-linux-gnu-*

$ cd
$ wget -c https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
$ tar xvf arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
$ export PATH=$HOME/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin:$PATH


UPDATE:
Attached 2 patch to fix modbus build and com raw layer to fix MQTT data publishing/subscribing.

[Updated on: Thu, 01 February 2024 10:49]

Report message to a moderator

Re: Build 4diac FORTE for Multiple Target on WSL [message #1863282 is a reply to message #1863266] Tue, 23 January 2024 00:54 Go to previous messageGo to next message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
@Alois Zoitl Please check attached patch above. Sorry, I haven't used gerrit for a long time.
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863292 is a reply to message #1863282] Wed, 24 January 2024 11:08 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

I somehow missed your patches. Sorry for that. According to the Eclipse development process I can only accept them if you sign the Eclipse Contributor agreement and provide them (currently) as Gerrit pushes. There is a very nice documentation by Jose what you need to do: https://eclipse.dev/4diac/en_help.php?helppage=html/development/contribute.html

However we are in the phase of moving all Eclipse 4diac repositories to github. Maybe a github pull request is more suitable for you. I hope to have that done for 4diac FORTE in the next 2-3 weeks.

Finally your documentation looks great. Would you be interested to write a guest news/blog post for the Eclipse 4diac Web-page? You can easily do this by submitting a github pull request to our web-page content git repo: https://github.com/eclipse-4diac/4diac-website
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863336 is a reply to message #1863292] Sat, 27 January 2024 15:05 Go to previous messageGo to next message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
Alois Zoitl wrote on Wed, 24 January 2024 11:08
I somehow missed your patches. Sorry for that. According to the Eclipse development process I can only accept them if you sign the Eclipse Contributor agreement and provide them (currently) as Gerrit pushes. There is a very nice documentation by Jose what you need to do: https://eclipse.dev/4diac/en_help.php?helppage=html/development/contribute.html

However we are in the phase of moving all Eclipse 4diac repositories to github. Maybe a github pull request is more suitable for you. I hope to have that done for 4diac FORTE in the next 2-3 weeks.

Finally your documentation looks great. Would you be interested to write a guest news/blog post for the Eclipse 4diac Web-page? You can easily do this by submitting a github pull request to our web-page content git repo: https://github.com/eclipse-4diac/4diac-website

Sorry for the late response. A great news! Nothing wrong with gerrit but somehow too complicated. I want to write a content for 4diac FORTE project but my English is not that good :D

I found a bug in OPC UA client. There is no attempt to reconnect to the server if the connection is lost. Attached a patch to fix it but I'm not sure if it's a proper fix but always works for my situation.

I build a server application based on Open62541's CTT https://github.com/open62541/open62541-ctt, modified to load our own nodesets created using Siemens's SiOME - OPC UA Modeling Editor. I can connect to the server using my self signed certificate via Unified Automation UaExpert application but FORTE can only access the server using a username and password with securityPolicy=http://opcfoundation.org/UA/SecurityPolicy#None. Please confirm about FORTE's OPC UA with OpenSSL security support.
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863371 is a reply to message #1863336] Tue, 30 January 2024 03:27 Go to previous messageGo to next message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
Looks like open62541 v1.3.9 isn't working correctly using openssl 3.x yet. Switch to mbedtls and immediately able to connect to the server using:
1. securityPolicy=http://opcfoundation.org/UA/SecurityPolicy#None and securityMode=1
2. securityPolicy=http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15 and securityMode=2 or 3
3. securityPolicy=http://opcfoundation.org/UA/SecurityPolicy#Basic256 and securityMode=2 or 3
4. securityPolicy=http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256 and securityMode=2 or 3

I did use open62541 provided script to create the certificates. The certificate URI is "urn:unconfigured:application" which is the client default URI:
/usr/share/open62541/tools/certs/create_self-signed.py -u "urn:unconfigured:application" -c client
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863392 is a reply to message #1863371] Wed, 31 January 2024 06:36 Go to previous messageGo to next message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
I have several in-service Siemens IOT2050 with Ubuntu Focal image, it's hard to upgrade without inferencing our system. FORTE develop branch need gcc version >= 11.3 but not found any toolchain that compatible to our IOT2050 GLIBC 2.31. Today, finally I manage to compile FORTE including libmodbus, mbedtls, paho mqtt, libopen62541, and libluajit using musl's libc from https://toolchains.bootlin.com/. Although experiencing a strange cmake problems to create a working fully static binary, finally FORTE develop branch bynk on one of our IOT2050 :D
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863397 is a reply to message #1863392] Wed, 31 January 2024 09:35 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

would you mind posting different discussion topics in different forum topics. This helps me and others to better keep track and later search for it.

We are on our journey to migrate the 4diac FORTE repo to github. Would you be able to provide PR requests there?

Anything that makes 4diac FORTE's open62541 and OPC UA usage more secure would be great. However I'm not an expert on that topic.

Re: Build 4diac FORTE for Multiple Target on WSL [message #1863398 is a reply to message #1863397] Wed, 31 January 2024 10:34 Go to previous messageGo to next message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
Alois Zoitl wrote on Wed, 31 January 2024 09:35
Hi,

would you mind posting different discussion topics in different forum topics. This helps me and others to better keep track and later search for it.

We are on our journey to migrate the 4diac FORTE repo to github. Would you be able to provide PR requests there?

Anything that makes 4diac FORTE's open62541 and OPC UA usage more secure would be great. However I'm not an expert on that topic.


Sorry, I was just too excited :D

In my use case, a secure OPC UA is a must in our mixed Wide Area Network. I hope I can contribute to 4diac project via Github, I was waiting for it.
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863405 is a reply to message #1863398] Wed, 31 January 2024 18:00 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

I totally get that. I'm also very happy that Eclipse 4diac serves your needs.
Re: Build 4diac FORTE for Multiple Target on WSL [message #1863419 is a reply to message #1863405] Thu, 01 February 2024 10:46 Go to previous message
Ketut Kumajaya is currently offline Ketut KumajayaFriend
Messages: 24
Registered: January 2024
Junior Member
@Alois Zoitl Sir, attached a patch to support a toolchain with musl libc https://www.musl-libc.org/ from https://toolchains.bootlin.com/ I found musl libc use smaller memory footprint on Raspberry Pi 4B. I think musl is a good choice for embedded Linux target. I also attach a build scrip as a reference for our user to build FORTE for Linux x86_64, Windows x86_w64 (mingw_w64), Raspberry Pi aarch64, and aarch64 with musl libc that actually for Siemens IOT2050 target.
Previous Topic:Change the value of a handle.
Next Topic:External event queue is full when testing.
Goto Forum:
  


Current Time: Sat Apr 27 21:34:09 GMT 2024

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

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

Back to the top