2016-05-03 08:10 AM
Hello community
here they are my 5 cent of opinion about the - otherwise great - Cube MX.I ee that, whenever I regenerate a project for whatever reason (changing clock scheme, using DMA for USART instead of polling etc.), if I keep the same project name the Cube re-generate the HAL coden of the select peripherals (OK), keep the user code inside the 'user-code begin / end' keyword of the source files (also OK) but- a - recreate a new project file everytime (do not like)- b - delete the user files under the directory <proj_name>/src and inc (do not like)My project is under revision control so -b- is not too much annoying but -a- is: I cannot restore the old project file without loosing any new option introduced by the lastest Cube MX runPlease comment or advice in case I am doing something wrong or using a bad methodologythanksSolved! Go to Solution.
2017-05-09 08:09 AM
Hello
stanzani.marco
,This issue was delivered in CubeMX4. Don't hesitate to upgrade CubeMX with the latest release.
BR. Eric
2016-05-03 01:56 PM
2016-05-05 01:13 AM
thanks obid.mac
I do nearly the same than you in real life. To enforce the consistency between Cube-MX (great) job and real life project I'd love that Cube-MX will not detroy the user file, though (why should so that: since Cube-MX preserve the user code inside the automatically generated files, it should preserve project structures and user files as well, IMO).Mine is a suggestion to the Cube-MX development team (I can live without, BTW)2016-05-10 08:31 AM
Hello,
Note re-generating the code should not be removing your user files from inc/src directories. Can you please indicate under which OS you are working and which toolchain you have selected for project generation. Thank you2016-05-25 05:40 AM
here you go
I am using Keil 5.2 end CubeMX 4.13.1 under Windows 10@64bit2016-08-24 06:11 AM
I have exactly the same problem with CubeMX 4.15.1 with True Studio on Windows 10. My code is deleted and sometimes whole files are deleted. If it wasn't for version control I'd be having to manually replace my files but it is making changing configuration a nightmare.
2016-11-02 08:32 AM
A bug has been recently corrected about a sync with windows indexer.
That led to some file deleted or partially updated.
The correction was added in 4.17.
Could you please try with that version to check if it solve your symptoms ?
Great thanks in advance.
Kind Regards
Sirma
2017-05-09 08:09 AM
Hello
stanzani.marco
,This issue was delivered in CubeMX4. Don't hesitate to upgrade CubeMX with the latest release.
BR. Eric