Keil Logo

Technical Support

On-Line Manuals

Compiler Reference Guide

Preface Arm Compiler Tools Overview armclang Reference armlink Reference fromelf Reference fromelf Command-line Options --base [[object_file::]load_region_ID=]num --bin --bincombined --bincombined_base=address --bincombined_padding=size,num --cad --cadcombined --compare=option[,option,…] --continue_on_error --coprocN=value (fromelf) --cpu=list (fromelf) --cpu=name (fromelf) --datasymbols --debugonly --decode_build_attributes --diag_error=tag[,tag,…] (fromelf) --diag_remark=tag[,tag,…] (fromelf) --diag_style={arm|ide|gnu} (fromelf) --diag_suppress=tag[,tag,…] (fromelf) --diag_warning=tag[,tag,…] (fromelf) --disassemble --dump_build_attributes --elf --emit=option[,option,…] --expandarrays --extract_build_attributes --fieldoffsets --fpu=list (fromelf) --fpu=name (fromelf) --globalize=option[,option,…] --help (fromelf) --hide=option[,option,…] --hide_and_localize=option[,option,…] --i32 --i32combined --ignore_section=option[,option,…] --ignore_symbol=option[,option,…] --in_place --info=topic[,topic,…] (fromelf) input_file (fromelf) --interleave=option --linkview, --no_linkview --localize=option[,option,…] --m32 --m32combined --only=section_name --output=destination --privacy (fromelf) --qualify --relax_section=option[,option,…] --relax_symbol=option[,option,…] --rename=option[,option,…] --select=select_options --show=option[,option,…] --show_and_globalize=option[,option,…] --show_cmdline (fromelf) --source_directory=path --strip=option[,option,…] --symbolversions, --no_symbolversions --text --version_number (fromelf) --vhx --via=file (fromelf) --vsn (fromelf) -w --wide64bit --widthxbanks armar Reference armasm Legacy Assembler Reference Appendixes


D1.6 --cad

Produces a C array definition or C++ array definition containing binary output.


You can use each array definition in the source code of another application. For example, you might want to embed an image in the address space of another application, such as an embedded operating system.

If your image has a single load region, the output is directed to stdout by default. To save the output to a file, use the --output option together with a filename.

If your image has multiple load regions, then you must also use the --output option together with a directory name. Unless you specify a full path name, the path is relative to the current directory. A file is created for each load region in the specified directory. The name of each file is the name of the corresponding execution region.

Use this option with --output to generate one output file for each load region in the image.


You cannot use this option with object files.

Considerations when using --cad

A file is only created when the load region describes code or data that is present in the ELF file. For example a load region containing only execution regions with ZI data in them does not result in an output file.


The following examples show how to use --cad:

  • To produce an array definition for an image that has a single load region, enter:

    fromelf --cad myimage.axf
    unsigned char LR0[] = {
  • For an image that has multiple load regions, the following commands create a file for each load region in the directory root\myprojects\multiload\load_regions:

    cd root\myprojects\multiload
    fromelf --cad image_multiload.axf --output load_regions

    If image_multiload.axf contains the execution regions EXEC_ROM and RAM, then the files EXEC_ROM and RAM are created in the load_regions subdirectory.

Non-ConfidentialPDF file icon PDF version101754_0614_00_en
Copyright © 2019, 2020 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.