Add an S19 file to a CodeWarrior project and have it compiled to a specific flash address.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Add an S19 file to a CodeWarrior project and have it compiled to a specific flash address.

跳至解决方案
3,647 次查看
ericpaulinbsc
Contributor I

Hello everyone,

 

I hope this is the right forum for this question, if not, I'm sorry.  I am using the AN3275 - S12 All-Access Bootloader for the HCS12 Microcontroller Family.  So I have my application's CodeWarrior project and the boot loader's CodeWarrior project.  What I would like to do is add the .S19 file generated from the boot loader's project into the application's project.  I want the file to be written, basically as a text file, at a specific Flash address, for example @ 0x348000, at compile/build time.

 

The idea is when the application starts, it looks for a pattern in my non-volatile memory and if it doesn't find it then overwrite the boot loader with what is at 0x348000.

 

I'm using CodeWarrior 5.9 for S12(X) and the MC9512E256 microcontroller.  Also, for my application's project, I use the Processor Expert plugin to generate code.  I've attached the prm files of both projects to should the memory configuration.  The file application.prm is from the application's project which is automatically generated from the Processor Expert plugin.  The file P&E_ICD_linker.prm is from the application note (AN3275).

 

 

Thank you very much,

 

 

 

Eric Paulin

Original Attachment has been moved to: P&E_ICD_linker.prm.zip

Original Attachment has been moved to: application.prm.zip

标签 (1)
0 项奖励
回复
1 解答
1,694 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Eric,

In 8/16bit Codewarrior Linker Parameter file, you can add an "HEXFILE" command. This allows you to link, together with the code of the current application, with an external s-record. Both the s-record from your project and the s-record linked with the HEXFILE command will be downloaded into your target!  

This is useful if you wish to program your device with two applications in one single programming time. This becomes very handy for example when you want to include in your device memory, a bootloader to be used in the future. One single programming effort will burn two s-records.

Info on this very simple to use command, can be found on the Build_Tools_Utilities manual, search the document with keyword “HEXFILE”, you can see a section detail this issue.

For example in application prm file, add below. The boot code will be inserted to application s19 file

HEXFILE    boot.s19

(boot.s19 is located in the current project folder root path)

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,695 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Eric,

In 8/16bit Codewarrior Linker Parameter file, you can add an "HEXFILE" command. This allows you to link, together with the code of the current application, with an external s-record. Both the s-record from your project and the s-record linked with the HEXFILE command will be downloaded into your target!  

This is useful if you wish to program your device with two applications in one single programming time. This becomes very handy for example when you want to include in your device memory, a bootloader to be used in the future. One single programming effort will burn two s-records.

Info on this very simple to use command, can be found on the Build_Tools_Utilities manual, search the document with keyword “HEXFILE”, you can see a section detail this issue.

For example in application prm file, add below. The boot code will be inserted to application s19 file

HEXFILE    boot.s19

(boot.s19 is located in the current project folder root path)

0 项奖励
回复
1,694 次查看
trytohelp
NXP Employee
NXP Employee

Hi Eric,

Do you want to merge the bootloader and the application in same S19 file ?

The http://www.freescale.com/files/microcontrollers/doc/app_note/AN4258.pdf will provide some info about bootloader.

Chapter: 8 How to merge the user application and bootloader

Regards

Pascal

0 项奖励
回复