cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX virtual com port for NUCLEO-H533RE does not generate correct code

MechatronikMonkey
Associate II

I enabled this option to activate the virtual COM port for debug reasons:

MechatronikMonkey_0-1739908865321.png

 

It is a CMake Project to be opened in VS-Code

Enabling the Virtual Com Port in CubeMX results in this error in VS Code:

MechatronikMonkey_1-1739909024203.png

Crawling in the files, I found that the stm32h5xx_nucleo_conf.h the USE_BSP_COM_FEATURE is not enabled.

MechatronikMonkey_2-1739909117987.png

Enabling this manually will result in many more errors:

MechatronikMonkey_3-1739909333150.png

Generating the code again will reset the USE_BSP_COM_FEATURE to 0.

Did I forget or overlook something?

1 REPLY 1
MechatronikMonkey
Associate II

Yes, it is another bug!!!!!!!!!!!!!!!!!

First you need to remove the lock from this pins (right click) ans set manually to USART2 RX/TX as USART3 is not avail on this pins:

MechatronikMonkey_1-1739911155382.png

 

Next you need to set this in the stm32h5xx_nucleo.h

MechatronikMonkey_0-1739911012164.png

to THIS:

MechatronikMonkey_3-1739911408732.png

 

and than set this to 1 in the stm32h5xx_nucleo_conf.h

MechatronikMonkey_2-1739911342698.png

 

Now it compiles, but if you re-generate the code with CubeMX your changes will be reverted... nice work STM