Hello, I have a target board with a MC9S12XEP100 chip. The flash of the MCU chip is un-protected and un-secured. I want to get the machine code file or assembly file (*.abs, or *.s19). What should I do?
PS: I have succesfully connected the target board using the BDM (P&E USB Multilink Inerface) via the software - hiwave.exe, and see the contents of the Flash memory, as well as the Assemble codes in the Windows of "Memory" and "Assemble" of the hiwave.exe software, respectively. But I don't know how to save them as a *.abs file or a *.s19 file. The copy command cannot be used in the Windows "Memory" or "Assemble" of the hiwave.exe software
Solved! Go to Solution.
The code programmed into memory of a chip is an optimized binary code but not originally written assembly. The chip never records your original assembly code. So it is not possible to get your original assembly code from chip.
We can use the SAVE command to save a specified block of memory to a specified file in Freescale S-record format. Then we can reload the memory block later using the load S-record (SREC) command. The SAVE command is used in debugger command window.
E.g.
in>SAVE 0x1000..0x2000 DUMP.S19 ;A
This way we can read binary opcode from flash to .s19 file. It appends the memory range 0x1000..0x2000 to the DUMP.S19 file.
We can use decoder.exe tool to decode .s19 and see the code in assembly-pseudo, but it is not real assembly format. This attribute depends on .s19 and .lib itself but not decode tool
The code programmed into memory of a chip is an optimized binary code but not originally written assembly. The chip never records your original assembly code. So it is not possible to get your original assembly code from chip.
We can use the SAVE command to save a specified block of memory to a specified file in Freescale S-record format. Then we can reload the memory block later using the load S-record (SREC) command. The SAVE command is used in debugger command window.
E.g.
in>SAVE 0x1000..0x2000 DUMP.S19 ;A
This way we can read binary opcode from flash to .s19 file. It appends the memory range 0x1000..0x2000 to the DUMP.S19 file.
We can use decoder.exe tool to decode .s19 and see the code in assembly-pseudo, but it is not real assembly format. This attribute depends on .s19 and .lib itself but not decode tool
Thank you for the nice reply. I can have a good sleep tonight. Thank you