Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


STM32F107VC LWIP DHCP / TCP Input Issue

Hello,

I am using a custom board with a STM32F107VC processor. I am trying to get LWIP working in combination with FREERTOS. I am building using STM32Cube and importing into STM32 System Workbench,

I can see DHCP packets being sent from my controller, arriving on the network (seen via wireshark). My DHCP server responds, but the micro controller does not seem to be able to process the message correctly.

I can see that the tcpip_input thread is being called because I can put a breakpoint into it. This then progress into sys_mbox_trypost() which seems to be failing with a -1 ERR_MEM which has a note above it “could not post, queue must be full”

Does anyone have any idea what the issue may be?

Thank you

Daniel

Hello,

ERR_MEM as error msg so i suspect memory size should be increased, try increase the Heap and Stack size...

Rgds,
Laurent


Thank you for your help Laurent.

I already tried that, I have it as follows:

_Min_Heap_Size = 0x400; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */

Do you think increase further?

I don’t know, it’s worth trying, you have freertos + lwip so it needs more than usual.

Rgds,
Laurent


_Min_Heap_Size = 0x800; /* required amount of heap */
_Min_Stack_Size = 0x1600; /* required amount of stack */

Still no go. Any other suggestions appreciated?

Maybe you’ll be more lucky asking in ST mcu forum for application’s issue.

Laurent



It seems the main tcpip thread may not be running, and not processing any messages hence the mailbox fills up. Any idea why it would not be running?

result = xTaskCreate( thread, ( signed portCHAR * ) name, stacksize, arg, prio, &CreatedTask );

// For each task created, store the task handle (pid) in the timers array.
// This scheme doesn’t allow for threads to be deleted
//s_timeoutlists_nextthread++.pid = CreatedTask;

if(result == pdPASS)
{
return CreatedTask;
}


the xTaskCreate is failing with a -1 result. Any one have any ideas?


I fixed it at last!

The thread wasn’t starting because there wasn’t enough memory. Fixed by increasing heap as follows:

_Min_Heap_Size = 0x2000; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */

Why STM32Cube isn’t doing this... who knows