HI, I'm using Metrowerks CW v3.1 with v6.1 True-Time Simulator, working with a 9s12c32.
I revived an old project and forget what version of my code I have working on the target pcb.
Is there a way to read the code, so I can compare it to my project files?
I don't know if it makes a difference, but I use assembly.
I connected my PE Multilink USB programmer and powered up the board, then established a connection and clicked F5, and it's running.
The True-Time Simulator is showing the last project in the "Source" window, which is unrelated to the code I want to read from the target.
I don't want to accidentally erase the device.
Thanks for any help.
JohnP
Jun:
You are talking over my head, sorry.
The target is running the code it was programmed with two years ago, but the True-Time Simulator's "Source" window shows the code from a different product that I was working on yesterday.
How do I copy the code from the target back into one of the windows on the Simulator so I can read it?
JohnP
Hi JohnP,
Your target If you don't have the source project/code, you can't upload source code from the target.
The code that written in chip is an optimized binary code but not your originally written assembly. The chip never records your original assembly code. So it is not possible to get your original assembly or c code from chip.
Your can use the SAVE command to save a specified block of memory to a specified file in S-record format. Reload the memory block later using the load S-record (SREC) command. SAVE command is used in debugger command window.
Eg.
in>SAVE 0x1000..0x2000 DUMP.S19 ;A
This way can can read binary opcode from flash to s19 file. Appends the memory range 0x1000..0x2000 to the DUMP.S19 file.
Hope this helps,
Jun Zhang
Jun:
I see. Thanks very much for the explanation.
So, a pirate can duplicate the s19 record if he finds a product with an unsecured chip, but he won't know how the program works. At least, not right away.
JohnP
JohnP
Yes, it's correct.
Best Regards
Jun Zhang
You have a given project, you don't know which build of compiler built it.
I suggest you check the map file, normally the compiler information is recorded there.
or you can also use decoder.exe under your CW install to decode its abs file, checking the compiler version.
if you still can't get this information anyway, create a private ticket to nxp support team, sending them your project, they will help you.
Best Regards
Jun Zhang