I am using S12ZVL microcontroller and using Freescale AN4723 bootloader to flash. I have an intermittent issue with Flashing. I am using cosmic compiler and Zap Debugger. The cosmic generated S19 file is not in the address order, not every is 37 byte long. Wnen I flash this cosmic generated S19 file, the application does not run.
I tried the following:
1. I downloaded the same S19 file using ZAP debugger and then Uploaded Form 0xFF8000 to 0xFFE3FF (My bootloader starts at 0xFFE400). Then I flashed this uploaded S19 file using AN4723 bootlader. It works fine
The uploaded S19 file is in the Address order and every single line is 37 bytes long.
2. I downloaded the cosmic generated S19 file using AN4723 booloader (the application did not run). Then I used ZAP debugger to upload Form 0xFF8000 to 0xFFE3FF. Then I used AN4723 bootloader to flash this uploaded S19 file again. Now the application works fine
I do not understand Why the application fails to run when I just flash the cosmic generated S19 (not in address order and some lines are not 37 byte long). I verified the flashing using ZAP debugger verification, verification was successful.
Can someone explain me where the problems occurs?
Thanks.
Thanka
Hi Thanka,
Unfortunately, you didn’t attach your S-record file.
Per your description, the problem is in data order in generated S-record file.
I can imagine two potential issues:
So, you have several easy…tough options how to fix it. For example:
http://www.nxp.com/webapp/sps/download/license.jsp?colCode=SRECCVTSW
The SRecCvt tool is much older than the S12Z core, therefore user GUI cannot be used in our case. However, we still can use SRecCvt tool directly through the command line. For example:
c:\Tools\SRecCvt_v1.0.31\SRecCvt-GUI\sreccvt -hc12 -m 100000 FFFFFF 32 -o "D:\Workspace\MY_PROJECT\FLASH\Output.S19" " D:\Workspace\MY_PROJECT\FLASH\Input.S19"
Please update your paths…
This command converts the Input.S19 file into Output.S19 file. The S-records will contain exactly 32bytes and the S-records will be placed in subsequent order.
The nice thing is that you may use this command directly as post build step (I am not sure whether Cosmic compiler has such option) and convert generated S-record file automatically.
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!
-----------------------------------------------------------------------------------------------------------------------