2 Replies Latest reply on Sep 18, 2018 2:44 AM by ring

    const array and generated hex code

    user_15365548

      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

        • 1. Re: const array and generated hex code
          ring

          Why do you want to get the checksum information?

          • 2. Re: const array and generated hex code
            ring

            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