cancel
Showing results for 
Search instead for 
Did you mean: 

Option bytes programming during flash download, IAR EWB

kiroid
Associate II
Posted on March 17, 2014 at 14:28

Hi all!

Does anybody know, how to program option bytes from IAR, during downloading flash image, like it implemented in STVP? Maybe, using some scripts to automate. I will need to program few hundreds of uCs, and setting those bytes every time manually will be boring a little bit :)

#stm8 #option-bytes #iar
2 REPLIES 2
pierre-xavier
Associate II
Posted on March 21, 2014 at 10:06

0690X0000060MltQAE.gif

There is a ''Use option bytes configuration file'' in the ST-Link options, but I can't find any documentation about this ''obc'' file.

Otherwise you can set the option bytes by software, using the ''FLASH_ProgramOptionByte'' function from ST libraries (stm8l15x_flash.c file).

kiroid
Associate II
Posted on April 02, 2014 at 11:58

Thank you, Pierre!

It seems your version of IAR is 1.42, with improved option bytes (OB) support. My version 1.41 does not have such option in ST-LINK options windows. And ''Product news'' section on IAR site says, that :

''Settings made in the Option Bytes window can be saved to and restored from an option bytes configuration file.''

So, we have to look in OB window for button to save the OB file. Will try out later.

Thank you for your help!