cancel
Showing results for 
Search instead for 
Did you mean: 

Skipping flash erase with STM32_Programmer_CLI and STLINK-V3

ElPueblo
Associate II

Hello, 

I'm trying to setup a production line where I have to flash a serial number on each piece after it has been programmed with the standard firmware.

I put the serial number in an hex file, and I'm trying to write it using STM32_Programmer_CLI but I need to skip the flash erase before programming

I tried using 'ske': 

STM32_Programmer_CLI.exe -c port=SWD -w serial.hex ske

but the flash keeps getting erased. 

I found out that with ST-LINK_CLI.exe I can use the option 'ske' to disable flash erase, and I tried it, but it seems kind of obsolete because when I launch

ST-LINK_CLI.exe -c SWD LPM -P serial.hex ske

I keep receiving this error:

ElPueblo_0-1700234667144.png

Note that read out protection is NOT enabled and there is no elf file involved, I'm using .hex files.

What am i missing here? From what I can understand SMT32 Cube Programmer should have replaced STLink Utilities, but is it missing fundamental features like skipping the erase of the flash?

1 ACCEPTED SOLUTION

Accepted Solutions
ElPueblo
Associate II

I found out this question 

https://community.st.com/t5/stm32cubeprogrammer-mcus/cubeprogrammer-2-12-operation-exceeds-memory-limits/td-p/138298

where they use 

STM32_Programmer_CLI -c port=USB1 -d myHex.hex --skipErase

I tried "--skipErase"  with STM32_Programmer_CLI and it finally works!

The thing is, I cannot find this info in the STM32CubeProgrammer User manual, even if there's a chapter focused on command line programming.

My advice for ST would be to work a bit on the documentation of STM32 Programmer, because I had to find my solution on the answer to a question about a totally unrelated topic!

View solution in original post

4 REPLIES 4
ElPueblo
Associate II

I found out this question 

https://community.st.com/t5/stm32cubeprogrammer-mcus/cubeprogrammer-2-12-operation-exceeds-memory-limits/td-p/138298

where they use 

STM32_Programmer_CLI -c port=USB1 -d myHex.hex --skipErase

I tried "--skipErase"  with STM32_Programmer_CLI and it finally works!

The thing is, I cannot find this info in the STM32CubeProgrammer User manual, even if there's a chapter focused on command line programming.

My advice for ST would be to work a bit on the documentation of STM32 Programmer, because I had to find my solution on the answer to a question about a totally unrelated topic!

Pavel A.
Evangelist III

Documentation bug , UM2237

@KDJEM.1 

KDJEM.1
ST Employee

Hello,

Thank you @ElPueblo and @Pavel A.  for bringing this issue to our attention.

I reported this request internally.

Internal ticket number: 166662 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Kaouthar

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.

KDJEM.1
ST Employee

Hello @ElPueblo and @Pavel A. ,

The SkipErase command is currently described in UM2237 Rev 24.

Thank you for your contribution in STCommunity.

Kaouthar

 

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.