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 » 4DIAC Forte Run In STM32
4DIAC Forte Run In STM32 [message #1848003] Wed, 17 November 2021 09:36 Go to next message
chen peng is currently offline chen pengFriend
Messages: 25
Registered: November 2021
Junior Member
Recently I build 4DIAC Forte as a static library, then now run it in my STM32

Unluckily, system seems abnormal when it run forteStartInstanceGeneric function. Please check attached log.
Also attached my main.c

Follow the tutorial instructions, I declare configCHECK_FOR_STACK_OVERFLOW and configUSE_MALLOC_FAILED_HOOK, but system doesn't reach vApplicationMallocFailedHook and vApplicationStackOverflowHook function

Is any friend know how to debug on this issue? Or how can I get into the function of the static library when debugging the main function, this may help me narrow the scope of the problem

Thanks
  • Attachment: main.c
    (Size: 9.23KB, Downloaded 102 times)
  • Attachment: forteRunLog.txt
    (Size: 14.16KB, Downloaded 93 times)
  • Attachment: detail.png
    (Size: 151.56KB, Downloaded 80 times)
Re: 4DIAC Forte Run In STM32 [message #1848004 is a reply to message #1848003] Wed, 17 November 2021 10:07 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
did you start your LwIp stack? You should first have some example running with LwIP using the ethernet port without any problem, and then try using the forte library.
Re: 4DIAC Forte Run In STM32 [message #1848301 is a reply to message #1848004] Sat, 27 November 2021 08:12 Go to previous messageGo to next message
chen peng is currently offline chen pengFriend
Messages: 25
Registered: November 2021
Junior Member
Now,I start LwIp, I use breakPoint, and see it runs into vApplicationMallocFailedHook, seems Malloc memory is not enough,and I set FreeRtos stack size to 1024 bit and heap size to 150kb, and memory issue doesn't appears.
The network is OK, I can ping my pc to STM32, and I can see the code enter forteJoinInstance function
But when I connect 4diac IDE and forte engine, and deploy my blinkTest, it shows unable to create RES, and the network goes down

Does anyone encounter this kind of problem, or do you have any suggestions for troubleshooting?

Thanks

[Updated on: Mon, 29 November 2021 03:48]

Report message to a moderator

Re: 4DIAC Forte Run In STM32 [message #1848342 is a reply to message #1848301] Mon, 29 November 2021 08:45 Go to previous messageGo to next message
chen peng is currently offline chen pengFriend
Messages: 25
Registered: November 2021
Junior Member
Finally, I setup eclipse on my stm32, Now it is ok

Thanks all, This is a difficult road, but the harvest is great
Re: 4DIAC Forte Run In STM32 [message #1848364 is a reply to message #1848342] Mon, 29 November 2021 17:12 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Great that you could get it run. Do you have any feedback for us what the original issue was? Anything that we should improve in 4diac FORTE?
Re: 4DIAC Forte Run In STM32 [message #1848370 is a reply to message #1848364] Tue, 30 November 2021 02:41 Go to previous message
chen peng is currently offline chen pengFriend
Messages: 25
Registered: November 2021
Junior Member
The last issue is caused because I used different configurations when generating the static library and STM32 code. The static library was generated two weeks ago and the code was generated this week. Later, I pulled the code again and compiled it completely, and the problem disappeared
The engine works great and performance is stable,I tried 5000 nodes and 1ms cycles,It exceeded our expectations
The main difficulty I encountered was in the process of compiling eclipse into STM32:
1. Now the mainstream STM32 source code is developed using keil uvision5, however I haven't found any way to compile forte by using keil, I'm using cubemx to generate makefile and raw code, transplant the basic programs such as the network port in the keil demo program to the new code, also note the differences between compilers, It took me about two weeks.
2. If heap and stack issue happen, We need to expand the memory allocated to FreeRTOS, we can expand heap memory in FreeRtosConfig.h by configTOTAL_HEAP_SIZE, when creating forte tasks, the stack memory should also be expanded

The whole compilation process must thank the enthusiastic help of the people in this forum, Next, we plan to expand our own business on forte. Is there a tutorial on the Forte source code, such as code flow chart, to introduce how to run the code completely?If yes please share, this will help us to understand the code logic as soon as possible and reduce future modification bugs
Previous Topic:Error creating event connection in CFB
Next Topic:Sending commands to Forte over TCP; Header in Payload
Goto Forum:
  


Current Time: Fri Apr 19 09:46:19 GMT 2024

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

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

Back to the top