Using hex files as input files

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

Using hex files as input files

跳至解决方案
2,236 次查看
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?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,852 次查看
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 项奖励
回复
5 回复数
1,852 次查看
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 项奖励
回复
1,852 次查看
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 项奖励
回复
1,852 次查看
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 项奖励
回复
1,853 次查看
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 项奖励
回复
1,852 次查看
kef
Specialist I

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

0 项奖励
回复