cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VGT6 + STM32CubeMX + Rtos + LWIP + SW4STM32 unable Virtual COM port.

NorfLoud
Associate III

Hello, i have got problem with basic project form STM32CubeMX. Help please.

This is my project https://drive.google.com/file/d/1nJh5805ZFjzibTgeT_i-kSdNzgrmXk0_/view?usp=sharing for STM32CubeMX

I write in SW4STM32 main.c:

* USER CODE BEGIN Includes */

#include "lwip/opt.h"

#include "lwip/arch.h"

#include "lwip/api.h"

#include "usbd_cdc_if.h"

/* USER CODE END Includes */

And I compile the project with "Optimization level -O0" and "Debug level None".

I do .dfu file with DfuFileMgr.exe and load program with DfuSeDemo.exe. Successful.

Driver Virtual Com Port for STM32 version 2.1.0.

Problem: Putty don't open Virtual Com Port. Why is this happening?

If you reduce the number of threads the port opens. But this option is not suitable.

1 ACCEPTED SOLUTION

Accepted Solutions
Piranha
Chief II

The more flawed code you stick together, the less are the chances of something working at all. In case of RTOS + lwIP + USB slapped together by CubeMX the chances are approaching zero.

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

View solution in original post

6 REPLIES 6
TDK
Guru

Does your program hard fault as a result of more threads? When you debug it, are things still executing? Possible you just ran out of stack/heap room.

If you feel a post has answered your question, please click "Accept as Solution".
NorfLoud
Associate III

No, the program does not have hard fault. An empty project generated by STM32CubeMX has a heap/stack overflow?

TDK
Guru

Doesn't look like an empty project to me. But yes, even a trivial program can overflow the stack/heap if those are set too small.

If you feel a post has answered your question, please click "Accept as Solution".
Piranha
Chief II

The more flawed code you stick together, the less are the chances of something working at all. In case of RTOS + lwIP + USB slapped together by CubeMX the chances are approaching zero.

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

What are the options? Other libraries and IDEs?

Do you know how to detect stack/heap overflow? I haven't found any information on this topic yet...