cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube: adding user files to project in Keil

mchomnicki9
Associate II
Posted on December 29, 2015 at 13:17

Hi all,

Hi All,

I'm building a project in STM32Cube for Keil uVision 5. It's working fine. In next step I'm adding some new files in Keil, adding library path in Options for Target and when I have one more time Generate Code in Cube, all my settings disappear by new code. Is there any option in Cube to block it?

It's really annoying when I have to do the same things in Keil every time when I Generating Code.

#keil #stm32cubemx #stm32cube
5 REPLIES 5
Nesrine M_O
Lead II
Posted on December 29, 2015 at 14:00

Hi  chomnicki.marek,

Which CubeMX version are you using? If you are using an old version, I recommend you to use the latest: 4.12.0

-Syrine-

mchomnicki9
Associate II
Posted on December 29, 2015 at 17:23

Hi,

I had 4.11. After update is the same.

schelven
Associate II
Posted on December 30, 2015 at 01:04

In CubeMX -> Project -> TAB [Code Generator] did you check ''Keep user code when generating''

Nesrine M_O
Lead II
Posted on December 30, 2015 at 09:48

Hi chomnicki.marek,

I cannot reproduce your issue. In fact, it was a known bug in the version 4.11 but then fixed in the 4.12 version.

• For the option ''Keep user code when generating'', it is checked by default but also you can verify it.

• Be sure that MX 4.12 is correctly installed in your machine.

-Syrine-

Posted on April 19, 2016 at 03:16

I see the same issue in version 4.14.

And it's not about deleting user code, but rather deleting groups/user files from a project.

Here is what happens (Keil v.5.17):

Create a new group in a Cube generated project, and add user files to this group.

Regenerate code by the Cube. Custom group is deleted from a project along with files,

though files are not actually deleted.

Is there any way around it?

Thank you,

Gennady