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 » Cross compiling WAGO BSP along with OPC UA forte(Cross compiling WAGO BSP along with OPC UA forte)
Cross compiling WAGO BSP along with OPC UA forte [message #1797559] Thu, 01 November 2018 17:36 Go to next message
Muhammad Obaid Khan is currently offline Muhammad Obaid KhanFriend
Messages: 32
Registered: September 2017
Member
Hello 4Diac Team,
Following the tutorial I have already build an environment and firmware in my Ubuntu machine and cross compiled wago BSP along with forte. But I wanted to cross compile wago BSP along with OPC UA forte. For that purpose I build forte with open62541 source code first in Ubuntu virtual machine as I know we don´t have OPC UA enabled by default in forte.
There was a line in tutorial that if we want to "(de)activate specific modules (library parts) of FORTE edit .../ptxproj-2.2.20/wago.make line FORTE_WAGO_CONF_OPT := ..." I have included OPC UA communication protocol modules accordingly. Please find the screen shot as an attachment beneath.
After cleaning up the previous project with command:
> cd wago/ptxproj-2.8.26
> ptxdist clean forte_wago
and Rebuilding execution with command line:
> ptxdist targetinstall forte_wago
I am facing error. I also tried to overcome the problem by setting (FORTE_COM_OPC_UA_INCLUDE_DIR and FORTE_COM_OPC_UA_LIB_DIR) in CMakeLists.txt file but result is still same. Please find the screen shots of CMakeLists.txt file and error occurred after compilation. I don´t understand where I am wrong. I also could not find any tutorial related for cross compiling wago BSP with OPC UA forte.
Any help will be very appreciated
Thanks in advance

Sincerely,
Obaid
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797561 is a reply to message #1797559] Thu, 01 November 2018 17:56 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

The libopen61541.so also needs to be compiled with the wago compiler. Have you done that?
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797715 is a reply to message #1797561] Mon, 05 November 2018 14:53 Go to previous messageGo to next message
Muhammad Obaid Khan is currently offline Muhammad Obaid KhanFriend
Messages: 32
Registered: September 2017
Member
Hello Mr. Alois
Thanks for your response.
According to my knowledge I think I am compiling "libopen62541.so" with wago compiler and error is occurring after "> ptxdist targetinstall forte_wago " command. Please correct me if I am wrong due to my lack of information and experience. If this is wrong what I am doing then please do tell me how to compile Libopen62541.so with wago compiler?

Sincerely,
Obaid

Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797752 is a reply to message #1797715] Tue, 06 November 2018 07:37 Go to previous messageGo to next message
Milan Vathoopan is currently offline Milan VathoopanFriend
Messages: 45
Registered: August 2016
Member
Hello Obaid,

As Alois mentioned before " You have to cross compile open62541 alone with wago compiler" . The procedure is same as you do with forte. You can use the cmake compiler settings for your target platform with open62541 from ptxdist and build as a library. The library you built beforehand has to be specified when you compile forte, because forte does not "cross compile" open62541 for you

And also please note, depending on your ubuntu version, you will have to disable some compiler warnings to compile open62541 on wago.

Hope this helps.
Milan
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797848 is a reply to message #1797752] Wed, 07 November 2018 12:43 Go to previous messageGo to next message
Muhammad Obaid Khan is currently offline Muhammad Obaid KhanFriend
Messages: 32
Registered: September 2017
Member
Hello Milan,

Thanks for your help once again.
Can you please elaborate what do you mean by "You can use the cmake compiler settings for your target platform with open62541 from ptxdist and build as a library"?
Unfortunately I could not understand your point completely.

Sincerely,
Obaid
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797858 is a reply to message #1797848] Wed, 07 November 2018 14:23 Go to previous messageGo to next message
Milan Vathoopan is currently offline Milan VathoopanFriend
Messages: 45
Registered: August 2016
Member
Hi,

you can follow one of these methods

1) As you have seen in case of forte, create rule files for open62541 say open62541.in and open62541.make based on the build settings you need. Then follow the same procedure as you did for forte, Copy them into the rules directory of ptxdist, build selection, build.

2) Use Cmake GUI and follow the help file from open62541 for cross compiling. Here define Wago OSELAS tool chain gcc and g++ as C and C++ cross compiler options. Even though I have not tried this, this should also work.

Milan
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797917 is a reply to message #1797858] Thu, 08 November 2018 14:20 Go to previous messageGo to next message
Muhammad Obaid Khan is currently offline Muhammad Obaid KhanFriend
Messages: 32
Registered: September 2017
Member
Hello Milan,

Thanks for your advice and support.
I have tried method (1) after you suggestion. Please have a look at the screen shots as an attachment.
I build open62541 menu file and rule file from pengutronix to support OPC UA protocol in Ptxdist and then copied them in "Wago/ptxproj-2.8.26/rules" folder in my ubuntu. After that I entered "Ptxdist menuconfig" command to open the configuration and saved the changes. Now I can see "Open62541" protocol in "Networking" section of ptxdist.
Then I cleaned the project and rebuilt it. I have now FORTE in my directory under "Wago/ptxproj-2.8.26/platform-wago-pfcxxx/built-target/forte_wago-1.6.2-build/src".

All the screen shots are attached please have a look and tell me either it is right or wrong?
Also please guide me that do I have to do any changes in any other directories to include OPC UA or everything is fine and ready to use?

Sincerely,
Obaid
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797918 is a reply to message #1797917] Thu, 08 November 2018 14:22 Go to previous messageGo to next message
Muhammad Obaid Khan is currently offline Muhammad Obaid KhanFriend
Messages: 32
Registered: September 2017
Member
Remaining Attachments
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797919 is a reply to message #1797917] Thu, 08 November 2018 14:49 Go to previous messageGo to next message
Milan Vathoopan is currently offline Milan VathoopanFriend
Messages: 45
Registered: August 2016
Member
Hello Obaid,

May be you have misunderstood my comments a bit. Looking at your forte_wago.make file, the forte what you have built is without OPC UA. Because you have not defined OPC UA modules inside CONF_OPT for forte_wago

And inside the open62541.make you are supposed to give only open62541 cross compiling options. Exactly saying this should be only till -DCMAKE_BUILT_TYPE = Debug. Remove the rest, which are forte related CONF_OPT. After that you have to build open62541, using the same CMAKE type build command you followed for forte -> ptxdist targetinstall <Your Project name>. On successful build this will create a libopen62541 in your target directory say #OPEN62541_DIR

Then use the old CONF_OPT ( Which include forte OPC UA settings) for forte_wago.make . Remember to point OPC_UA_LIB_DIR to the target build directory #OPEN62541_DIR, where you built open62541 before.
Then build forte normally with command ptxdist targetinstall forte_wago.

Hope this helps

Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797944 is a reply to message #1797919] Fri, 09 November 2018 01:53 Go to previous messageGo to next message
Muhammad Obaid Khan is currently offline Muhammad Obaid KhanFriend
Messages: 32
Registered: September 2017
Member
Hi Milan,

Thanks once again for great support.

I am facing error when building open62541 after build command ->ptxdist targetinstall open62541. May be this is the same error of cmake compiler which you mentioned in your first comment: "And also please note, depending on your ubuntu version, you will have to disable some compiler warnings to compile open62541 on wago" ?
I have already newest version of CMake installed. But how to enable/run it for this project from ptxdist I don´t know.

Error:
Re-run cmake no build system arguments
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.0 or higher is required. You are running version 2.8.8

Please have a look on screenshot as an attachment.

Sincerely,
Obaid
Re: Cross compiling WAGO BSP along with OPC UA forte [message #1797975 is a reply to message #1797944] Fri, 09 November 2018 12:21 Go to previous message
Milan Vathoopan is currently offline Milan VathoopanFriend
Messages: 45
Registered: August 2016
Member
Hi, This error seems that the cmake version on your ptxdist is 2.8.8 and for open62541 you need a higher version of cmake. For solving it you might need to update the Host Tool cmake, for which you need to once again look on rule files for host cmake. Please refer to penguitronix help pages https://ptxdist.org for this. Alternatively you can try the method I mentioned in the previous message Quote:
Use Cmake GUI (Version required by open62541)and follow the help file from open62541 for cross compiling. Here define Wago OSELAS tool chain gcc and g++ as C and C++ cross compiler options
Previous Topic:OPC UA Server to PLC Simulator connectivity
Next Topic:Error compiling FORTE for Win 64
Goto Forum:
  


Current Time: Fri Mar 29 01:26:58 GMT 2024

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

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

Back to the top