This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Checksum calculation example

Can you tell me, what does "unsigned char CODE *" mean in

checksum = calc_checksum ((unsigned char code *) 0, 0x4000);


from "csumex" Keil example.

My c166 compiler can't complile it.
What shall I do?

Parents
  • "is it better to use this one or calculate checksum of ALL FLASH "

    There is no answer to that.

    There is no such thing as "better" here - it's just a question of what you need to do!

    First, you need to clearly define your Requirement - then you can think about how to meet that requirement.

    Without knowing precisely what the Requirement is, it is impossible to say what is the "best" way to meet it!! :-0

Reply
  • "is it better to use this one or calculate checksum of ALL FLASH "

    There is no answer to that.

    There is no such thing as "better" here - it's just a question of what you need to do!

    First, you need to clearly define your Requirement - then you can think about how to meet that requirement.

    Without knowing precisely what the Requirement is, it is impossible to say what is the "best" way to meet it!! :-0

Children
  • HI Andy !

    I just need to check if programm codes in flash was not changed. I have found 2 examples - with all flash checksum (with trash) and only code section checksum (more compact). So I just ask what should I prefer. I have no precise Requirement.

    I have no experience in checksum calculation so I ask your opinion. My be someon can post ITS working example for 166. It will be nice :)