2023-05-10 12:45 AM
I´m programming a STM32F103RCT6 via command line via:
STM32_Programmer_CLI.exe --connect port=SWD --erase all
STM32_Programmer_CLI.exe --connect port=SWD mode=UR reset=HWrst --download Output.hex --verify
While erasing and programming works flawlessly I´m facing the issue that the verify is failing. This is because after programming Output.hex the controller will start the programmed application.
This is an issue, because the application will write to flash memory at address starting at 0x08037800 on startup, making the succeeding verify process failing of course.
Is there a way to prevent STM32_Programmer_CLI from starting the controller after programming ?
2023-05-11 12:40 PM
I'm not sure but if you download hex file , you must pass address :
Example from manual, page 104:
-c port=COM4 -w RefSMI_MDK/All_Flash_0x1234_256K.bin 0x08008000 This command programs the binary file “All_Flash_0x1234_256K.bin�? at address 0x08008000
2023-05-11 11:36 PM
Hi Kamil, Sorry, I do not understand how this will help with my verify issue, because the example doesn´t use verify at all. Do you refer to a different post, maybe ? BTW: Hex files normally have a extended segment address record, so the additional start address parameter shouldn´t be needed.
2023-05-12 12:56 AM
Yes, sorry. I'm confused yesterday. Try add -halt flag at the end.
Generally it's weird because I can't reproduce your issue on F7 related to "Verify"
2023-05-12 02:17 PM
This forum thread was marked by the moderator as needing a little more investigation, so a Support case was created in your name and will be handled off-line.
2023-05-23 07:42 AM
Hi, sorry for my late reply, I tried your idea adding --halt. If you put it between --download and --verify, you will get "Error: Wrong verify command use: it must be performed just after write command or write 32-bit command". If you put it after verify, it won´t help.
There is a 3-step workaround that actually worked for me:
(Make sure the controller´s flash pages are erased)
1.) Cut the .HEX-File into two parts (1st part: Application (+bootloader); 2nd part: Data, that will be changed by application)
2.) Program 2nd part first (data) => Application isn´t existent and therefore can´t do anything => Verify will be OK
3.) Program 1st part => Application will start and change data, but this is not scopy of verify process now => Verify will be OK.