Content originally posted in LPCWare by jc.wang on Mon Oct 08 22:47:47 MST 2012
I tried and wrote a program does exactly what FlashMagic do: to write a .hex file to the nxp mcu. Everything seems fine, but the target just can't start...
I tried to figure out what could be wrong by:
[LIST=1]
[*]Write the .hex to the target using FlashMagic.
[*]Read the entire flash of the target back, save it as A0.bin (using my own program)
[*]Write the same .hex using my program.
[*]Read the flash back, save it as A1.bin
[*]Compare A0.bin & A1.bin
[/LIST]
I found the only mismatch is at address offset 0x1C~0x1F:
[LIST]
[*]A0.bin: 0x1C: F9 DA FF EF
[*]A1.bin: 0x1C: 00 00 00 00
[/LIST]
But I checked the .hex file, at offset 0x1C, data should be 00:
:1000100000000000000000000000000000000000E0
What was wrong? :confused:
At the second last line of the .hex file, it is:
:040000030000014DAB
According the HEX file format definition, the record type is 03, which I don't know how to interpret it, thus I ignored it. Is it the reason that cause the problem? How should I interpret this line? :confused::confused:
Any hint would be appreciated!