Embedding resources in executable

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

Embedding resources in executable

跳至解决方案
2,099 次查看
yanbellavance
Contributor I

I would like to embed a binary file as constant data in an executable.  Is there a way to do this with the Linker command file?  Basically the binary file is just raw data that I would like to access as an array in my executable.  I am using CodeWarrior for MCU 10.5 on a bareboard project (MCF54451).  Feel free to ask for more clarifications.

标签 (1)
1 解答
1,889 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Yan:

What is your final purpose, to have that array in your device's memory or just in the executable (elf) file?

There is an INCLUDE linker directive that allows you to specify a binary file. Please give a check to section 14.7.7 of the attached document. Just make sure to include the path of the binary file in the linker library search paths. This is done from Project -> Properties -> C/C++ Build -> Settings -> ColdFire Linker -> Input.

If you just need to append a binary file to your executable, maybe the EHEP Eclipse plugin described at the next link will be useful:

5 Best Eclipse Plugins: #4 (EHEP) | MCU on Eclipse

Hope this helps.


Regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,890 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Yan:

What is your final purpose, to have that array in your device's memory or just in the executable (elf) file?

There is an INCLUDE linker directive that allows you to specify a binary file. Please give a check to section 14.7.7 of the attached document. Just make sure to include the path of the binary file in the linker library search paths. This is done from Project -> Properties -> C/C++ Build -> Settings -> ColdFire Linker -> Input.

If you just need to append a binary file to your executable, maybe the EHEP Eclipse plugin described at the next link will be useful:

5 Best Eclipse Plugins: #4 (EHEP) | MCU on Eclipse

Hope this helps.


Regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,889 次查看
yanbellavance
Contributor I

This is what I was looking for.  Thank you very much :smileygrin: