Using hex files as input files

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

Using hex files as input files

Jump to solution
1,051 Views
BK706
Contributor I

For my assembly program on the M68EVB912B32 board, I want to be able to use hex files as input. However, I don't know how to include my hex files in Codewarrior, nor do I know how to use them as input for my program. Does anybody have any idea how to use hex files as input files in Codewarrior?

Labels (1)
Tags (1)
0 Kudos
1 Solution
667 Views
CompilerGuru
NXP Employee
NXP Employee

About 1, I think the linker command is called HEXFILE, see the Build_Tools_Utilities.pdf manual for more information on this command.

The INCLUDE directive just includes the content as if it would be written directly in the prm file.

 

Daniel

View solution in original post

0 Kudos
5 Replies
667 Views
J2MEJediMaster
Specialist I

It's not clear what you want here. Do you:

 

1) Want to have your program read the files as data?

2) Use them as libraries that are linked to your program?

3) Have CodeWarrior download the files into flash?

 

Also, what version of CodeWarrior are you using?

 

---Tom

 

0 Kudos
667 Views
BK706
Contributor I

I want to have my program read the files as data. However, I don't know how to use them as libraries either, so I would appreciate learning how to do that as well.

 

Also, I'm using Codewarrior for Freescale HCS12(X) Version 5.9.0

0 Kudos
667 Views
kef
Specialist I

1) Intel hex files or Motorola S-records files can be included in your binary using INCLUDE file directive in your linker parameters PRM file. Then, initializing your C pointer with known addresses from your included hex or s19 files, you could access those included files.

2) You may use progam like Bin2C or bin2hex to convert binary files into C array. One of many google results: http://homepage.ntlworld.com/rik.griffin/bin2c.html

0 Kudos
668 Views
CompilerGuru
NXP Employee
NXP Employee

About 1, I think the linker command is called HEXFILE, see the Build_Tools_Utilities.pdf manual for more information on this command.

The INCLUDE directive just includes the content as if it would be written directly in the prm file.

 

Daniel

0 Kudos
667 Views
kef
Specialist I

Sorry, of course HEXFILE. INCLUDE is linker directive for CW for Coldfire.

0 Kudos