cancel
Showing results for 
Search instead for 
Did you mean: 

Option byte code for stm8 cosmic compiler

saran raj
Associate III
Posted on October 13, 2017 at 12:58

Hi,

                When i using Ride 7 with stm8 compiler , i will do this following code for option bytes only in assembly. Its working.

                But when i try with stvd with stm8 cosmic compiler,the following code is not working. How can i convert the following code for  stm8 cosmic compiler?

cseg at 04800h

 

db 000h ;LOCKBYTE   //Read out Bytes

 

db 000h ;OPT1

db 0FFh ;NOPT1

 

db 000h ;OPT2

db 0FFh ;NOPT2

 

db 000h ;OPT3

db 0FFh ;NOPT3

 

db 000h ;OPT4

db 0FFh ;NOPT4

 

db 000h ;OPT5

db 0FFh ;NOPT5

 

db 000h ;OPT6

db 0FFh ;NOPT6

 

db 000h ;OPT7

db 0FFh ;NOPT7

 

end

3 REPLIES 3
luca239955_stm1_st
Senior II
Posted on October 16, 2017 at 09:29

Hello,

short answer: it is not possible.

In more detail, you can declare the option byte values either in C or Assembler and they will end up in the .hex file at the right addresses, but then the STVD debugger just discards them when programming the flash, so it's useless.

The ZAP debugger allows you to program the option bytes together with the application code (so that you can declare them in the source code), but it is not free.

Regards,

Luca

Posted on October 16, 2017 at 09:49

How to create .hex file in stvd debugger?

Posted on October 20, 2017 at 23:27

Load the option bytes in STVP (another tool from ST), then edit the bits as you need, then save in hex format.