Hello guys,
I've been requested to flash (using Hiwave / HC12MultilinkCyclonePro) a program for S12G128.
I've got one project for which Flash starts at 0x88000 and which can be flashed without any problem; and a .mot file (I don't have the project only the file) with a start @ at 0x20000.
Whatever I do (reconfiguring Memory Map), flash always fails "No memory at this address".
People whom provided me the mot file are using another system (IC3000) and says no problem to flash.
Does anyone have an idea/advice/solution ? Thanks in advance.
André
Solved! Go to Solution.
Hi Andre,
I am glad that main issue was solved.
Thank you for information.
I am not sure why CW debugger don’t accept S record file with global addresses. I guess that it will have something to do with history and debugger design. In fact global addresses are more used until new S12(X) with 180nm technology comes.
On opposite side, some of PE tools like CyclonePro in standalone mode need records only with global addresses. Standard S19 files from CW will be not accepted and they need to be converted for PE tools as first. PE tool for conversion names Log2phy. However this tool could convert s records only in one way direction – from banked to linear.
Accepting only one address format could be simply way how to ensure that debugger will understood s record format.
BTW: CW could directly generate s record file with global addresses. Rules for creating s record files are defined in burner.bbl file inside your project. More details about bbl could be found in "c:\Program Files (x86)\Freescale\CWS12v5.1\Help\PDF\Build_Tools_Utilities.pdf" document.
It seems that file from your customer contains also any other data than .S2 format with addresses from 0x20000 to 0x3FFFF. Therefore conversion failed.
Please look at attached file with memory map in excel file. I hope it helps you.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Andre,
Problem is just with address format.
CodeWarrior debugger (hiwave.exe) could work only with images where addresses are in banked (logical) format (PPAGE+address in 64kB address space).
Your .mot file contains addresses in linear (global) format.
You need convert this file into banked format for use with hiwave.exe.
Please download SRecCvt tool:
http://www.freescale.com/webapp/sps/download/license.jsp?colCode=SRECCVTSW
and run SRecCvt-GUI.exe
Select S12G240 device, input file format Linear, your *.mot file as input file 1, output file format Banked.
If you don’t select output file, result will be stored as Out.s19 at the same directory as input file.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Radek,
First, your downloaded file made my PC crashed.
After a retry, it worked. I transformed the file in .s19 and flashed it using hiwave but
And also, even if I didn't checked the "automatic Run after load" it seems it did and I wasn't able to to stop it except by switching off the power.
After an unsecure; I read memory and I wasn't able to see any code in.
Any advice ?
André
Hi Andre,
It seems that there are some problems with paths.
Please create new empty project for S12G128 and load it into MCU.
If loading will be not work due to security, please unsecure it by Code Warior debugger menu ->MultilinkCyclonePro->Unsecure…
If not work you can use unsecure12 from P&E:
http://www.pemicro.com/downloads/download_file.cfm?download_id=16
Unsecure_12 Help Files:
http://www.pemicro.com/downloads/download_file.cfm?download_id=14
Note: For downloading is necessary registration.
After that you could use debugger for loading customer code. However prior that please additionally check s19 file:
If this file contains any data at address 0xFFFF08..0xFFFF0F(0xFF08..0xFF0F for S1 records) except unsecure byte 0xFE at address 0xFF0F, please add command “FLASH NOUNSECURE” into preload command file (P&E_Multilink_USB_Preload.cmd if you use PE Multilink).
This will cause that security byte will be not programmed prior loading code into flash.
For more information about flash security, please look at document:
https://community.freescale.com/docs/DOC-93803
If s19 file contains any data at address 0xFF0E (FOPT register), please add command “wb 0x03c 0x00 //disable cop” into reset command file (P&E_Multilink_USB_Reset.cmd if you use PE Multilink).
This will cause that watchdog will be disabled after every reset caused by debugger.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks Radek,
I got some help from P&E support and I was able to program my part using their Tools PROG12Z
Have a nice week end
Andre
Hello Radek,
Thanks for those links which are interestings.
The pathes problem was solved by filling "command" menu correctly.
anyway, after programming the PC was frozen, so I lost settings.
The GUI provided by P&E (Prog12Z) helped me to flash my ECU with the .S2 file provided by my customer without and work on.
So, the root cause of this topic is solved, but other questions raise.
From my customer file (.S2 format with addresses from 0x20000 to 0x3FFFF) I was unable to flash it using Freescale Tools - Even when I tried to convert from Physical to logical (I got errors of write "out of range")
With Prog12Z, no problem.
I would like to understand why ?
So, Is it possible to upload (dump) the flash content using Hiwave (so that I can flash the ECU with Prog12z, upload with Hiwave and compare S19 updloaded with s19 converted).
And do you have a routine that gives logical address corresponding to physical address and vice versa : for example, you said that range 0xFF08..0xFF0F should be empty. But where is 0xFF08..0xFF0F in a 0x20000-0x3FFFF range ?
Kind regards,
André
Hi Andre,
I am glad that main issue was solved.
Thank you for information.
I am not sure why CW debugger don’t accept S record file with global addresses. I guess that it will have something to do with history and debugger design. In fact global addresses are more used until new S12(X) with 180nm technology comes.
On opposite side, some of PE tools like CyclonePro in standalone mode need records only with global addresses. Standard S19 files from CW will be not accepted and they need to be converted for PE tools as first. PE tool for conversion names Log2phy. However this tool could convert s records only in one way direction – from banked to linear.
Accepting only one address format could be simply way how to ensure that debugger will understood s record format.
BTW: CW could directly generate s record file with global addresses. Rules for creating s record files are defined in burner.bbl file inside your project. More details about bbl could be found in "c:\Program Files (x86)\Freescale\CWS12v5.1\Help\PDF\Build_Tools_Utilities.pdf" document.
It seems that file from your customer contains also any other data than .S2 format with addresses from 0x20000 to 0x3FFFF. Therefore conversion failed.
Please look at attached file with memory map in excel file. I hope it helps you.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks
Have a nice day
Andre