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 » Does FORTE run on systems without OS
Does FORTE run on systems without OS [message #1746839] Sat, 05 November 2016 14:11 Go to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
I would like to use 4Diac in a project where I will be using a µC without operating system. Is it possible to install FORTE on systems without OS. If yes, how will it be done?
Re: Does FORTE run on systems without OS [message #1747035 is a reply to message #1746839] Tue, 08 November 2016 17:25 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
Hi

the short answer is in principle yes.

The long answer is that in that case you need to implement interrupt code managing timers communication and other hardware interrupt and feed it into the execution of FORTE. In the start-up code for your µC you would need to create your device and then manage the execution of the CThread classes. For that you can applied different schemes. The simplest which we tried in a bachelor thesis was to use a cooperative scheduling approach. For a device with maybe one or two resources this should be pretty efficient. Unfortunately the resulting code was not nice enough to make it available.

But I'm happy to support you and and according means also to the public repository. I'm also available for a talk in skype or google hangouts if you like.

BR,
Alois





Re: Does FORTE run on systems without OS [message #1747331 is a reply to message #1747035] Sat, 12 November 2016 11:45 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Dear Alois,

thank you for your fast reply. I think a cooperative scheduling should be not too difficult to implement. Is there a manual or other hints where I could find the "hooks" for the timer interrupts, execution of CThread classes etc.?
Thank you also for offering a videoconference on this topic; which could be very helpful for me. But before that I would like to learn a bit more about the internals in order to make a possible videoconference more effective.
My plan is to implement this kind of PLC on one core of an AURIX Tri-Core µC. Each core has 300MHz and I think it should have enough resources for this kind of PLC, right?
If I succeed in this job I could contribute my code to your project - thus maybe it could be helpful for others also.

Kind reagrds

Lothar
Re: Does FORTE run on systems without OS [message #1747358 is a reply to message #1747331] Sun, 13 November 2016 17:04 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
Dear Lothar,

unfortunately we curently have not much documentation available on this part of FORTE. I think I updated some parts when we reworked code for the last platforms we ported FORTE to. The best starting point would be the the rcX branch in our git repo. There we did several cleanups and improvemnts further reducing the porting effort. The code of interest for your endveors would be to look in one of the src/arch directories. I assume, rcx ThreadX or eCos would be better then Win32 or Posix.

In my "IEc 61499 Real-time Exeuction" book you can find in chapter 6 the description of the exeuction model and structure of FORTE. But I think if you have a first idea on the code structure the fasted would be a video session where I describe and show you the points for starting. Implemetnation and design decisions we can also discuss here in the forum.

I would be more then happy to have your contribution added to FORTE. Please note the Eclipse contribution guidlines [1].

Yes the CPU should have more then enough power to run FORTE. We did experiments with 32MHz arm7 and eCos as operating system and where able to perform real-time closed loop control.

Cheers,
Alois

[1] https://wiki.eclipse.org/Development_Resources/Contributing_via_Git
Re: Does FORTE run on systems without OS [message #1748165 is a reply to message #1747358] Sat, 19 November 2016 23:12 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
I saw that 4Diac will be on the SPS/Drives fair in Nuernberg. I will also be there. Maybe/hopefully I find the time to stop by for some questions.

Best regards

Lothar
Re: Does FORTE run on systems without OS [message #1748181 is a reply to message #1748165] Sun, 20 November 2016 19:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
would be great to have a talk.
Re: Does FORTE run on systems without OS [message #1790405 is a reply to message #1748181] Sat, 09 June 2018 15:09 Go to previous messageGo to next message
Frank Radermacher is currently offline Frank RadermacherFriend
Messages: 1
Registered: June 2018
Junior Member
Is there any news regarding OS-less operation of FORTE?

best regards, Frank Radermacher
Re: Does FORTE run on systems without OS [message #1790486 is a reply to message #1790405] Mon, 11 June 2018 15:47 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
Not really. We currently haven't had any device without operating system. Any specific device you have in mind? But as said above I would nearly always considering an OS noadays. Especially wehn it comes to more advanced networking features (e.g., OPC UA, MQTT).
Re: Does FORTE run on systems without OS [message #1790538 is a reply to message #1746839] Tue, 12 June 2018 14:03 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
I also would like to come back to my intention to implement FORTE on a µC - either without OS or at least with FreeRTOS only.
Looking at the FORTE sourcecodes I see that the CMake build system is used. I am not familiar with CMake. Is it necessary to use CMake or may I compile the sourcefiles using Make with a standard makefile? Will it be cumbersome to switch to Make? Or is it easier to use CMake?
For CMake I think I need to configure the compiler settings somewhere. Wher this has to be done?
Do you have some hints for me how to start?
Re: Does FORTE run on systems without OS [message #1790543 is a reply to message #1790538] Tue, 12 June 2018 15:19 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
We have now a freeRTOS implementation for FORTE as well. We haven't jet had the time on polishing up such it is suitable for open sourcing but we plan to do that. Unfortunately given our current workload I can not tell when we'll achieve that.

CMake is now mandatory. We use CMake to generate some code during the build process. This makes FORTE faster and smaller. But CMake in the end just generates a makefile. Which you then run through make.

For cross compiling with CMake I can recommend the CMake-Gui. There in the very early stages you just select which compiler and where the root directory for you platform specific libs and includes are and thats mostly it. The best for starting I would say is to first compile a FORTE for Windows or Linux just to get you into the process. Then I would say for cross compiling have a look at the raspi docs. FreeRTOS would be pretty similar.
Re: Does FORTE run on systems without OS [message #1790555 is a reply to message #1746839] Tue, 12 June 2018 20:56 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Thank you for your fast answer. So, I will try to setup a build system on a Virtual Machine running Ubuntu. With this the first steps should be similar to the RasPi cross compiling build. Good to know that the final make is invoked with make, because my SW for the target µC also uses the make system - so, this should (hopefully) be not too difficult to combine.
When it comes to the FreeRTOS integration I might need your help again.
CU
Re: Does FORTE run on systems without OS [message #1790622 is a reply to message #1790555] Wed, 13 June 2018 16:04 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
You are welcome. We made good experiences in either compiling FORTE to a lib and linking it then to the rest of the embedded systems code (e.g., RCX operating system for the Hilscher netX Chips) or the other way rund linking the target code to FORTE for generating the final binary image (e.g., with eCos or freeRTOS).
Re: Does FORTE run on systems without OS [message #1790641 is a reply to message #1790622] Wed, 13 June 2018 19:29 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Now I have the cmake process finished. Here I encountered the difficulty that the compiler I am using needed some strange linker flags. But this seems to be solved now. Then, I am now trying to compile FORTE as a library as you are suggesting as one option. Here I encounter an error:
[ 50%] Building CXX object src/CMakeFiles/forte.dir/arch/posix/forte_thread.cpp.obj
In file included from /home/lothar/esp/apps/hello/org.eclipse.4diac.forte/src/arch/posix/../threadbase.h:16:0,
                 from /home/lothar/esp/apps/hello/org.eclipse.4diac.forte/src/arch/posix/forte_thread.h:15,
                 from /home/lothar/esp/apps/hello/org.eclipse.4diac.forte/src/arch/posix/forte_thread.cpp:14:
/home/lothar/esp/apps/hello/org.eclipse.4diac.forte/src/arch/posix/forte_sem.h:15:23: fatal error: semaphore.h: No such file or directory
compilation terminated.

I think that this is related to the fact that I am currently compiling for a Posix system - but my target system is not a Posix system but a plain µC whith no OS or at least with FreeRTOS. The fact that I am currently compiling for a Psoix system probably results from the fact that I used the raspberry documentation from the 4Diac installation documentation.
Now the question is: how can I compile FORTE as a library for a µC running FreeRTOS. Probably I need to setup my own /src/arch/freeRTOS directory with the appropriate sourcecode inside. But: how to do that?
Do you have some helpful hints for me?

Kind regards
Re: Does FORTE run on systems without OS [message #1790671 is a reply to message #1790641] Thu, 14 June 2018 08:21 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 98
Registered: February 2016
Member
Hi,

Your cross-compiler is not finding the semaphore.h file wich should be available if your target system is a linux one. If you want to run forte on a new OS, like you said, you should have a src/arch/yourOS folder and implement some code there. But I'll spare you some coding issues, and tell you that a freeRTOS architecture is about to be released and will be available in the develop branch soon

Jose
Re: Does FORTE run on systems without OS [message #1790688 is a reply to message #1746839] Thu, 14 June 2018 14:20 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Do you have a rough estimate how long it will take until the FreeRTOS port is in the development branch? Depending on this durartion I would select a shorter or longer project to be inserted before continuing on this one. Currently I am not in a hurry on this.
Re: Does FORTE run on systems without OS [message #1790805 is a reply to message #1746839] Mon, 18 June 2018 08:47 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
@A. Zoitl: In you post on 13.Nov. 2016 in this thread you mentioned the book "IEc 61499 Real-time Exeuction". Is this still the right source of information to make FORTE running on a µC or is there now a more recent source of information available?
Kind regards
Re: Does FORTE run on systems without OS [message #1790806 is a reply to message #1790805] Mon, 18 June 2018 08:55 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 98
Registered: February 2016
Member
Hi Franz,

the main code is I'd say ready in a beta version. we're still figuring out some small issues before making it public. But I'd stimate in the best of cases by middle of July
Re: Does FORTE run on systems without OS [message #1790819 is a reply to message #1790805] Mon, 18 June 2018 14:03 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
The IEC 61499 real-time execution book describes in Chapter 6 in detail how the base architecture of FORTE was developed, why? I'm not sure if you need it to port FORTE but it definitely explains the key principles on what we expect from a platform so that we can get certain real-time properties.
Re: Does FORTE run on systems without OS [message #1790823 is a reply to message #1790806] Mon, 18 June 2018 15:26 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Jose Maria Jesus Cabral Lassalle wrote on Mon, 18 June 2018 08:55
Hi Franz,

the main code is I'd say ready in a beta version. we're still figuring out some small issues before making it public. But I'd stimate in the best of cases by middle of July

Thank you for this information. So I can plan some other activities before contunuing on this one.
Re: Does FORTE run on systems without OS [message #1790825 is a reply to message #1790819] Mon, 18 June 2018 15:28 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Alois Zoitl wrote on Mon, 18 June 2018 14:03
The IEC 61499 real-time execution book describes in Chapter 6 in detail how the base architecture of FORTE was developed, why? I'm not sure if you need it to port FORTE but it definitely explains the key principles on what we expect from a platform so that we can get certain real-time properties.

So, I think I will order the book just to get some more background information.
Re: Does FORTE run on systems without OS [message #1790948 is a reply to message #1790806] Wed, 20 June 2018 13:32 Go to previous messageGo to next message
Franz Beckenbauer is currently offline Franz BeckenbauerFriend
Messages: 11
Registered: November 2016
Junior Member
Jose Maria Jesus Cabral Lassalle wrote on Mon, 18 June 2018 08:55
Hi Franz,

the main code is I'd say ready in a beta version. we're still figuring out some small issues before making it public. But I'd stimate in the best of cases by middle of July


Dear Jose, will this new support of FORTE for FreeRTOS also include ethernet communication via lwip (just by chance) ?

Best regards
Re: Does FORTE run on systems without OS [message #1790976 is a reply to message #1790948] Wed, 20 June 2018 21:06 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
As Jose is traveling I try to answer. Yes lwip is also used. But we are using the BSD interface of lwip. Which may not be the best option.
Previous Topic:How to customize devices?
Next Topic:Export FB networks, FB interfaces and ECCs as PDF or SVG
Goto Forum:
  


Current Time: Tue Aug 14 19:36:05 GMT 2018

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

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

Back to the top