2017-05-31 11:58 PM
Hi,
I want to use the ST-Link Utility command-line tool for production:
Due to flash size-limitations, production data is located in a specific location, after the BootLoader vector-table (address 0x08000100). BootLoader can grow larger, if needed to upgrade.
I want to flash a production-data file via ST-LINK_CLI.exe:
ST-LINK_CLI.exe -c SWD -P ProductionData.bin 0x08000100 -V
but without erasing the BootLoader.
The ST-Link Utility GUI has a check-box: Skip Flash Erase.
How can I do this via command-line?
#st-link_cli #st-link-utilitySolved! Go to Solution.
2017-06-08 05:40 AM
Hi
Rosenbaum.Rami
,The equivalent of 'Skip Flash Erase' option is '-ske' to be used with
ST-LINK_CLI.exe.
Please try it and let me know if it helps to get the expected result.
-Amel
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.
2017-06-08 05:40 AM
Hi
Rosenbaum.Rami
,The equivalent of 'Skip Flash Erase' option is '-ske' to be used with
ST-LINK_CLI.exe.
Please try it and let me know if it helps to get the expected result.
-Amel
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.
2017-06-11 05:27 AM
Thanks,
'ske' (without the '-') works.
It's in the application 'help', but not described.
But, then I'm getting:
The elf loader Program function fails.
The elf loader Program function fails.Memory-Loader errorError occured during program operation!Programming error @ 0x08000100!The sector is already flashed with data (I remind you that the bootloader resides in sector 0, and the data I'm flashing, the production data, sits in the middle of this sector)
2017-06-11 09:40 AM
>>The sector is already flashed with data (I remind you that the bootloader resides in sector 0, and the data I'm flashing, the production data, sits in the middle of this sector)
Which means is DOES actually need to be erased if those locations were previously programmed. Really not sure the code in the Utilities is that smart or flexible. Even if the cells in question are programmed to 0xFF, the F1 as I recall does not allow for subsequent reprogramming of bits from 1 to 0, which is frequently possible on stand-alone FLASH parts. I suspect ST has some parity/hamming scheme on the array.
Provide data for the entire sector, ie RMW your data into the sector
I would try not to be dependent on ST for the success of your production programming stations. Ideally the boot loader should control the writing of the data, and the erase/program of sectors it resides in. Investigate third part programming toolkits, Segger offers some solutions as I recall.
This is an area where you'd really want to get with the FAE, or sales contact, responsible for your account.
2017-06-13 07:48 AM
I managed to work around this, still via ST-Link Utility, using the '-w8' option, writing one byte at a time.
A new issue has arose, this is a secure device, boxed in a mesh and epoxy. There are over 10,000 devices with the same HW, but old FW around, which will need to be upgraded (by and 'old style' application which will flash the new bootloader).
In this scenario there will not be JTAG interface for serial-number, so we'll have to use the bootloader for flashing the SN.
Thanks.