Skip to main content
Visitor II
December 16, 2015
Question

STM8 checksum

  • December 16, 2015
  • 2 replies
  • 783 views
Posted on December 16, 2015 at 15:44

Hi,

i have generated hex file for a particular project. The controller used is stm8s003f3. My question is regarding checksum. I'm not familiar with checksum. How can i add checksum to this hex file.? How can i determine the type checksum and its value? Please let me know in detail about checksum. I'm using STVD and STVP for development purpose. Any help would be appreciated......

#stm8 #checksum
    This topic has been closed for replies.

    2 replies

    Visitor II
    December 16, 2015
    Posted on December 16, 2015 at 17:14

    Hello,

    it depends on what compiler you are using.

    For the Cosmic compiler, the checksum is calculated by the linker and can be verified by simply adding a couple of lines in your application, like this:

      if (_checksum())

        abort();

    More details in the manual.

    Regards,

    Luca

    Visitor II
    December 17, 2015
    Posted on December 17, 2015 at 04:43

    hi,

    Thanks for the help..

    yes i'm using cosmic compiler. How can i determine the type of checksum in that case? Is it possible to add checksum by enabling readout bit (in ROP)using STVP. I have seen such a provision in STVP. I'm not sure whether its a right or not

    Regards.