cancel
Showing results for 
Search instead for 
Did you mean: 

Logic for checksum of s19 file in stm8 stvp

raja1
Associate II

Hello. I am trying to modify my s19 file which is generated for stm8 using stvd and cosmic c compiler.

 

Consider an S19 file which starts from 0x4000 address [EEPROM starting address]

The first two lines would be : 

S123400000000000000000000000000000000000000000000000000000000000000000009C
S123402000000000000000000000000000000000000000000000000000000000000000007C

I want to know what is the meaning of the first characters S123 and the last byte 9C/7C etc.

 

This is important for me to understand the logic to modify the s19 accordingly.  

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

@raja1 You can also find the format described in Wikipedia.

Regards
/Peter

In order 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.

View solution in original post

3 REPLIES 3

You'd think it would be documented somewhere..

Perhaps look at srecords project

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Peter BENSCH
ST Employee

@raja1 You can also find the format described in Wikipedia.

Regards
/Peter

In order 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.
raja1
Associate II

Thank you @Peter BENSCH ! This is what I was looking for. I was confused on how the checksum was being evaluated but it makes sense now.