cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate code inside USER CODE root

Mark81
Associate III

Using STM32CubeMX, how to generate the code that goes inside the USER CODE BEGIN/END root sections?

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @Mark81​ 

CubeMX can't generate user code.

The purpose of USER CODE BEGIN/END root sections is too protect the user code you may have written from being lost in case you regenerate with CubeMX

Hope it's clear.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Olivier GALLIEN
ST Employee

Hi @Mark81​ 

CubeMX can't generate user code.

The purpose of USER CODE BEGIN/END root sections is too protect the user code you may have written from being lost in case you regenerate with CubeMX

Hope it's clear.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.