2020-11-21 10:40 PM
I am trying to migrate from UM0462 Flash Loader Demonstrator to the STM32CubeProgrammer (upon a recommendation from STM, as the former becomes obsolete). Yet I seem to be missing the option of loading OptionByte file.The documentation for cube refers to option byte, but not as a file:
Option bytes command
-ob, --optionbytes
Description: This command allows the user to manipulate the device option bytes by displaying or modifying them.
Syntax: -ob [displ] / -ob [OptByte=<value>]
[displ]: Allows the user to display the whole set of option bytes.
[OptByte=<value>]: Allows the user to program the given option byte.
Example
./STM32_Programmer.sh –c port=swd –ob rdp=0x0 –ob displ
How does one load an OptionByte.hex file, besides the .bin file?
Solved! Go to Solution.
2020-11-22 08:39 AM
Hi @שי קיסרי קיסרי ,
With STM32CubeProgrammer you can use -d command to download a hex file to Option bytes, Flash , external Falsh ,OTP, RAM.
Your hex file can combine different destination : Option Byte + Flash, no need to a seperate file.
The Command should be : ./STM32_Programmer.sh –c port=swd -d OptionByte.hex
regards,
Houda
2020-11-22 08:39 AM
Hi @שי קיסרי קיסרי ,
With STM32CubeProgrammer you can use -d command to download a hex file to Option bytes, Flash , external Falsh ,OTP, RAM.
Your hex file can combine different destination : Option Byte + Flash, no need to a seperate file.
The Command should be : ./STM32_Programmer.sh –c port=swd -d OptionByte.hex
regards,
Houda
2020-11-24 12:13 AM
Dear Houda,
Thank you for the reply! this is indeed what I wanted. May I bother you further?
How does one state the OptionByte file from the GUI? The "Erasing & Programming" tab features an option bytes command only at the Automatic Mode section.
If I put in the OptionByte.Hex path in the Download section - will the software automatically detect this as an optionByte file?
2020-11-24 04:52 AM
Hi @שי קיסרי קיסרי ,
Yes in "Erasing & Programming" tab just select your hex file and STM32CubePrgrammer will automatically detect it as Option Bytes File based on the destination address present in the Hex file.
regards,
Houda
2020-11-24 06:33 AM
Understood. To recap:
1) In command line, I can add the OptByte file along with the program file, with the option –c port=swd -d OptionByte.hex
2) In GUI, I need to do it in two different steps, first load the OptBte file, then the program file.
Thank you! :ok_hand: