Copy code from my target?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Copy code from my target?

2,422 Views
JohnnyP
Contributor III

Hi to all.

I'm programming a noise cancellation algorithm on the 9s12C32 processor using CodeWarrior v5.5.1272 with the True-Time Simulator and Debugger, V6.1

I started the project a few years ago, got Proto #1 up and running, then had to set it aside for four years due to my wife's illness.

Now I am working with Proto #2.  I programmed it with the most recent version of my algorithm.

I have both prototypes running side by side on my test bench, using the same input signal, but the output from Proto #1 is a little cleaner.

My problem is version control.  I don't know what version I used in Proto #1.  I will often comment out or add code and test it as I go, then don't make a new version and document exactly what is in the chip.

Is there a way to read or copy the code in Proto #1?  It's unsecured.

Would I be able to make sense of it so I can update my source code?  In the "code" column is the number 620, so I guess it uses 620 bytes?

Thanks for your help.

0 Kudos
4 Replies

2,407 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi JohnnyP 

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 code from chip.

 

Your can use the SAVE command to save a specified block of memory to a specified file in Freescale 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.

 

Have a nice day

Jun Zhang

0 Kudos

2,398 Views
JohnnyP
Contributor III

Does that mean that me, or a software pirate, cannot reconstruct assembly code from the S19 record?

If so, then the only purpose of securing the chip is to prevent a software pirate from copying and using your S19 record?

0 Kudos

2,393 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi JohnnyP 

Regarding to these two questions.

1, No, you can't. as I said "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 code from chip."

2. your understanding is correct. 

 

0 Kudos

2,400 Views
JohnnyP
Contributor III

Thanks you very much.

0 Kudos