Hello,
I am trying to use SRecCvt program to convert s12g192app.sx S Record file to s12g192app.s19 format so that it can be programmed using PROG12Z programmer.
The .sx file flashes and works fine when I flash the ECU using Codewarrior IDE over P&E USB Multilink.
However if .s19 file is flashed using PROG12Z programmer, it flashes okay, but ECU doesn't function as expected.
Trying to figure what could be wrong ?
Someone mentioned to me that - "Freescale decided to drop support for the large memory model (as
seen in the .s19 file)" as quoted. Is this true, if so just wanted to know where it is referenced in the Freescale documentation? I am questioning the statement because the SRecCvt GUI version drop down menu has S12G128 option.
Any feedback is appreciated.
Thank you.
Ramakanth.
Hi Ramakanth,
I am slightly confused with your question.
The memory model (small, banked, large) has almost nothing to do with memory format in s record file.
The memory model defines how CPU will access to variables and code.
SMALL – everything in 64kB address space. This is typically used only for small S12(X) derivatives with up to 48kB of Flash
BANKED – most typical. The BANKED memory model is identical to the SMALL memory model in terms of variable allocation. Part of your code may be allocated to extended memory, thus breaking the 64 Kilobyte limit. If a function is in extended memory, it has to be called differently than a function in non-banked memory.
LARGE – code and variables are accessed by paging. Because paged variables are not directly supported by the HC(S)12 instruction set, the LARGE memory model has significant overhead compared with the SMALL or BANKED memory models.
The Large memory model may be selected by editing compiler options (wizard don’t have this option), but it doesn’t have any sense for S12G. Please use banked memory model for S12G derivatives with more than 48kB of flash.
The standard CW project does not generate *.sx file. The standard CW project use burner.exe and generate *.s19 and *.phy files.
The generated s19 file contains NVM memory content with addresses in Logic (Banked) memory format (PPAGE value followed by 16 address). The generated phy file contains NVM memory content with addresses in Global (Linear) memory format. So, you may use an s19 file with CW debugger and phy file with the PROG12Z programmer.
For more details about differences between address formats, please look at attached memory map in excel file.
The s19 file may be optionally converted by SRecCvt or Log2Phy (from PEmicro) tools.
The S12G240 derivative is just simply newer than the latest version of the SRecCvt tool at NXP pages. You may edit DeviceInfo.Dat file and add S12G240 derivative. For example, add the line:
S12G240, 8000, BFFF, 1, 15, 0400, 13FF, FF, 32, s1218
I guess that you use the S12G128 option in SRecCvt GUI for converting the S12G240 s19 file. In that case, only some of flash pages (PPAGE 0x08~0x0F) was converted and that may be a reason why converted S12G240 code do not work - there missing flash data with your code in the output file.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------