2026-02-06 6:34 PM
Hi,
I encountered a strange problem while using stm32cubeMX in a new project.
Everytime i saved the code files and then regenerated the code using stm32cubeMX,the user code will gone.
A example,"#include "led.h" " have been insert in the user code zone,then i saved the project,and regenerated code using stm32cubeMX.
then "#include "led.h" " is missing...
"Keep User Code When re-generating" already been checked as shown in the figure。
stm32cubeMX version 6.16.1.
any advise will be appreciated,thx.
2026-02-06 6:40 PM
Please include your ioc file to see if it can be duplicated.