AnsweredAssumed Answered

CubeMX 4.16.1 deletes user code

Question asked by rybak.marcin on Oct 7, 2016
Latest reply on Oct 9, 2016 by Andrei Chichak
Hi. I am writing my engineering thesis and I have to build a project based on STM32F746G-Discovery. So I started by creating a project in CubeMX, then writing some code in it in Keil uVision 5, wrote my own LCD libraries and so on. After that I wanted to add ADC functionality to my project, so I opened CubeMX and enabled ADC, but when I generated the code, all my "user code" and libraries I created just disappeared.
I made sure many times that my code is between "user code begin" and "user code end" comments, and that the checkbox "keep user code when re-generating" is checked.
Could you please help me? I'd like to finish this project as fast as possible, but it won't be possible if everytime I want to add another peripheral I have to write my code from scratch.
I am aware that I can write the peripheral definitions and initializations myself, but I didn't download CubeMX so that I have to do it by hand anyway.
Greetings,
Marcin

Outcomes