I have modified LPC21ISP code to read the flash memory of NXP controllers using serial communication. And i store the data into hex file.
But the hex file data doesnt match with the memory when read using flashmagic tool.
I have done uu-decoding of the data the i receive, before storing it to the hex file.
Also, the uu-encoded string that is transmitted while programming the flash memory, doesnt match with the uu-encoded data that i receive back.
I suspect that the address that i am trying to read the first code byte is wrong (0x0000).
I also tried reading the entire flash and look for pattern match with original hex file. But no pattern match.
If some one can possibly tell me where am i going wrong or where should i check?
PS: serial code, uu-decoding code working fine. uu-decoding code tested with hard coded data, works well.
"How does flash magic achieve this? any idea?"
I have already told you that. The user manual for the relevant NXP chip does mention explicitly how to control the interrupt vector remapping.
And I did write: "With that information, it's possible to turn off the interrupts, change back to a neutral mapping, read the first block of data and then map back to the original mapping again."
So where are you stuck? Have you downloaded the user manual? Have you located the relevant chapter? Is there some sentences there that you don't understand?