cancel
Showing results for 
Search instead for 
Did you mean: 

Impact of CubeIDE update on existing source code

LCE
Principal

Hello,

there are so many topics out there about "stuff not working after CubeMX / CubeIDE update", so I wonder how that could impact my "workflow".

I'm using CubeMX only as a starting point, and as soon as I have some basic stuff running (usually UART for debugging), I won't use CubeMX again. Except, I sometimes add peripherals by using CubeMX only with a new project and the same setup as the existing one, so my existing source will not be overwritten, as I don't like that /* USER CODE BEGIN / END */ stuff (and I'm a little bit psychic about the ugly indentation...).

That said, updating CubeMX should not be a problem for me.

But what about updating CubeIDE ?

Would that somehow change my project's source files when I'm using HAL stuff (I replaced a lot with direct register access, but some stuff is not that important - or I was too lazy to replace) ?

Or would a CubeIDE update only affect projects that were created with the CubeMX from "within" CubeIDE ? Which I hope is like that...

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

Hi,

git is easy and helpful, even without a server

git init
git add .
git commit -m "first commit"

can be safely removed by deleting the .git folder. Really recommend using it early.

If your settings copy all files to your project (the default), in my experience, STM32CubeIDE will not touch them unless to re-generate the code (open/save .ioc file). But, who might give you a future guarantee, it's software.

IMHO: better safe than sorry.

hth

KnarfB

View solution in original post

4 REPLIES 4
KnarfB
Principal III

HAL libraries get updates from time to time too. You can migrate, but you don't have to.

At the end, you cannot be sure that an update does not change anything in your source code.

Hopefully you have all project source files in a git or similar source control system and can easily make a diff for reviewing incoming changes and roll back in case something went wrong.

hth

KnarfB

LCE
Principal

Thanks for the reply.

As soon as the project becomes "official", I start using git.

But still, in case there's a HAL update, is there any kind of automatism which would replace the HAL files (all copies in the project folder) which I use in my projects?

KnarfB
Principal III

Hi,

git is easy and helpful, even without a server

git init
git add .
git commit -m "first commit"

can be safely removed by deleting the .git folder. Really recommend using it early.

If your settings copy all files to your project (the default), in my experience, STM32CubeIDE will not touch them unless to re-generate the code (open/save .ioc file). But, who might give you a future guarantee, it's software.

IMHO: better safe than sorry.

hth

KnarfB

Thanks again!