Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
Converting .abs file to s19 file
Ujesh M. May 2, 2016 at 06:47 AM (06:47 hours)
Staff: Takao Y.

  • Hi,

    How to convert a '.abs' file to an S19 file?

    I'm trying to flash a MC912DG128A using CProg12Z. I have just an '.abs' file received from the client. Googling around, I found that I need to convert this .abs file to an S record file in order to flash it using CProg12z.

    I have tried using the burner program, but it seems like the '.abs' file is not completely converted. Reasons why I think so are,

    1. The size of .abs file is 329 KB and the S19 file created from that is just 69KB in size.
    2. Even though the flashing completed successfully, the board did not work properly and failed in the tests after that.
    3. The board works fine when the '.abs' file is flashed using code warrior.

    Any help would be really appreciated.

    Note: I'm new to this field and so please excuse me if my doubts are too basic.


  • Greetings,

    The problem is that our software needs to use physical formatted files (PHY), not in logical format (ABS, ELF, S19).

    We have a converter to convert your logical files into physical format called LOG2PHY:

    1) ABS files are executable files that include the raw binary and the debugging information. This is why the file is much larger. S19 is just the binary.

    2) Not sure which algorithm you were using, but usually these S12 devices have both program flash (PFLASH) and data flash (EEPROM, DFLASH). If your binary covers both flash sectors, then you need to switch over to the other algorithm and program again. For example:

    - Choose PFLASH algo
    - Select my binary
    - Erase Module (only pflash erased)
    - Program (only pflash programmed)
    - Verify (verifies only, you guessed it, the pflash)
    - Choose DFLASH/EEPROM algo
    - Erase module (don't worry, it will not erase your pflash you just programmed)
    - Program
    - Verify

    3) Codewarrior uses logical format to program the chips and debug. This is why your ABS file works just fine.

    The questions you ask are great review for greenhorns and experts. I am glad you asked and I am happy to answer and help you out. Let me know if the converter worked for you. To help you solve any problems you run into, I highly suggest you use PROG12Z instead of CPROG12Z. PROG is the GUI version, while the CPROG is the command-line version. Only after you get it perfectly working in PROG should you move onto CPROG.

    Takao Yamada

    • Hi Takao,

      Thank you very much for your detailed reply. I appreciate it. I'm glad to know that the file size doesn't matter.

      I'm sorry for not so descriptive in my previous post.
      Actually I did converted the s19 to PHY using log2Phy(even before my first post)

      Following are the steps that I did (before my first post)
      1) Converted the abs file to S19 using burner.
      Following are the options that I set in the 'burner dialog'

      Input/output tab

      1) Selected the '.abs' file as 'Input File'
      2) Specified a '.s19' file as out put file.
      3) From the combo in the bottom left corner(near to Execute button), selected '1st word'

      Content tab

      1) Format = 'Motorola S'
      2) SRecord configuration Type = Automatic
      3) SRecord configuration Bytes per line = 32
      4) Data bus = 1 Byte
      5) Origin = 0
      6) Length = 10000
      7) Destination offset = 0

      This step generated an S19 file.

      2) Converted the S19 file to PHY file using Log2Phy. (File converted successfully and the '.extra' file was 0 KB)
      3) Loaded '912dg128A_128k.12P' algorithm.
      4) Loaded the '.PHY' file.
      5) Erased module.
      6) Programmed
      7) Verified module (VM)

      In this case everything completed successfully, but the board was not working properly and it failed in the tests.

      After this I googled more about the MC, Burner and SRecord formats and tried the following changes in the 'burner dialog'

      Input/output tab

      1) From the combo in the bottom left corner(near to Execute button), selected '1st word' (Previously this was set to '1 Byte')

      Content tab

      1) Changed SRecord configuration Type to S3
      2) Changed Data bus to 2 Bytes
      3) Kept Swap bytes un checked
      4) Set Length = 0x7fbff

      This step generated an s19 file. I converted that file to '.phy' file and flashed it using PROG12Z (Not CPROG12Z). In this case I got some errors in the verify module step. I ignored the errors and proceeded. After this the board worked as expected and all the tests were completed successfully.
      After this I tried to flash the same .S19' file using code warrior and it completed successfully without any errors.

      Could you please suggest what could be the reason for the VM failure? Whether I missed some thing in the burner conversion? I believe that it is not a good idea to ignore the 'VM' errors and proceed?

  • Greetings,

    When VM fails, usually it stops at a specific address in PROG. Do you know where this location is and have you taken a look at that location?

    What VM does is compares the memory with your s-record or PHY file. If they do not match, then it will give an error. This is usually caused by making changes after calling Program Module. Like programming a byte, or changing the security bits. If you called verify immediately after program, then this is a cause of concern. Use the command "show module" in PROG to look at memory on the chip. Then use a text editor to look at your PHY file and check that memory location to see what may be different.

    Takao Yamada

  • Hi Takao,

    I called verify module immediately after program module.
    The VM reported errors for values in the locations 013FFC and 017FFC (Also it reported the same error for some other locations also. All these locations were having value 'A0'. But the expected value was '3F'. I gave continue after each error message.).

    I first erased the module and then programmed it using PROG12Z and the PHY file. In that case the value in both 013FFC and 017FFC locations were 'A0'. I could see a series of 'AO' 'DC' pattern before and after these addresses.

    Then I erased and programmed the module using Code warrior and the S19 file (the same s19 file which was converted to phy for PROG12Z). And after that run VM in PROG12Z using the 'PHY' file which was used for flashing previously. In that case the VM completed successfully. I had a look into the address locations, 013FFC and 017FFC. Both the locations were having the value '3F'. Also the addresses before and after these addresses were blank ('FF').

    I tried the above again after calling reset module also. But the result was same.

  • Greetings,

    What version of PROG12Z do you have?

    When you use Codewarrior to compile, does it generate a GLO file? What happens if you use that file with PROG12Z? Do you get the same results when using the converted PHY file?

    Takao Yamada

  • Hi Takao,

    Sorry for the delayed response.
    The programmer that I have is an older one, Prog12z 1.71.

    Actually I could find an alternative solution for the problem that I was facing. First I programmed the module using Code warrior and then I did Upload Module (UM) from Prog12z. This created the .PHY file that I wanted.

    I would like to Thank you for all your support.

    Thanks & Regards

    Ujesh Mohanan

Add comment

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

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