cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear the total Chip when Reprogramming the MCU; Using STM32CubeIde and a Segger Jlink ;

Ddeve.1
Associate II

I use the STM32CubeIde and the Segger J-link program tool.

I've noticed that when reprogramming only the sectors where the program comes are reflashed.

Since I also use other secoters for data storage, would I also want to delete/clear these when reprogramming the mcu?

How can I set the STM32CubeIde environment to erase the entire flash before programming with the segger J link tool (debug/release)?

Regards,

diederik

4 REPLIES 4
TDK
Guru

Some options here: You may need to modify them for the equivalent JLink commands/tools.

https://community.st.com/s/question/0D50X0000Bh8tmx/how-to-erase-flash-before-programming-with-stm32cubeide-solved

If you feel a post has answered your question, please click "Accept as Solution".
Ddeve.1
Associate II

I think this works for a ST link debugger connection ; unfortunately not for a Segger Jlink?!

When adding "monitor flash mass_erase" to the debug configuration -> Initialization statup :

0693W00000GWgKQQA1.jpgI get the following error :

0693W00000GWgKaQAL.jpg 

Any suggestions?

diederik

Amel NASRI
ST Employee

Hi @Ddeve.1​ ,

In the user manual UM2609 STM32CubeIDE user guide, there is a dedicated paragraph "Debug using SEGGER J-Link".

I suggest that you refer to it.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

CalebJ
Associate II

Is there a way to do this if you do not have the SEGGER J-Link and just the ST-Link V2?