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 » freertos and socket
freertos and socket [message #1829836] Sun, 12 July 2020 13:21 Go to next message
joy woo is currently offline joy wooFriend
Messages: 149
Registered: May 2019
Senior Member
stuggling on stm32 is really difficult.
the document of freertos+lwip is just half of the work.
another half is about the PHY+MAC configuration
As i compared win32 and freertoslwip, that i find the socket setting is in bsdsocketinterf.cpp,
but i add breakpoint at openTCPServerConnection function, and when it's running,
it didn't stop at the breakpoint.
Is bsdsocketinterf.cpp used as the socket initial ?
are there any example for stm32 for forte?
Re: freertos and socket [message #1829848 is a reply to message #1829836] Mon, 13 July 2020 05:33 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 149
Registered: May 2019
Senior Member
it seems that under win32 :
DWORD WINAPI CWin32Thread::threadFunction(LPVOID arguments){
CThreadBase::runThread(static_cast<CWin32Thread *>(arguments));
return 0;
}
can run into threadbase.tpp

but under stm32,
void CFreeRTOSThread::threadFunction(void *paData){
CThreadBase::runThread(static_cast<CFreeRTOSThread *>(paData));
/* Tasks must not attempt to return from their implementing
function or otherwise exit.
https://www.freertos.org/implementing-a-FreeRTOS-task.html */
vTaskDelete(NULL);
}
can't run into threadbase.tpp
just hanging up at CThreadBase::runThread(static_cast<CFreeRTOSThread *>(paData));
Re: freertos and socket [message #1829849 is a reply to message #1829848] Mon, 13 July 2020 05:43 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 149
Registered: May 2019
Senior Member
Breakpoint 1, CFreeRTOSThread::createThread (this=0x20004eb8 <ucHeap+17588>, paStackSize=128) at D:\360Downloads\board\forte\src\arch\freeRTOS\forte_thread.cpp:40
40 if(pdPASS != xTaskCreate(threadFunction, "FORTE", paStackSize, this, scmForteTaskPriority, &handle)){
Exception condition detected on fd 588
Re: freertos and socket [message #1829852 is a reply to message #1829849] Mon, 13 July 2020 06:41 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1067
Registered: January 2014
Senior Member
can it be that you have again a memory issue?
Re: freertos and socket [message #1829858 is a reply to message #1829852] Mon, 13 July 2020 07:13 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
The documentation is to run forte on a stm32 board where the networking is already set. PHY+MAC configuration is a general configuration and not one specfic to forte.

Have you enabled:

#define configCHECK_FOR_STACK_OVERFLOW 1
#define configUSE_MALLOC_FAILED_HOOK 1

and the corresponding functions?
Re: freertos and socket [message #1829863 is a reply to message #1829858] Mon, 13 July 2020 07:49 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 149
Registered: May 2019
Senior Member
i have already enabled these follow the document, there are no errors about memory now,
the problem is
void CFreeRTOSThread::threadFunction(void *paData)
is hanging up
can't step into the bsdsocketinterf.cpp
  • Attachment: snap1.jpg
    (Size: 98.05KB, Downloaded 18 times)

[Updated on: Mon, 13 July 2020 08:29]

Report message to a moderator

Re: freertos and socket [message #1829899 is a reply to message #1829863] Mon, 13 July 2020 14:32 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 149
Registered: May 2019
Senior Member
as i removed one task(thread), it worked
Re: freertos and socket [message #1830123 is a reply to message #1829899] Fri, 17 July 2020 15:20 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 149
Registered: May 2019
Senior Member
i use W5500 as the ethernet hardware, the W5500 implements the socket, so does it mean we don't have to use the lwip?
Re: freertos and socket [message #1830174 is a reply to message #1830123] Sun, 19 July 2020 13:55 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1067
Registered: January 2014
Senior Member
From a quick look at the web-page of this chip I would say you need to use their special IO library. however i haven't looked into their lib and also don't know how to integrate it into 4diac FORTE.
Previous Topic:stm32 with forte lib problem
Next Topic:Date and Time Function Blocks
Goto Forum:
  


Current Time: Sat Nov 28 12:15:15 GMT 2020

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

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

Back to the top