I am using CodeWarrior 10.6 (CW), with gcc, for a Kinetis project, with MQX 4. I want to include an external binary file from another project and have it linked into this project's output. I read a number of PDFs and forum posts, but I have found the following problems: In the linker script/command file (.ld), the INCLUDE command here means "include another .ld script", NOT "include a binary file". And, the commands TARGET and OUTPUT_FORMAT are NOT recognized by the linker (arm-none-eabi-gcc); they only cause syntax errors.
Is this possible in this environment?
Solved! Go to Solution.
If you want to do it with the linker, then there are many possible (maybe more) approaches:
- use a binary include in the as (assembler). This creates a object file you can link with
- use the objcopy to create an object file (See as well Converting a Raw Binary File into an ELF/Dwarf File for Loading and Debugging | MCU on Eclipse on that subject)
- see Include binary file with GNU ld linker script - Stack Overflow
I hope this helps,
Erich
If you want to do it with the linker, then there are many possible (maybe more) approaches:
- use a binary include in the as (assembler). This creates a object file you can link with
- use the objcopy to create an object file (See as well Converting a Raw Binary File into an ELF/Dwarf File for Loading and Debugging | MCU on Eclipse on that subject)
- see Include binary file with GNU ld linker script - Stack Overflow
I hope this helps,
Erich
I've been searching and trying so hard to get the linker commands to do what I want that I didn't even look for alternative ways. I'm sure that one of your suggestions will work since it seems the linker commands themselves fall short (despite the fact that the "MCU_Kinetis_Compiler.pdf" that came with the CW installation says "INCLUDE" handles binary files). Thank you. And let me say that it is an honor to have you reply to my inquiry; your MCU/Eclipse website has been helpful many times.