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 » Integrating into FreeRTOS(How to integrate Forte into FreeRTOS?)
Integrating into FreeRTOS [message #1815404] Wed, 02 October 2019 11:01 Go to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Hello!

Could you please explain to me how I can run Forte into FreeRTOS on my board?

Board: NUCLEO-H743ZI

PC operation system: Windows 10

And another one question: how to add any board to a project System Configuration? On default there are only BeagleBoneBlack, FBRT_WINDOW, FORTE_PC, PFC200 and RaspberryPI.

With respect, Mike.
Re: Integrating into FreeRTOS [message #1815437 is a reply to message #1815404] Wed, 02 October 2019 18:18 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

have you looked on the other freeRTOS threads in the 4diac forum. Jose gave some nice explanations there.

For your second questions. Currently the device types are just place holders and have except documentation no real impact. So for testing you just can use the FORTE_PC. If you would like tho have your device listed there. Just take the FORTE_PC.dev file save it under a new name and change in the file the value of the name attribute of the Device tag.

I hope this helps,
Alois
Re: Integrating into FreeRTOS [message #1815457 is a reply to message #1815437] Thu, 03 October 2019 05:22 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Hi,

Yes, I have. But it didn't help me, because I had troubles on stage compilation.

I'll write my actions:
1) create project in STM32CubeMX, including FreeRTOS and LwIP;
2) open CMAKE GUI; choose Unix Makefiles (1.png), FORTE_ARCHITECTURE - FreeRTOSLwIP, FORTE_BUILD_STATIC_LIBRARY - true, FORTE_BUILD_EXECUTABLE - false; write all folders in FORTE_FreeRTOSLwIP_INCLUDES, which contains project headers; click "Generate";
3) open Command Prompt; start "make" in folder, where place generated forte project;
4) in compile process some error arises (2.png) and I don't know what to do on this stage.
I didn't find answer on this problem. Hope on your help.

Thanks for answer on second question.

With respect, Mike.
  • Attachment: 1.png
    (Size: 7.35KB, Downloaded 93 times)
  • Attachment: 2.png
    (Size: 62.90KB, Downloaded 89 times)

[Updated on: Thu, 03 October 2019 11:24]

Report message to a moderator

Re: Integrating into FreeRTOS [message #1815495 is a reply to message #1815457] Thu, 03 October 2019 14:32 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

when setting up the cmake build you need to provide the toolchain for your target system. I had the best experiences with using the last option shown in your 1.png. See the raspberry pi cross compiling documentation as an example how to specifiy a cross compilation toolchain for our CMake based 4diac FORTE build.
Re: Integrating into FreeRTOS [message #1815542 is a reply to message #1815495] Fri, 04 October 2019 12:11 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
I tried, but it didn't help. This leads to simple errors related to the syntax of the project. For example, fig1.png. If you solve one, another one occurs. And so on. Have you an idea why this is happening?

Can you recommend board STM32 and source project FreeRTOS for cross-compilation with which there will be less problems? ?

And question on other item: for reading from GPIO E_CYCLE is used (https://www.eclipse.org/4diac/en_help.php?helppage=html/parameters/parameters.html). Is there a way to set the cycle time to less than 1 ms?
  • Attachment: fig1.png
    (Size: 54.36KB, Downloaded 98 times)
Re: Integrating into FreeRTOS [message #1815555 is a reply to message #1815542] Fri, 04 October 2019 18:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hmh it looks like some of the include paths are still not correctly set. Hard to comment on that remotely. If you have time you could join us on the 4days of 4diac [1] and we can look toghether on it.

I have an STM32 board also on my desk but sofar not found the time to work on it. I hope to do this soon and document my experience.

This is more our legacy IO interface. For new boards I would already look at the new approach. Here you have much more flexiblity on configuring IO scan cycles and mapping IOs to IO FBs. Unfortunately we don't have any good documentation for this yet.

[1] https://www.eclipse.org/4diac/en_eve.php?event=2019_4days
Re: Integrating into FreeRTOS [message #1815625 is a reply to message #1815555] Mon, 07 October 2019 12:33 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

joining the discussion. A proper documentation for freeRTOS + LwIP is on its way.

For your last problem, as Alois said, it's a problem of your include folders. Note that for the case of "lwip/opt.h" you need to add the folder where the "lwip" folder is located, and not the folder where "opt.h". You can just keep adding the folders, no need to replace it actually.
Re: Integrating into FreeRTOS [message #1815695 is a reply to message #1815555] Tue, 08 October 2019 14:10 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Yes, now I work with includes path, problem consists in them.

Could you describe how the event will go? Will it be like a presentation or conference? And what will be the official language?

It would be nice, if there was feature to set cycle time in microseconds.

Hope documentation will be soon.
Re: Integrating into FreeRTOS [message #1815696 is a reply to message #1815625] Tue, 08 October 2019 14:21 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Hi,

how much time to wait for it to be published?

Firstly, I added all folders with headers to the variable FORTE_FreeRTOSLwIP_INCLUDES (as you wrote, pic1.png). But it didn't work, appeared compilation error.
Then I tried to add folders step-by-step solving compilation errors, but this led to error I couldn't fix (pic2.png).

I don't know, how you got success in this, but in my case it is accompanied by many difficulties in project compilation.
  • Attachment: pic1.png
    (Size: 36.38KB, Downloaded 79 times)
  • Attachment: pic2.png
    (Size: 105.70KB, Downloaded 81 times)

[Updated on: Tue, 08 October 2019 14:24]

Report message to a moderator

Re: Integrating into FreeRTOS [message #1815739 is a reply to message #1815695] Wed, 09 October 2019 14:49 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Mike Wazowski wrote on Tue, 08 October 2019 14:10

Could you describe how the event will go? Will it be like a presentation or conference? And what will be the official language?


Our goal is to work together on improving 4diac. So its about bringing up problems, new ideas and discuss potential solutions and if time permits start implementing it. The official language will definitely be english.

Mike Wazowski wrote on Tue, 08 October 2019 14:10
Hope documentation will be soon.

I just merged the documentation into our repo and to the web-page. It should be avialable within the next minutes.
https://git.eclipse.org/r/#/c/150761/

Re: Integrating into FreeRTOS [message #1815767 is a reply to message #1815739] Thu, 10 October 2019 08:52 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

regarding the compilation errors, you have some missing flags in your lwipopts.h file.

You need the following:

#define LWIP_COMPAT_SOCKETS 1
#define LWIP_IGMP 1 //to use IP_ADD_MEMBERSHIP
#define LWIP_TIMEVAL_PRIVATE 0 //This is optional. Set this flag if you get a compilation error about redefinition of struct timeval
Re: Integrating into FreeRTOS [message #1815770 is a reply to message #1815739] Thu, 10 October 2019 10:15 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Good. It means, this event is more than just a official meeting. What is the last day of registration? And there is possible to write interested question and get feedback after event at your official site (like summary of meeting with main moments of its)? Or need to be on this event?

Yes, I had seen this. Thanks.
I downloaded FORTE new version and I could compile FORTE to static library (libforte-static.a).
Re: Integrating into FreeRTOS [message #1815771 is a reply to message #1815767] Thu, 10 October 2019 10:24 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Hi,

it was the last problem of cross-compilation. I saw this recommendation, when generated the project in CMAKE. After that, I could compile FORTE in library.

Now, there is one more problem. I followed your instructions [1] and at the compilation stage in TrueStudio (the IDE I use) shows the next 4 errors (1.png, 2.png).

[1]: https://www.eclipse.org/4diac/en_help.php?helppage=html/installation/freeRTOSLwIP.html
  • Attachment: 1.png
    (Size: 46.43KB, Downloaded 71 times)
  • Attachment: 2.png
    (Size: 9.90KB, Downloaded 67 times)

[Updated on: Thu, 10 October 2019 10:38]

Report message to a moderator

Re: Integrating into FreeRTOS [message #1815776 is a reply to message #1815771] Thu, 10 October 2019 11:30 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
it means that you didn't add the forte library to your compilation.

Right click on your project -> C/C++ General -> Path and Symbols -> Libraries -> Add...

Select your forte library and compile again
Re: Integrating into FreeRTOS [message #1815786 is a reply to message #1815770] Thu, 10 October 2019 15:22 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Mike Wazowski wrote on Thu, 10 October 2019 10:15
Good. It means, this event is more than just a official meeting. What is the last day of registration? And there is possible to write interested question and get feedback after event at your official site (like summary of meeting with main moments of its)? Or need to be on this event?


I think in modern speak it is something like a hackathon. We are rather flexible if you can say something beginning of November it would be fine.

In the registration form we have a section on stuff that you would be interested. this helps us to collect groups of topics and plan the sessions.

I definitely want to make the results available. I think the event side will then host them.
Re: Integrating into FreeRTOS [message #1815799 is a reply to message #1815776] Fri, 11 October 2019 06:05 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
I added library as you wrote (1.png). But this caused next error (2.png).

Then I tried add file 'libforte-static.a' to the nearby directory "lib" next to folder with "ld.exe". I added library just writing 'forte-static' into field like on 1.png. After that errors began to appear (for example, 3.png and 4.png).
  • Attachment: 1.png
    (Size: 27.79KB, Downloaded 88 times)
  • Attachment: 2.png
    (Size: 63.07KB, Downloaded 71 times)
  • Attachment: 3.png
    (Size: 267.03KB, Downloaded 69 times)
  • Attachment: 4.png
    (Size: 242.86KB, Downloaded 86 times)
Re: Integrating into FreeRTOS [message #1815886 is a reply to message #1815776] Mon, 14 October 2019 12:13 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Jose, can you recommend something?
Re: Integrating into FreeRTOS [message #1816123 is a reply to message #1815886] Mon, 21 October 2019 14:38 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi, sorry Eclipse didn't notify me about the new messages.

From pictures 3 and 4, it looks that some C++ things are missing. I'm not sure how to solve this. I'd try first to create a C++ project in TrueStudio instead of just a C one. This set all needed configurations for C++ that you need. Try adding your code (and the forte library) there.
Re: Integrating into FreeRTOS [message #1816490 is a reply to message #1816123] Wed, 30 October 2019 06:15 Go to previous messageGo to next message
cyt tpl is currently offline cyt tplFriend
Messages: 31
Registered: April 2019
Member
Hi Mike,

You should add static library in this way(see screenshot)

Properties -> C/C++ Build -> Settings -> C++ Linker -> Libraries
Re: Integrating into FreeRTOS [message #1816549 is a reply to message #1816490] Thu, 31 October 2019 08:09 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Hi,

I added the library as you recommended. But errors still occur (Fig. 1.jpg, 2.jpg).
  • Attachment: 1.jpg
    (Size: 797.86KB, Downloaded 83 times)
  • Attachment: 2.jpg
    (Size: 145.14KB, Downloaded 71 times)
Re: Integrating into FreeRTOS [message #1816570 is a reply to message #1816549] Thu, 31 October 2019 14:28 Go to previous messageGo to next message
cyt tpl is currently offline cyt tplFriend
Messages: 31
Registered: April 2019
Member
Hi,

1.jpg -> You compiled forte as a static library but this is not enough for use in your project. You must be add your forte incubation folder and subfolders into your project as like as (pathforte.jpg attachment)

2.jpg -> You must be #define configUSE_TIMERS 1 in your FreeRTOSConfig.h

  • Attachment: pathforte.jpg
    (Size: 239.92KB, Downloaded 74 times)
Re: Integrating into FreeRTOS [message #1816593 is a reply to message #1816570] Fri, 01 November 2019 05:21 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Hi,

I added the forte incubation folder and subfolders, but TrueStudio gives also the error messages like this "../arm-atollic-eabi/bin/ld.exe: failed to merge target specific data of file C:\...\Desktop\freeRTOS\src\libforte-static.a(F_WORD_TO_DINT.cpp.obj)".

Have any ideas what to do?

Could you launch FORTE on any STM32 board?

[Updated on: Fri, 01 November 2019 05:29]

Report message to a moderator

Re: Integrating into FreeRTOS [message #1816598 is a reply to message #1816593] Fri, 01 November 2019 07:04 Go to previous messageGo to next message
cyt tpl is currently offline cyt tplFriend
Messages: 31
Registered: April 2019
Member
Hi,

You must be add forte flags in your eclipse project.
Properties -> C/C++ Build -> Settings -> C++ Linker ->Miscellaneus

-ffunction-sections -fdata-sections -fstack-usage -Wall -DLWIP_TIMEVAL_PRIVATE=0 -fno-threadsafe-statics -fno-rtti -fno-exceptions -fomit-frame-pointer -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize -DNOLOG -DFORTE_LITTLE_ENDIAN -DDEV_MGR -DFORTE_SUPPORT_ARRAYS -DFORTE_SUPPORT_BOOT_FILE -DFORTE_SUPPORT_CUSTOM_SERIALIZABLE_DATATYPES -DFORTE_SUPPORT_QUERY_CMD -DFORTE_MODIFY_SOURCES_ON_MISSING_GENERATED_INCLUDES -DFORTE_LINKED_STRINGDICT -DFORTE_COM_RAW -DFORTE_SUPPORT_MONITORING -DFORTE_COM_LOCAL -DFORTE_COM_FBDK -DFORTE_UNICODE_SUPPORT -DFORTE_USE_64BIT_DATATYPES -DFORTE_USE_REAL_DATATYPE -DFORTE_USE_LREAL_DATATYPE -DFORTE_USE_TEST_CONFIG_IN_FORTE -DFORTE_USE_WSTRING_DATATYPE -D__USE_W32_SOCKETS

I did launch forte on STM32F746 Discovery but not clearly. I didn't communicate between 4diac IDE(on pc) and STM32 board. I think ethernet socket isnt work properly. But Jose Maria Jesus Cabral Lassalle launced clearly on stm32f2 eval board. He said that.
I sent my project to Jose Maria for examine. After my problem is solved I will share a document for 4diac forte stm32 freertos project how is prepare. (with screenshots)
Re: Integrating into FreeRTOS [message #1816601 is a reply to message #1816598] Fri, 01 November 2019 08:15 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Linker flags did not help. The same error messages appear.

I will be waiting for your project and instructions, because I have not done compilation yet.
Re: Integrating into FreeRTOS [message #1816654 is a reply to message #1816601] Mon, 04 November 2019 08:50 Go to previous message
cyt tpl is currently offline cyt tplFriend
Messages: 31
Registered: April 2019
Member
Hi,

I prepared a document which includes my works until now.
NOTE: My project can successfully compile, but not work clearly.

https://drive.google.com/open?id=1X3if3ky8yjo1uzXI9TLxpt0C9cmJvnTa

Previous Topic:Cross compiled binary doesn't work
Next Topic:About FreeRTOS
Goto Forum:
  


Current Time: Fri Mar 29 10:14:58 GMT 2024

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

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

Back to the top