Why are there two s-record files, .s19 and .sx generated when S12 MCU compiling?

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

Why are there two s-record files, .s19 and .sx generated when S12 MCU compiling?

2,193 Views
007
Contributor II

Hello, why there are two s-record files, .s19 and .sx generated when S12 MCU compiling? .s19 file is always generated in spite of compiler option -B present or not, but .sx is generated only when -B present. I compared the two files, the main difference is as below example, for .s19, the s9 line does not have the correct start address, the address is always 0000, but .sx have the correct start address, which is _Startup() address.

And I tested -Ns build option, it controls the .s19 file output format, including S0/7/8/9 or not.

Could anybody explain the purpose of two s-record files? Which one do you usually use for program download? How to configure the .s19 file to include the start up address?

 

Project.abs.s19

S9030000FC

 

Project.sx

S903FAFC06

Labels (1)
Tags (3)
0 Kudos
Reply
6 Replies

1,269 Views
iggi
NXP Employee
NXP Employee

Hi dp,

There is a tool called SRecCvt used to convert from Paged CodeWarrior .sx files into Linear .S19 files for S12(X) microcontrollers with memory space beyond 64K bytes such as S12DG128 or S12XEP100 for example.

For many production tools what is needed is a Linear S19. This is the one you should use.


Here is the app note about Serial bootloader for S12(X) devices. There you can find the SRecCvt tool and related PDF.

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4258.pdf

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4258SW.zip

Hope it helps,

Regards,

iggi

0 Kudos
Reply

1,269 Views
007
Contributor II

Thank you, iggi!

0 Kudos
Reply

1,269 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi dp,

CodeWarrior uses s19 format to burning flash.

Best Regards,

ZhangJun

0 Kudos
Reply

1,269 Views
007
Contributor II

OK. But I still don't understand why .s19 file has no valid start up address in S7/S8/S9 line, yet .sx file has. I'm working on a bootloader. If the loader can't get valid startup address from the s-record data, I have to define a constant address in the code, that's not flexible.

regards,

dp

0 Kudos
Reply

1,269 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi dp.

16bit MCU store the startup address at reset vector 0xfffe:0xffff. when power on, MCU will get startup address from vector 0xfffe:0xffff. so start up address in S7/S8/S9 line is not necessary.

=======================================

this answer is for you, if it helps, please click on "correct answer" button. thanks!

Best Regards,

ZhangJun

0 Kudos
Reply

1,269 Views
007
Contributor II

For MCU program, it has two parts, one is bootloader, the other is app. Bootloader is always the start when MCU power on or reset. If there is no programming request during boot, bootloader will jump to app startup address, so the reset vector address is just bootloader address.

I have decided to define a constant App startup address in Bootloader code, also freeze App startup address by PRM file.

Thank you for the support!

Regards,

dp

0 Kudos
Reply