I think that the ".hex" file is in Intel Hex Format.
And the line you specified is type of "data",
so the content(s) seems to be at the mercy of PSoC Creator.
I ran following test with my sample program.
(1) Program the project then read it using PSoC Programmer (test1.hex)
(2) Without re-compiling the project programmed and read it (test2.hex)
(3) Cleaned and rebuilt the project and programmed and read it (test3.hex)
Then I compared there three using cygwin
So, test1.hex and test2.hex were same, but test2,hex and test3.hex were different
even though they were from exactly same program/project.
The tail part of hexes are
So my observation is that PSoC Programmer keeps track of hex
by building history or something.
So I think that the hex will be same as far as no "re-compile" takes place.
In other words, I think that your PSoC was programmed with
different version of the same program/project between two files.
Unfortunately, the hex files are same version.
The original hex file that is programmed by PSoC Programmer is different from the read one that is read by PSoC Programmer.
Sorry for my short-sight.
Then I tried using PSoC Programmer 3.28.4
(1) Load from hex, using previous test1.hex
(3) Load from device
(4) Read to Hex -> test4.hex
(5) Quit PSoC Programmer
(6) Cycled power of my board
(7) Started PSoC Programmer again
(8) Load from device
(9) Read to Hex -> test5.hex
(10) Then compared test4.hex and test5.hex
In my environment, all test1.hex, test4.hex, test5.hex were same.
From your description, I was expecting some timestamp related differences
but with this test I could not reproduce the symptom.
Probably there was/were something between you programmed the original hex
and read out the data to file.
I have been asking that something from the beginning.
> I have been asking that something from the beginning.
I am very sorry about that.
I wonder in case you program a new hex, let's call it hexA,
and read out to a hex, let's call it hexB.
If these two are same or not.
But doing this may lose the current status.
Another thing I can think of is that the program itself may be affecting the value in the Flash ROM.
Such as using the flash as emEEPROM, etc.
Except those, I can not think of reasonable cause(s).
We need help from a Cypress expert for the explanation.
The line 518 is the metadata, which contains Silicon ID and other parameters.
Please refer to the CY8C4xxx, CYBLxxxx Programming Specifications, Section 2.3 Organization of the Hex File.
If the metadata is different, it would be difference of Silicon ID mainly.
When HEX file is generated by PSoC Creator, PSoC Creator puts ** revision in HEX file.
While, PSoC programmer reads the actual Silicon ID.
It became clear.
Thank you very much.