STM32_Programmer_CLI #Write8 -w8 [scripts attached]
- February 2, 2022
- 2 replies
- 1416 views
Hi,
I'm able with the following script "myScript.prg" to write a single byte of data:
-c port=SWD
#Write8(0x08000428,0xAB)This script is then called with the batch:
STM32_Programmer_CLI.exe -script myScript.prgBut the problem here is that there's no possibility in this .prg script to parse external files and write in memory the content of this file.
Note: with this script the content is written in flash, no matter what the memory content is, same as writing a byte into the STM32CubeProgrammer user interface.
When I use this command instead, the write fails:
STM32_Programmer_CLI.exe -c port=SWD -w8 0x<address> 0x<value>The error message in the cmd is:
Error: Downloading 8-bit data failed...
If it's a Flash memory, it may be not erased or protectedTought that the problem might be the 32 bit alignment or not erasing the memory first.
So I tried erasing the entire sector (just for testing purposes) and then again using the -w8 but nothing changed.
How can I write just some bytes in flash, leaving the rest of the sector untouched, without using -script .prg?
You can find the 2 scripts in the attachments to test yourself easily.
Thanks for the help
