Skip to main content
JKucz.1585
Associate II
April 3, 2024
Solved

STM32_Programmer_cli Read specific memory range and save to file

  • April 3, 2024
  • 2 replies
  • 2145 views

I am able to read a memory location but do not have to save the result to a file.  here is my command

STM32_Programmer_CLI.exe -c port=swd mode=ur Freq=4000 -r16 0x803c000 0xA c:\TPD\ST_Prog\guid.bin

The data is displayed in the cmd window correctly

0x0803C000 : 0614 BB17 E000 D169 6E39

 

how can I save it to file.  I tried adding a path to the end of the command but nothing is saved.  Am I missing a -xxx command somewhere?

Best answer by Peter BENSCH

The command -u or --upload gets the device memory content to a file, e.g.:

STM32_Programmer_CLI.exe -c port=swd mode=ur Freq=4000 -u 0x803c000 0xA c:\TPD\ST_Prog\guid.bin

Hope that helps?

Regards
/Peter

2 replies

Peter BENSCH
Technical Moderator
April 3, 2024

The command -u or --upload gets the device memory content to a file, e.g.:

STM32_Programmer_CLI.exe -c port=swd mode=ur Freq=4000 -u 0x803c000 0xA c:\TPD\ST_Prog\guid.bin

Hope that helps?

Regards
/Peter

In order 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.
JKucz.1585
Associate II
April 3, 2024

Peter,

 

I receive this error

Warning: Wrong file path parameter in read command: "c:\tpd\st_prog\guid.txt"
Error: The read command you trying to perform (-u 0x803c000 0xa "c:\tpd\st_prog\guid.txt") is missing some arguments. Please refer to the Help to see how to use it.

command sent:

STM32_Programmer_CLI.exe -c port=swd mode=ur Freq=4000 -u 0x803c000 0xA c:\TPD\ST_Prog\guid.txt

Maryem
Technical Moderator
April 4, 2024

Hello @JKucz.1585 ,

 

Could you please try using a binary file (guid.bin) instead of a text file (guid.txt), as suggested in the command by @Peter BENSCH ?

 

Maryem.

In order 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.
Peter BENSCH
Technical Moderator
April 3, 2024

Which version of STM32_Programmer_CLI are you using?

In order 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.
JKucz.1585
Associate II
April 3, 2024

STM32CubeProgrammer v2.16.0