How can I ensure the integrity of downloaded programs?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ysgeum
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

After downloading the HEX file to an MCU such as TC275TP, I want to check the integrity of all memories to see if the download was successful.

Although the checksum method is used, not all memory is calculated, and there is a memory area that is out of the checksum calculation range, such as the user data area.

How to check the integrity of all memory, including downloaded and undownloaded areas, to see if the values I want are included?

0 Likes
1 Solution
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

In hex file format, the checksum is "like" a sum. You can use CRC instead for better effect but much more CPU cost.

If you read all the memory byte by byte difficult, then it's not possible to do checksum calculation.

View solution in original post

0 Likes
3 Replies
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

You could divide Hex into two regions, one is for program, the other is for user data. And calculate the checksum on the PC before download, and then read all the data in the memory to compare.

 

0 Likes
ysgeum
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

thanks for the reply
But I don't quite understand

What do you mean by dividing the HEX file into 2 areas?

And in order to check the integrity of the HEX file directly on the PC, is the checksum method good or is another verification method such as CRC32 good?

Also, what should I do if it is difficult for the downloading device to compare all memory by byte after downloading?

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

In hex file format, the checksum is "like" a sum. You can use CRC instead for better effect but much more CPU cost.

If you read all the memory byte by byte difficult, then it's not possible to do checksum calculation.

0 Likes