2025-02-18 12:12 PM - last edited on 2025-02-18 03:20 PM by Pavel A.
I enabled this option to activate the virtual COM port for debug reasons:
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:
Crawling in the files, I found that the stm32h5xx_nucleo_conf.h the USE_BSP_COM_FEATURE is not enabled.
Enabling this manually will result in many more errors:
Generating the code again will reset the USE_BSP_COM_FEATURE to 0.
Did I forget or overlook something?
2025-02-18 12:44 PM
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:
Next you need to set this in the stm32h5xx_nucleo.h
to THIS:
and than set this to 1 in the stm32h5xx_nucleo_conf.h
Now it compiles, but if you re-generate the code with CubeMX your changes will be reverted... nice work STM
2025-02-18 04:10 PM
What version CubeMX are you using?
I'm using 6.13.0 and it seems to be setting the #define correctly.
I also don't see line 47 #define USE_NUCLEO_H533RE in you screenshot?
With that define, it would correctly select UART2 for the COM port.
2025-02-19 04:56 AM
We are using also the 6.13.0
I can confirm, that the problem only occurs on first creation of a project after installing the CubeMX.
I set up the toolchain and CubeMX at my client's site and created a project. The necessary packages were downloaded when the project was first created. Immediately afterwards, we continued with the project creation without closing the software. The result was a corrupted project.
Today, I recreated the project and suddenly a new dialog appeared that I didn’t see yesterday. It seems there are issues with fresh installations or packages.
2025-02-19 11:05 AM
No, this error is not caused by a fresh installation. Although there seems to be an issue here as well. After installing the packages, it is not possible to initialize a project.
The error occurs as soon as the X-CUBE-TOF1 is added. Once this is done, the project is corrupted, and it is no longer possible to compile the project without manual adjustments.
Setup your project like this and you will see, that the project no longer compiles...
2025-02-19 12:49 PM
Yes, you are correct. There seems to be a bug.
When I added the X-CUBE-TOF1 to the project and generated the code...