|ARM Technical Support Knowledge Articles|
Applies to: DS-5
The ARM Compiler assembler (
armasm) has a mechanism for embedding any file into an ELF section without the need to assemble it. The mechanism uses the
INCBIN directive. The example below demonstrates how the
INCBIN directive can be used to create a final ROMable binary consisting of a main application to be run on an ARM processor and a second application for running on a DMA engine.
area dma, code, readonly
incbin dma.hex ; include file dma.hex in the current place.
/* main application */
armcc -c main.c
armlink --entry foo --scatter scatter.txt --keep dma_code.o(dma) -o test.axf main.o dma_code.o
fromelf --bin -o test.bin test.axf
Article last edited on: 2014-07-31 08:41:28
Did you find this article helpful? Yes No
How can we improve this article?