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

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

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

Jump to solution
2,664 Views
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

Labels (1)
0 Kudos
1 Solution
711 Views
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)

View solution in original post

0 Kudos
2 Replies
712 Views
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 Kudos
711 Views
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 Kudos