cancel
Showing results for 
Search instead for 
Did you mean: 

Partial or Full chip erase before programming?

Andrew Neil
Evangelist III

Keil (among others) allows the choice of whether to do a full or partial erase before programming:

AndrewNeil_0-1717712173910.png

Is it possible to do that in STM32CubeIDE ?

If so, how ?

 

29 REPLIES 29

Hi @Andrew Neil 

For debugging, if you press on the bug icon, the IDE will automatically build the executable (but not rebuild as far as I know), connect to the debug probe, download the executable to the uC and then start the debug session.

As long as you don't have an external memory chip that requires an external loader, it does happen automagically.

Cheers.


@Kraal wrote:

Hi @Andrew Neil 

For debugging, if you press on the bug icon, the IDE will automatically build the executable (but not rebuild as far as I know), connect to the debug probe, download the executable to the uC and then start the debug session.


Yes, I know that.

The question is how to make the download part do just a partial erase - instead of a full erase.

 


@Kraal wrote:

As long as you don't have an external memory chip that requires an external loader, it does happen automagically.


But what it does "automagically" includes a full chip erase - the question is how to configure that.

We'd got as far as how to stop the automatic download, and how to set up a custom download - which could do the partial erase.

The next step would be to get that integrated again into a single step. You had suggested the 'Launch Group' - that does appear to exist in STM32CubeIDE, but how to use it?

Hi @Andrew Neil ,

Sorry for the misunderstanding.

I have found the original Atollic user guide here https://www.st.com/resource/en/user_manual/usermanual_truestudio-user-manual-for-truestudio-930-stmicroelectronics.pdf

From page 198 they explain how to setup the launch group. I believe you must have configured the external tool and the debug prior to set the launch group.

I did not find anything related in the CubeIDE user guide.

 

Good luck !

Hmm i dont see effectivity in this q? Do full erase with CLI call and dont waste time on builds...

What is your real req? 


@Kraal wrote:

I did not find anything related in the CubeIDE user guide.


Neither did I.  :frowning_face:


@MM..1 wrote:

What is your real req? 


Using Flash for non-volatile data storage (EEPROM emulation) - where you want to be able to down load new firmware without erasing the NV data.


IDE work this way erase only code linker parts. I use this daily

No i repeat erased is all you config in linker file. Normal only used parts.

Show your log, LD...

Just the standard .ld generated by Cube

(.txt suffix added just because the forum won't accept .ld)