Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/analogdevicesinc/codefusion-studio/llms.txt

Use this file to discover all available pages before exploring further.

The ELF File Explorer is a custom editor built into CodeFusion Studio that lets you quickly parse and analyze compiled firmware binaries. Rather than reaching for separate tooling, you can open any ELF-format file directly in VS Code and immediately inspect its memory layout, symbol table, metadata, and statistics — all in a single interactive view. This dramatically reduces time spent debugging and profiling while giving you deeper insight into your application’s structure.

Supported file formats

The ELF File Explorer can open any file that contains a valid ELF header. The following file extensions are recognized automatically: AXF DOJ DXE ELF EXE KO MOD O OUT PRX PUFF SO

Opening an ELF file

1

Open the CFS panel

Click the CodeFusion Studio icon in the VS Code Activity Bar to open the CFS side panel.
2

Click Open ELF File

Under the ELF File Explorer section, click Open ELF File.
3

Navigate to your binary

In the file picker, navigate to the ELF file in your project’s build folder — for example, m4/build/m4.elf.
Once a file is open, navigation icons on the left side of the editor let you switch between four main views: Statistics, Metadata, Symbols, and Memory Layout. A help icon in the top-right corner provides context-sensitive guidance for the currently active view.

Statistics

The Statistics page gives a high-level overview of the ELF file across five sections.
Summarizes key metadata for the binary:
FieldDescription
FormatELF 32-bit or 64-bit
Data EncodingEndianness — little or big endian
File TypeExecutable, relocatable, shared object, or core file
ArchitectureTarget architecture (for example, Arm or x86)
ABI VersionApplication Binary Interface version
Debug InfoIndicates whether the file contains debugging information
StrippingIndicates whether symbol information has been stripped
Shows total memory consumed, broken down by data type:
  • Text — Executable code
  • Data — Initialized global and static variables
  • Bss — Zero-initialized and uninitialized data
Displays the count of functions and variables grouped by binding type: global, local, and weak. Filters above the table let you narrow the view to all, text, data, or bss symbols.
A table showing details for every section contained within the ELF file.
Lists the ten largest symbols in the binary. Filters above the table let you narrow by all, text, data, or bss symbols.

Metadata

The Metadata page displays a breakdown of text, data, and bss sizes alongside the full ELF header contents, including architecture, data layout, ELF version, and flags.

Header Info

Contains the ELF file type, target architecture, entry point address, and program/section header details — required for the OS to correctly load and execute the binary.

AEABI Attributes

ARM Embedded ABI attributes that convey the target architecture, floating-point configuration, and optimization level. These ensure toolchain and runtime compatibility.

Heuristic Information

Indicates detected metadata for Zephyr and MSDK firmware platforms, which may include Flash and RAM sizes and other platform-specific data.

Symbols Explorer

The Symbol Explorer presents a sortable, filterable table of every symbol in the ELF file. Click any column header to sort; use the SQL query interface for precise filtering.
The Symbol Explorer query engine is powered by AlaSQL. Supported syntax and functions are limited to what AlaSQL provides — refer to the AlaSQL documentation for the full feature set.

Available columns

The default query (SELECT *) returns these fields:
ColumnTypeDescription
idintegerUnique identifier for the symbol
namestringSymbol name
typestringKind of entity the symbol represents
addressintegerMemory address where the symbol is located
sectionstringSection in which the symbol is defined
sizeintegerSize of the symbol in bytes
localstackintegerWorst-case local stack usage for a function (excluding callees)
stackintegerWorst-case total stack usage for a function (including callees)
bindstringLinkage type — for example, local or global
visibilitystringAccessibility from other modules — for example, default or hidden
pathstringSource file where the symbol is defined
The localstack, stack, and path columns are only populated when the relevant data is present in the ELF. Stack data requires the following GCC flags at build time:
-fdump-rtl-expand -fstack-usage -fdump-rtl-dfinish -fdump-ipa-cgraph -gdwarf-4
These flags are enabled by default in CodeFusion Studio projects.

Generating compiler data for stack analysis

To produce stack usage (SU) and call graph (CGRAPH) data with GCC, compile your firmware with:
-fstack-usage -fdump-ipa-cgraph -gdwarf-4
Add the following lines to your CMakeLists.txt:
zephyr_cc_option(-fstack-usage)
zephyr_cc_option(-fdump-ipa-cgraph)
zephyr_cc_option(-gdwarf-4)
Stack usage and call graph data can only be parsed when generated by GCC. Binaries built with other toolchains will not populate the localstack or stack columns.

SQL query examples

Use the quick lookup field above the table to filter by name or address without writing SQL. Enter a text or numeric value and press Enter to auto-generate a query.
Any valid SQL construct is supported, including WHERE, ORDER, LIMIT, LIKE, and REGEXP:
GoalQuery
Show specific columnsSELECT name, address FROM symbols
Symbols larger than 100 bytesSELECT * FROM symbols WHERE size > 100
Ten largest symbolsSELECT * FROM symbols ORDER BY size DESC LIMIT 10
Symbols in an address rangeSELECT * FROM symbols WHERE address BETWEEN 0x10000000 AND 0x20000000
Symbols from a specific source fileSELECT * FROM symbols WHERE path LIKE '%main.c%'
Symbols whose name starts with a prefixSELECT * FROM symbols WHERE name REGEXP '^init.*'
Queries can be saved using the save icon next to the query field. Click Saved queries to view, edit, or delete saved queries. Saved queries are stored in user settings and persist across workspaces.

Memory Layout

The Memory Layout page pairs an interactive visual memory map on the left with a segment table on the right. The map uses the following visual conventions:
DisplayMeaning
StripesUnused memory
BlankRead/write memory
FilledRead-only memory
Hover over a segment in the map to see a summary and highlight the corresponding table row, or hover over a table row to highlight its segment in the map.
Overlapping segments are rendered as smaller rectangles to the right of the main segment. Small segments may appear larger than their actual size for readability — always refer to the reported size values for accuracy.

Segments

Clicking a segment in the table drills down to the sections it contains.
FieldDescription
IdUnique identifier for the segment
TypePurpose of the segment — for example, loadable or dynamic
AddressStart address of the segment
SizeSize in bytes
FlagsPermissions: R (read), W (write), X (executable)
AlignMemory alignment requirement in bytes

Sections in a segment

Clicking a segment reveals the sections it contains:
FieldDescription
IdUnique identifier for the section
NameSection name
AddressStart address
SizeSize in bytes
FlagsSection attributes (see table below)
TypeContents and purpose of the section
FlagMeaning
WWrite
AAlloc
XExecute
MMerge
SStrings
IInfo
LLink order
OExtra OS processing required
GGroup
TTLS
CCompressed
xUnknown
oOS specific
EExclude
DMbind
yPurecode
pProcessor specific
Click a section to view the symbols it contains. Use the breadcrumb at the top-left to navigate back to Segments or Sections.

Symbols in a section

FieldDescription
IdUnique identifier for the symbol
NameSymbol name
AddressMemory address
SizeSize in bytes
BindLinkage type — for example, local or global
VisibilityAccessibility — for example, default or hidden

CLI reference: cfsutil elf

All ELF analysis capabilities are also available from the terminal via the cfsutil command-line utility.

cfsutil elf analyze

Provides a high-level summary of the ELF file, including platform detection, stack/heap sizes, and Flash/SRAM sizes.
cfsutil elf analyze <FILEPATH> [--format text|json]
Use --format json to emit machine-readable output suitable for CI pipelines or scripting.

cfsutil elf info

Provides in-depth information about the ELF file. At least one switch is required:
cfsutil elf info <FILEPATH> [--format text|json] [-h] [-a] [-c] [-s] [-v]
SwitchInformation
-aAttributes
-cCore ELF information
-hELF header
-sSize
--formatOutput format: text (default) or json
-vVerbose output
Example — print the ELF header and section sizes in JSON:
cfsutil elf info firmware.elf -h -s --format json

cfsutil elf memory

Provides information on segments, sections, and symbols within the binary.
cfsutil elf memory <FILEPATH> [-s] [-t] [-y] [-i <value>] [-n <value>] [--format text|json] [-d]
SwitchEffect
-sList segments
-tList sections within each segment
-yList symbols within each section
-dPrint detailed information (requires -s, -t, or -y)
-i <value>Filter to segment or section with the given ID
-n <value>Filter to segment or section with the given name
--formatOutput format: text (default) or json
For -t and -y, sections and symbols can be restricted to a specific segment or section using -i or -n. This command can produce a large amount of output — consider redirecting it to a file.
Example — list all sections and their symbols, filtered to a specific segment:
cfsutil elf memory firmware.elf -t -y -n .text > memory_report.txt

cfsutil elf symbols

Runs a SQL query against the symbol table and outputs the matching rows.
cfsutil elf symbols <FILEPATH> <SQLQUERY> [--format text|json] [-f]
SwitchEffect
-fPrint the full source file path (when debug info is available)
--formatOutput format: text (default) or json
Example queries:
# Show the ten largest symbols
cfsutil elf symbols firmware.elf "SELECT * FROM symbols ORDER BY size DESC LIMIT 10"

# Find all global functions larger than 512 bytes
cfsutil elf symbols firmware.elf "SELECT name, size, address FROM symbols WHERE bind='Global' AND size > 512"

# Symbols from a specific source file, with full paths
cfsutil elf symbols firmware.elf "SELECT * FROM symbols WHERE path LIKE '%main.c%'" -f

# Symbols in a specific address range, as JSON
cfsutil elf symbols firmware.elf \
  "SELECT * FROM symbols WHERE address BETWEEN 0x10000000 AND 0x20000000" \
  --format json

Build docs developers (and LLMs) love