Error Programing *.S files using JTAG

Hi, I am curently working on a project using 568013 and was able to successfully program *.S files using JTAG so far. Then, after a while, I was no longer able to program my *.S files using JTAG but my *.ELF files run normally. I am getting the error:

"CHawkV2::VirtualImage::LoadFile: S-Record data must be given in whole WORDS"

I found the below work around regarding the error above but it was not able to help.

Please uncheck the option "Generate Byte Addresses" in the M56800ELinker panel of target setting, because this option is not supported by56800E Flash Programmer.

If you have already done this, the issue may be due to some stringscontaining even number of characters. For example, the following stringhas 4 characters:Char *str ="1234";However, after being compiled with the compiler, the str has 4characters plus an ending byte of 0.So the str actually has 5 bytes in the memory. And the linker generatesa S-Record for only 5 bytes, not 6 bytes (in whole words).

There are two workarounds as below to solve this issue,1) Simply add one byte at the end as 00 as below in your S-record file:Original line: S306020000B40043After modification: S307020000B4000042It should work.

2) This is CW issue, and when you have even number of chars in a string.You also can workaround it by adding one more char '\x00' in your stringwhich has even number of chars.

This problem has been fixed in the latest patch (CodeWarrior 8.1), seethe comments below in CW8.1 release note.* MTWX20712: Linker adds padding only when user requests SRecgeneration. Linker also issues a warning when padding sections.

I tried the above suggestions but I was still not able to program usingJTAG. Before Edit: S7050000005C9E

After Edit: S7060000005C009D

I tried the solution on the second to the last line of my S fileinstead and was able to program using Flash but some errors in thememory of my code occured like being unable to write to flash (via PMBus).

Before Edit: S30E000018ACCBE6E1E8EFFAFDF4F3E6 S7050000005C9E

After Edit: S30F000018ACCBE6E1E8EFFAFDF4F300E5 S7050000005C9E

Am I doing this wrong or are there any other suggestions on a workaround with this? How can I fix this issue if I am using CW ver7.3and can't upgrade to 8.1 because of some limitations on the DSC ICswe are using?

Please use Freescale on line support web page. - Go to following URL: http://www.freescale.com/TechSupport - Click on Submit a Service Request. You will come to a login page. - You can submit your request through the web from there.