const array and generated hex code

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

cross mob
toka_1312631
Level 1
Level 1
First like received First like given

I have constant array: const uint8_t test[10] = {1,2,3,4,5,6,7,8,9,10}.

If I changed only one number inside the array, for example: const uint8_t test[10] = {1,2,3,4,5,6,7,8,9,11}, hex file changes on two positions:

const_array_hex.png

Project type is Bootloader Project. I find out that this is the reason why hex file has changed on two different places.  Looks like that the "second place" is  bootloader "checksum".

I couldn't find any info about "bootloader checksum", is it possible to get any details about it (checksum calculation, location in hex file...)?

Regards,

Tomi

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Hi Tomi,

Project type is Bootloader Project. I find out that this is the reason why hex file has changed on two different places.  Looks like that the "second place" is  bootloader "checksum".

I couldn't find any info about "bootloader checksum", is it possible to get any details about it (checksum calculation, location in hex file...)?

Your understanding is right.

Because in hex file, every line will make checksum. the second different is the line checksum.

How to do the checksum:

0200000490303A

3A=100-(02+00+00+04+90+30)

The last byte in the line is the checksum byte.

Thanks

View solution in original post

0 Likes
2 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Why do you want to get the checksum information?

0 Likes
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Hi Tomi,

Project type is Bootloader Project. I find out that this is the reason why hex file has changed on two different places.  Looks like that the "second place" is  bootloader "checksum".

I couldn't find any info about "bootloader checksum", is it possible to get any details about it (checksum calculation, location in hex file...)?

Your understanding is right.

Because in hex file, every line will make checksum. the second different is the line checksum.

How to do the checksum:

0200000490303A

3A=100-(02+00+00+04+90+30)

The last byte in the line is the checksum byte.

Thanks

0 Likes