Skip to main content
NorfLoud
Associate II
August 5, 2020
Solved

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

  • August 5, 2020
  • 6 replies
  • 1792 views

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.

This topic has been closed for replies.
Best answer by Piranha

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

6 replies

TDK
August 6, 2020

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
NorfLoudAuthor
Associate II
August 6, 2020

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

TDK
August 6, 2020

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""."
NorfLoud
NorfLoudAuthor
Associate II
August 8, 2020

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

Piranha
PiranhaBest answer
Principal III
August 7, 2020

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

NorfLoud
NorfLoudAuthor
Associate II
August 7, 2020

What are the options? Other libraries and IDEs?