jul,
I am utterly amazed and befuddled by the gaping hole of accurate information on this subject given that this MIGHT be a somewhat common requirement in system firmware.
The CodeWarrior manuals have more than a couple of gaps in their many sections, watch your step.
Follow these directions...
1) open the 'Settings' window for the project
2) move to the 'File Mappings' tab
A) add the file extension type ('.img' for this example)
B) set 'Compiler:' field to 'None'
C) leave the 'File Type:' field empty
D) set 'Edit Language:' field to 'None'
E) set 'Flags:' to 'Resource File'
F) press the 'Add' button
G) press the 'Apply' button
2) move to the 'Access Paths' tab
A) select 'User Paths'
B) add the path to the binary file, and ensure that a checkmark is in the left column next to that path
C) select the checkbox labelled 'Always Search User Paths'
3) in the Linker Command File (.LCF) DO NOT use the 'include' command, simply place the file name on a blank line by itself
A) NOTE: the entire file name MUST be enclosed in double quotes ( " ) if there are any spaces or special characters in it.
B) no semicolon ( ; ) is necessary, but it might not cause any stumbles ( not fully tested )
C) simple file names may be included alone on their own line
D) several binary files may be collected in a standard (and barely mentioned) '.BINARY' section similar to this (note the ALIGN command and symbol definitions):
.BINARY :
{
/*
the bitmaps need to be aligned on 32 byte boundaries
*/
. = ALIGN (32);
_BITMAP_A_IMG = .; /* symbol available within program */
"bitmap A.img" /* note the double quotes */
. = ALIGN (32);
_BITMAP_B_IMG = .; /* symbol available within program */
bitmapB.img /* note the lack of double quotes */
} > dram_lo /* MEMORY section defined somewhere above */
I believe I covered the major gaps to prevent injuries, but caution is the keyword.
Carl