"Internal Use" Metadata Intel Hex file

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

cross mob
DaSm_1109836
Level 2
Level 2
First like given 10 replies posted 10 sign-ins

I am working on a project that has a hard requirement to perform a CRC calculation to be executed at power-on to guarantee that the internal MCU FLASH is not corrupted. After painstaking searches and personal posts on this forum, I have to the following conclusion

1) The Intel Hex must be parsed post build (with a tool built by me) and the CRC must be calculated and appended/modified  to the Intel hex file at the end of the user FLASH space.

2) There is a checksum (2 bytes) at location 0x90300000 that also must be updated based on the result of the CRC calculation in order for PSOC programmer to recognize the Intel Hex file as being valid

3) Also, there is a field at location 0x90500000 (considered metadata) that also must be updated in order for the file to be considered valid by PSOC Programmer. It seems the final 2 bytes are also an additive checksum, but documentation states for Internal Use only

So my question is, are there any post build tools or methods that allows one to add a unique CRC to the end of User Flash and successfully updates both checksums (at 0x90300000 & 0x90500000) so that PSOC Programmer recognizes the Intel Hex file as valid. THANK YOU IN ADVANCE!!!

0 Likes
1 Solution
PandaS
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @DaSm_1109836 ,

Please refer to the following thread for your use case. It refers to a bat script which will help you generate the correct CRC.

https://community.infineon.com/t5/PSoC-4/Hex-checksum/td-p/276461

But, you cant program the hex file even after modifying it with correct checksum, this is because the metadata section at 0x90500000 contains some proprietary information that is used to guarantee the integrity of the hex file. Hence, you will not be able to program the hex file even though we tried to modify it to make it seem legitimate. 

Warm regards

Sobhit

View solution in original post

0 Likes
5 Replies
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @DaSm_1109836 ,

Are you using this algorithm for Checksum, two hex digits (1 byte), which is the least significant byte of the two's complement of the sum of the values of all fields except fields 1 and 6 (start code ‘:’ byte and two hex digits of the checksum)?

Thanks and regards

@PandaS 

0 Likes

Since this location is for Internal Use Only and Cypress won't divulge its use, I have given up on this approach as a solution.

0 Likes
ErieApps
Level 1
Level 1
5 sign-ins First reply posted First question asked

Have you had success with the checksum at 0x90500000? If so, how did you manage to calculate it so PSoC Programmer would accept it?

 

Thanks!

0 Likes

Since this location is for Internal Use Only and Cypress won't divulge its use, I have given up on this approach as a solution

0 Likes
PandaS
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @DaSm_1109836 ,

Please refer to the following thread for your use case. It refers to a bat script which will help you generate the correct CRC.

https://community.infineon.com/t5/PSoC-4/Hex-checksum/td-p/276461

But, you cant program the hex file even after modifying it with correct checksum, this is because the metadata section at 0x90500000 contains some proprietary information that is used to guarantee the integrity of the hex file. Hence, you will not be able to program the hex file even though we tried to modify it to make it seem legitimate. 

Warm regards

Sobhit

0 Likes