cancel
Showing results for 
Search instead for 
Did you mean: 

How to update settings with CubeMX in a project that is already opened?

monomonster
Associate II
Posted on June 04, 2015 at 11:08

I generated init code using STM32CubeMX and it turned out I wanted to map some IOs differently. I modified the settings and clicked the generate source code button and it of course it didn't just update my project files but rather generated a new project so I had to do a lot of re-work. Is there (I hope there is!) a way to modify settings and just update the project files without doing additional modifications so I won't have to do a lot of fixing up each time?

#cubemx
3 REPLIES 3
hbarta
Associate II
Posted on June 04, 2015 at 13:21

What do you mean ''generated a new project ?'' Did it produce code in a new location?

Which version of MX?

With versions previous to 4.8.0 I have updated projects repeatedly and the code was always updated in place. I always start by opening the .ioc file in the top folder of the project. (This is using Windows and EWARM.)

monomonster
Associate II
Posted on June 04, 2015 at 16:13

I have version 4.7.1 running.

I'll try to explain this a bit more clearly... I have the project open in MDK with the start-up code generated by CubeMX. At some point I go back to CubeMX (which is still open from beforehand) and I change some IO settings. I click generate source code and it will ask me if I want to open the project. If I do open the project it will simply open another copy of the project I'm currently working on, so no point in that. I select nothing and MDK asks me if I want to re-load since some changes had been made. I agree and things I've wrote in main + file that were added to project (my own file) were removed from the project although they are still in the project library.
monomonster
Associate II
Posted on June 04, 2015 at 19:25

I understood what is the problem (partially): I have to enter my code between the ''user code here'' comments. This, however, did not solve the fact my own files are not added to the project on the left menu (tree) however that is not so bad because I include them using directives of course. Anyway to fix the tree listing issue? I have upgraded CubeMX to the latest version but this issue remains the same.