S-records for bootloader generated with CW 4.5 for 9S12XD512 MCU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S-records for bootloader generated with CW 4.5 for 9S12XD512 MCU

Jump to solution
3,163 Views
Pitrunner
Contributor I
Hello everybody,

may be somebody has some experience with s-records generated with code warrior.
I'm using CW Develop. Studio HC12 4.5 build 6037 and the µC 9S12XDP512.
I try to program a bootloader and I go by a mix of the application notes AN2183 and AN1718.
I'm almost ready but got now problems with flw.
When I try to download the s-record generated with CW to the µC via serial interface, I got a error message like "S-record code/data length is odd". This is according my code I programmed.
So I examined the s-record and found lines like flw. S213FDA240000005CBFDCBA1CB61C585C3A5C47EB4

Now my questions. Is there any possibility of settings in CW to avoid odd byte length or have I to use
the SRecCvt.exe tool to generate a linear s-record, that I read in another post.
I would appreciate any explanation hints for my question. Thanks in advance.


J2MEJediMaster added CW version and MCU type to header



Message Edited by J2MEJediMaster on 2007-05-30 09:55 AM
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
964 Views
CrasyCat
Specialist III
Hello
 
There is no option or command in the burner (as far as I know) allowing you to align the addresses.
 
But looking onto the Freescale web site I found a utility SRECCVT which should be able to do the trick.
 
Look at following URL
and look for SRECCVTSW.
 
This tool has an option allowing to add padding bytes to ensure S record length is even.
 
CrasyCat

View solution in original post

0 Kudos
Reply
5 Replies
965 Views
CrasyCat
Specialist III
Hello
 
There is no option or command in the burner (as far as I know) allowing you to align the addresses.
 
But looking onto the Freescale web site I found a utility SRECCVT which should be able to do the trick.
 
Look at following URL
and look for SRECCVTSW.
 
This tool has an option allowing to add padding bytes to ensure S record length is even.
 
CrasyCat
0 Kudos
Reply
964 Views
Pitrunner
Contributor I
Hello CrasyCat,

thanks for your advice with the SRecCvt converter.
In the meantime I invest a little bit time to understand the generated s-records from CW 4.5 and know now why I got an odd s-record. My whole program is written in assembler and I use also sections for data and constants. The sum of the constants in the constant section was by accident odd. To prevent this case I build in a dummy constant and obtained an even s-record.

Best regards,

Pit
0 Kudos
Reply
964 Views
sunil99
Contributor I
hi ,
 
         it seems you have experience in using codewarrior and MC9S12XDP512 ,so please answer my question so that the problem which i am facing form a week can be solved .how to write our own linker file for code warrior of Mc9s12XDP512.because its generating its own linker file but its not able to handle
CAN interrupts so i want to write my own linker file so can you suggest ways how to write my own linker file to handle interrupts i am writng CAN driver and its not able to locate my vector.c which contain interrupt handling routines .so please provide me guidance or any links or any suggestions to write my own linker file for handling CAN interrupts.
 
thanks in advance
bye
sunil
0 Kudos
Reply
964 Views
Pitrunner
Contributor I
Hi Sunil,

I'm not sure if I can help you but I try. I do not use CAN and also not XGATE . Further my whole code is written in assembler. Attached you will find my linker file. As you can see I have a segment where I definded the vectors.
Inside my assembler code I defined a section like flw. " VectorTable:    SECTION " where I placed the ISR.
Thats' s all. I think you have to do the same technique  if you 're  programming  C  code.

reagrds
Pit


Copy of P&E_Multilink_CyclonePro_linker.prm
Message Edited by t.dowe on 2009-09-03 06:01 PM
0 Kudos
Reply
964 Views
Alban
Senior Contributor II
PLEASE Sunil, do not ask the same question mutliple times, otherwise I will delete them ALL.

We thank you not to crosspost or post the same question multiple times or in multiple boards.
This divides the replies and causes more work for people who want to answer.


This question is treated in the 16 bit board under:
using code warrior for MC9S12XDP512 how to write my own linker file for it. i am not using XGATE

Any reply here about this problem will now be deleted !

Alban.

0 Kudos
Reply