cancel
Showing results for 
Search instead for 
Did you mean: 

how can i compute flash crc for STM8AF5288 MCU with STVD IDE & Cosmic compiler ?

DMega.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions

If you're doing functional safety likely going to need to understand MCU and surrounding tools, and implement your own methods.

S19 with be Motorola HEX format. Tools like SRecords exist, but the formats are not particularly complicated. This and object files should be covered at college level.

I think SRecords has CRC / Checksum options, IAR tool chain had some too. Don't use STM8/Cosmic so don't know specifics, would imagine there's docs and tutorials. Materials don't have to be tool specific if done as a post-link, user or batch file step.

If you can read memory via a pointer you should be able to implement target side code to sum, or CRC that content, and confirm integrity. ie data built on host matches materials running on target.

Writing packaging and signing tools should be with the scope of team responsibilities.

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

View solution in original post

6 REPLIES 6

In the worst case you'd likely need to do as a post-link step over .BIN or .HEX content

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
DMega.1
Associate II

i have an *.s19 from the STVD IDE ? is it something i should use ?

or is there a standard procedure to accomplish this check in STM8 ?

If you're doing functional safety likely going to need to understand MCU and surrounding tools, and implement your own methods.

S19 with be Motorola HEX format. Tools like SRecords exist, but the formats are not particularly complicated. This and object files should be covered at college level.

I think SRecords has CRC / Checksum options, IAR tool chain had some too. Don't use STM8/Cosmic so don't know specifics, would imagine there's docs and tutorials. Materials don't have to be tool specific if done as a post-link, user or batch file step.

If you can read memory via a pointer you should be able to implement target side code to sum, or CRC that content, and confirm integrity. ie data built on host matches materials running on target.

Writing packaging and signing tools should be with the scope of team responsibilities.

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

https://community.st.com/s/question/0D50X00009XkZBHSA3/crc-ccitt-16-bit-for-stm8s207

Options in the linker settings, check docs on "-ck" option and others

https://community.st.com/s/question/0D50X00009XkY5sSAF/stm8-blockcksum161

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

https://cosmic-software.com/stm8.php

 

  • Check Sum Feature
  • Easy to use check sum facility and library (Source included) allow users to quickly implement an efficient check sum on any or all sections. Check sum calculation and insertion is transparently managed by the linker.

cosmic_rtfm.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
DMega.1
Associate II

@Community member​ thanks for your inputs. I will try the cosmic checksum feature on the STM8AF52XX MCU & post an update over here.