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
  • 2146 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?

This topic has been closed for replies.
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
Peter BENSCHBest answer
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

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.

Peter BENSCH
Technical Moderator
April 3, 2024

Which version of STM32_Programmer_CLI are you using?

JKucz.1585
Associate II
April 3, 2024

STM32CubeProgrammer v2.16.0