|ARM Technical Support Knowledge Articles|
It is sometimes necessary to join distinct pieces of executable code or data to create a single application or ROMable image. For example you may need to:
There are different ways to achieve this:
INCBIN directive of
armasm includes a file into an assembler file. The file is included as it is, without being assembled. You can use
INCBIN to include executable files, literals, or any arbitrary data. The contents of the file are added in place, byte for byte, without being interpreted in any way. For more information, please see the FAQ: "How do I use INCBIN two merge multiple binaries images?".
If you have an ELF executable image that contains more than one load region, it is possible to create a single binary image by using the
--bincombined option. For more information, please see the fromelf User Guide.
To concatenate binaries using DOS or Unix, use:
copy /b app.bin+data.bin romimage
cat app.bin data.bin > romimage
This produces one combined image from two (or more) code/data files. Note that this method simply joins images together. It does not perform any 'intelligent' placement of areas, as the linker does.
If the absolute address locations of each image are known in advance, then one simple way to merge them is to use the
append commands in DS-5. See the DS-5 Command Reference documentation for more information.
Article last edited on: 2014-08-01 10:24:56
Did you find this article helpful? Yes No
How can we improve this article?