Skip to main content
Visitor II
May 16, 2024
Question

Generate a checksum

  • May 16, 2024
  • 1 reply
  • 2121 views

I need to generate a checksum of data from X address(FLASH) to Y address (FLASH). and write at last 4 bytes of FLASH memory in "xyz" section. 

When I say calculate checksum, I mean addition of all given data bytes from X address(FLASH) to Y address (FLASH).

Can we do it at compilation time ?

 

 

    This topic has been closed for replies.

    1 reply

    Visitor II
    May 17, 2024

    If you write a script (e.g. in Python) which can read your generated ELF or BIN file - sure.
    You have to provide this script and add it as a post-compile step.

    The compiler itself does not do. But you are free to add this as a step after code generation. And what and how to do: it is only you (therefore you had to write a script post-processing the compile results).