Forums

Generating S-Records using Cosmic Compiler for use with D-Bug12 Bootloader

Started by leclub_melusine July 24, 2003
I am trying to generate S-Records that are compliant with the D-Bug12
bootloader using the Cosmic chex utility. I have tried all the
command line options but always get a error message "S-Record
Code/Data Length Is Odd" when downloading using D-Bug12. I have
looked through the S-Record generated and some of the S2 lines appear
to be shorter than the others, i.e. defualt line size 32bytes. I
have tried modifiying the S-Records generated using the SRecCvt
utility provided with D-Bug12 but it does not seem to like the S-
Record format from the Cosmic compiler. Has anyone got any idea if
the Cosmic compiler will gererate S-Records compliant with D-Bug12 or
how to modify them so they are.




leclub_melusine wrote:

> I am trying to generate S-Records that are compliant with the D-Bug12
> bootloader using the Cosmic chex utility. I have tried all the
> command line options but always get a error message "S-Record
> Code/Data Length Is Odd" when downloading using D-Bug12. I have
> looked through the S-Record generated and some of the S2 lines appear
> to be shorter than the others, i.e. defualt line size 32bytes.

that's o.k. for a S-Record - only the bootloader needs aligned
records.

> have tried modifiying the S-Records generated using the SRecCvt
> utility provided with D-Bug12 but it does not seem to like the S-
> Record format from the Cosmic compiler. Has anyone got any idea if

sreccvt works well with Cosmic S-Records, I use

sreccvt -m 0 ffff 32 someproject.s19

Another possibility is http://sourceforge.net/projects/srecord - even
more powerful, but you don't need it.

Oliver
--
Oliver Betz, Muenchen


leclub_melusine,

You don't mention what your target MCU. However, for S12 devices,
D-Bug12 (and the bootloader) requires S-Records to begin on an even
address and contain an even number of bytes because the S12 Flash can
only be programmed an aligned word at a time. So you will need to run
the S-Record file generated by Cosmic's chex utility through SRecCvt.
The command line you need for SRecCvt will depend on the target MCU you
are using. For an S12 with 256K of Flash you would use:

sreccvt -m c0000 fffff 32 -o <OutFileName.S19> <InFile.S19>

for a 128K S12 Flash device, change c0000 to e0000

for a 64K S12 Flash device, change c0000 to f0000

Regards,
Gordon

leclub_melusine wrote:

> I am trying to generate S-Records that are compliant with the D-Bug12
> bootloader using the Cosmic chex utility. I have tried all the
> command line options but always get a error message "S-Record
> Code/Data Length Is Odd" when downloading using D-Bug12. I have
> looked through the S-Record generated and some of the S2 lines appear
> to be shorter than the others, i.e. defualt line size 32bytes. I
> have tried modifiying the S-Records generated using the SRecCvt
> utility provided with D-Bug12 but it does not seem to like the S-
> Record format from the Cosmic compiler. Has anyone got any idea if
> the Cosmic compiler will gererate S-Records compliant with D-Bug12 or
> how to modify them so they are. > -------------------- >
> ">http://docs.yahoo.com/info/terms/

--
===============================================================
Gordon Doughman Ph: 937-438-6811
Motorola Semiconductor Fax: 937-434-7457
Field Applications Engineer Pager: 800-759-8352 Pin: 1304089
Suite 175
3131 Newmark Drive
Miamisburg, OH 45342

Check out my HC12 book at:
http://www.rtcbooks.com/programming.php