Skip to main content
Visitor II
December 6, 2021
Question

Not able to create semaphore in lwIP stack

  • December 6, 2021
  • 0 replies
  • 784 views

Hi ,

I am working on STM32L072 controller with RTOS which communicates with LAN9250 ethernet IC over SPI . i have integrated the lwIP stack in ,my project externally (v2.1.3). I am using netconn api's for data tx and rx. While creating net connection using "netconn_new_with_proto_and_callback()" i see "if (sys_sem_new(&conn->op_completed, 0) != ERR_OK)" failing due to which i am unable to create new net connection and my further communication is not established.

when i used "if (sys_sem_new(&conn->op_completed, 0) != ERR_OK)()" in one of my thread ,it is able to create the semaphore successfully. i am not sure why it is failing to create semaphore in lwIP stack.Please guide me on this.

Another this is when i enable the "LWIP_NETCONN_SEM_PER_THREAD" macro in opt.h i get following error.

"undefined reference to `LWIP_NETCONN_THREAD_SEM_GET"

Can someone tell where is the definition of this function available ?i searched in stack code but i was unable to find it.

0693W00000Hnet7QAB.png 

Thanks,

    This topic has been closed for replies.