Embedding resources in executable

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

Embedding resources in executable

Jump to solution
692 Views
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.

Labels (1)
1 Solution
484 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
485 Views
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 Kudos
484 Views
yanbellavance
Contributor I

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