PEmicro logo
Cart New Account Login

Logo image
HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
Debugging flash/target processor HCS12
Freddy F. Jan 2, 2020 at 09:48 PM (21:48 hours)
Staff: Takao Y.

  • Hey guys, 
    I just bought these tools from P&E, the multi-link universal and the ICD12Z debugger, I am working on trying to debug the Flash and EEprom on the target CPU that I have, which is the HCS12 architecture. I have my flash and eeprom files and to my understanding, I have to load the object/debug files into the debugger so I can use the debuggers features like breakpoints and stepping through the code. I loaded a .s19 file, and the debugger loaded the file properly but after it tries to download the object data and then I get an error: communicating to the target processor - try a reset. How can I load my files and have them pause or stop so i can debug the assembly? Do i load the files separately or do i have to load them into one file and load that file into the debugger? If anyone has any idea on how to do this, any help will be appreciated. Thank you!


  • Greetings,

    S19 files do not hold any debug information. So all you are going to see is disassembly. You must have an ELF file or MAP file that holds the debug info. Check the files that are generated by the compiler/assembler so that you can debug.


    • At first i used an elf32-little file and i got the Error - ELF file is not Big endian so i converted to an elf big endian file and then got the Error - File is not an executable ELF file. Seems like at first it did recognize the elf file but then it didn't? I don't know why.

  • Yes I know that and I was first trying to run an ELF file but the debugger wouldn't recognize my file type. I have a .bin file and I converted it to a .elf file and I got the following error message: Error - File is not an executable ELF file. What assembler/compiler do you recommend using so that I can convert my .bin file into an ELF debugger file?

  • Greetings,

    Let us stick to ELF file that you originally tried to use. I want to avoid converting files. What error or problems were you getting when trying to use this file?


  • Greetings,

    Where are you generating this ELF file? What is your compiler?

    Typically HC12 architecture is developed on Classic Codewarrior 5.x by NXP/Freescale.

    Takao Yamada

    • I'm using a linux library/compiler (objcopy) to convert from .bin to .elf since Codewarrior does not accept .bin files.

    • Also why do I need an ELF format for a 16-bit architecture?

  • Greetings,

    Where is this BIN file coming from though?

    Converting from BIN to ELF does not give you debug information. BIN and S19/srec have no debug information. So I need to know how the original BIN file was generated. You need to start from there.


    • We read the bin file from the chip itself therefore we don't have the source code for it but we want to check what the firmware is doing and how.

  • Greetings,

    Then you need to learn how to read disassembly because that is all you got. There is nothing else you can do. Without the source you are on your own in reverse engineering it. No conversion is going to give you the debug information.


Add comment

   Want to comment? Please login or create a new PEmicro account.

© 2021 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement