5. Renesas Memory Usage View

Memory Usage is used to retrieve information from a project’s .map, .elf (Executable and Linkable Format), or .abs (Absolute) file. It provides an overview of:

  • Total memory size

  • ROM/RAM usage ratio

  • Detailed information on sections and symbols used in the project

It also uses the device’s memory configuration, linker script, and .map file from the project’s target device to extract:

  • Defined memory areas of the device

  • Size and used size of each memory area

  • Sections assigned to each memory area

The Renesas Memory Usage View automatically adapts its appearance to match the current VS Code theme.

5.1. Open Memory Usage View

Click the [Renesas Memory Usage View] icon on the [Activity Bar] to open the Input Dialog. You can also use the commands “Renesas Memory Usage View: Focus on Input Dialog View” and “View: Show Renesas Memory Usage View” to show it.

_images/open-renesas-memory-usage-view.png

The Memory Usage View icon

An Input Dialog will appear to be prepared for data entry.

5.1.1. Input Dialog

_images/memory-usage-input-dialog.png

The Memory Usage View - Input Dialog

5.1.1.1. How to create a Memory Usage View tab using the Input Dialog

By default, after Step 1, all data is auto filled. You only need to press the New button to create Memory Usage View panel.

  • Step 1: Select Project Folder

    Firstly, select the target project folder. By default, the path shows the current workspace folder. You can change the target folder by using the Select folder button.

    _images/memory-usage-select-folder.png

    Select the Project Folder - Select folder button

    When the Select folder button is clicked, a folder pick dialog will appear to select a different folder. After selecting a different folder, the configuration is updated automatically. You can use the Auto fill button to trigger the action if anything is incorrect.

    _images/memory-usage-auto-fill.png

    Select the Project Folder - Auto fill button

  • Step 2: Select input for section

    A MAP file or load module (ABS or ELF) will be automatically detected. By default, MAP + ELF/ABS file(s) is selected.

  • Step 3: Select input for memory configuration

    Memory configuration is used for reading information of memory areas such as name, address, size. The configuration will be selected automatically, however, it can also be changed between options manually.

    The automatic selection is performed in the following order:

    • Memory configuration in the MAP file

    • Memory configuration in the Linker Scripts

    • Memory configuration in the Device File

  • Step 4: Select the compiler

    _images/memory-usage-select-compiler.png

    Select compiler drop-down list

    • The compiler is auto-filled based on the ELF/ABS file.

    • If the user changes the Section input or the Memory Configuration input, they must manually select the compiler.

    Step 5: Error Handling and Final Actions

    • When the user presses the New button, the error-handling process will be executed and the corresponding error will be shown.

    • If there is no error, the Memory Usage View panel will be created.

5.1.1.2. How to change the settings using Input Dialog

  • Edit Input for Section

    Users can update the MAP file or select a different external ELF/ABS file by clicking the Edit button. This allows them to choose a file outside the current project as the input source.

  • Edit Input for Memory Configuration

    Users can modify the input files for the Linker Script and Device File in the same way by clicking the Edit button.

    When editing the Linker Script, the Manage Linker Scripts dialog appears. This dialog lets users add, remove, or replace linker script files before applying the configuration.

    _images/memory-usage-manage-linker-script-dialog.png

    Manage Linker Scripts dialog

    • If no linker script has been specified, the message “No files added yet. Please click “Add” to select file(s).” is displayed as a reminder.

    • Add files: Click the Add button to select one or more linker script files to include.

    • View full path: Hover the mouse over a file name to display its full file path.

    • Delete or replace files: Click the × icon to remove a file, or double-click a file to select a replacement.

    • Duplicate file check: An error message appears if a user tries to add existing file(s) or replace a file with one that already exists.

      _images/memory-usage-duplicate-linker-script-message.png

      Duplicate message when adding or replacing a file

    • Click OK button to confirm all changes and apply the updated linker script file to the input for Memory Configuration.

    • Click Cancel button or press the Esc key to abort the current action and close the dialog without saving any changes.

    Note

    • To change any input file, users must edit each item individually. Select the option you want to modify, then click the Edit button to update the corresponding file(s).

    • All changes made to these files are the user’s responsibility.

Note

  • Memory Configuration includes memory areas with name, address and length.

    Example:

    Memory Configuration:
    Name   Origin          Length
    -------------------------------
    VEC    0x00000000      0x0004
    ROM    0x000000d8      0x5d28
    RAM    0x00ff700       0x0800
    
  • Device files should be placed under: user\.vscode\extensions\<renesas-memory-usage-view>\device_files

  • Current supported devices: RX, RL78, RH850, RA, RZ, RISC-V, RRQ

  • Renesas CC projects only support auto-find device file for those created using a Smart Configurator.

  • From this version, the Input Dialog will save the settings for each Memory Usage View. That means when users switch among the panel views, they will see the settings specific to that view, including Project folder, Section file, Memory config file, and Compiler.

5.1.2. Section tab

_images/memory-usage-section-tab.png

The Memory Usage View - Section tab

The “Section” tab is a core component of the Memory Usage View panel, designed to present a comprehensive table view of all memory sections parsed from either a .map or .elf/abs file or .map + .elf/abs file.

When MAP + ELF/ABS is selected, keep the sections from the .map file and add any sections from the .elf/abs file that are not already present in the map file.

This table provides detailed metadata for each memory section, with the following columns:

  • Section: Name of the memory section (e.g., .text, .data, .bss, etc.).

  • Start Address: The starting address of the section in memory.

  • End Address: The address of the last byte occupied by the section.

  • Size: The size of the section in bytes.

  • Align: Alignment requirement of the section (if available).

  • Attribute: Section attributes such as read/write/execute (if available).

  • Load Address: The load-time address for the section, used primarily in embedded systems.

Each row in the table corresponds to a specific memory section. Sections with a size of 0 or missing address fields (indicated by ---) may represent unused or reserved regions.

This layout offers an at-a-glance overview of memory allocation, helping developers and engineers quickly assess section sizes, memory usage, and layout across the address space.

To ensure consistency and clarity:

  • All data is automatically parsed from the selected input file.

  • Sections are displayed in the order they appear in the memory map.

  • Empty or unavailable values are denoted using dashes (---) for better readability.

The Section tab provides several functions to support efficient navigation and viewing of table data:

  • Hover highlight: The background colour of a row changes when the pointer moves over it, helping users identify the current row.

  • Row selection: Users can select one or multiple rows.

    • Single selection: Click a row.

    • Multiple selection: Use Ctrl (Windows) or Command (MacOS) to select individual rows or Shift to select a range.

  • Scrolling: When the panel is resized, the table supports both vertical and horizontal scrolling to ensure all content remains accessible.

  • Theme adaptation: The table automatically adjusts its colour and appearance to match the active application theme.

  • Sticky header: The header row remains fixed at the top of the table while the data rows scroll, ensuring column names are always visible.

Example: Address Derivation from MAP File

The following illustrates how section addresses are extracted from a typical .map file:

SECTION                            START       END      SIZE   ALIGN    ATTRIBUTE
SU
                                00000004  00000103       100       4         DATA
SI
                                00000104  00000403       300       4         DATA
B_1
                                00000404  00000404         0       1         DATA

Converted result in the Section tab:

Section

Start

End

Size

Align

Attribute

SU

0x00000004

0x00000103

256

4

DATA

SI

0x00000104

0x00000403

768

4

DATA

B_1

0x00000404

---

0

1

DATA

5.1.3. Sunburst tab

_images/memory-usage-sunburst-tab.png

The Memory Usage View - Sunburst tab

The “Sunburst” tab is a primary component of the Memory Usage View panel. When selected, it presents a dual-pane layout featuring a hierarchical memory tree alongside a corresponding sunburst chart.

Beneath the Sunburst tab, a set of sub-tabs represents various memory regions, such as RAM, ROM, FLASH, and others.

The active memory region is clearly highlighted with a blue top border and a distinct background colour, allowing users to easily identify the selected region.

5.1.3.1. Tree view

_images/memory-usage-rom-tree-view.png

The Memory Usage View - Tree view

When a memory region (sub-tab) is selected, the memory tree appears on the left side of the interface. This tree follows a three-level hierarchical structure:

  • Root node: Represents the memory region (e.g., RAM, ROM, FLASH).

  • Section nodes: Children of the root node, representing memory sections (e.g., .data, .bss, .text).

  • Symbol nodes: Children of section nodes, representing individual symbols (e.g., main, exit).

Each node displays the following information:

  • Name

  • Memory size (in bytes). For the root node, the unit switches to KB if the size exceeds 1024 bytes.

  • Percentage of the total region size

Nodes that can be expanded or collapsed include an arrow icon (▼) to the left of the node label.

A special node labelled NONE-USAGE is included to represent unallocated or unused memory within the region.

Interaction:

  • Hover highlight: The background colour of a row changes when the pointer moves over it, helping users identify the current row.

  • Clicking on any node in the tree the row is highlighted and updates the sunburst chart to visually focus on the corresponding node and its hierarchy.

    _images/memory-usage-click-interaction.png

    Click the node in tree view

5.1.3.2. Sunburst chart

_images/memory-usage-sunburst-chart.png

The Memory Usage View - Sunburst chart

The sunburst chart is displayed on the right side of the interface, providing a visual representation of memory usage using concentric circles.

A label above the chart shows the currently selected node’s name (e.g., RAM, RAM/.bss).

At the centre of the chart, the size of the selected node is displayed in bytes. For the root node, the unit automatically switches to KB if the size exceeds 1024 bytes.

The Reset button, located below the Sunburst chart, restores the chart to its initial view.

When hovering over a segment, the centre temporarily updates to display the size of the hovered segment, following the same rule.

Chart Structure

  • The innermost ring represents memory sections (e.g., .bss, .text).

  • The outer rings represent symbols within those sections.

Colour Scheme

  • Each section is assigned a unique base colour.

  • Symbols within a section inherit that base colour with varying brightness levels depending on their size:

    • Larger symbols appear darker.

    • Smaller symbols appear lighter.

The ‘NONE-USAGE’ area, representing unused or unallocated memory, is rendered in the same colour as the background with the circle outline.

Hover Effects

_images/memory-usage-hover-effects.png

Hover effects on the sunburst chart

  • When the user hovers over a segment of the sunburst chart:

    • The centre label of the chart temporarily updates to display the size of the hovered segment.

    • A tooltip appears, showing:

      • The full identifier (e.g., RAM/.bss)

      • The exact size (e.g, 24 byte(s)) and percentage (e.g, 0.07 %) of the total region

      • The message “Click here to jump to the node.”, indicating that the segment can be clicked to drill down.

  • When the user hovers over on the centre of the sunburst chart:

    • A tooltip appears, showing the message “Click here to jump to the parent node.” indicating that can return to the parent node view.

Interaction

_images/memory-usage-click-interaction-sunburst-chart.png

Click the segment circle on sunburst chart

  • Click on the segment circle

    • The chart drills down to focus on the clicked node, displaying only its children.

    • Both the label above the chart and the centre display are updated to reflect the name and size of the selected node.

    • If the clicked node has no children, the chart now drills down and displays an empty circle, instead of only updating the label and centre display.

    • The corresponding node in the memory tree view is highlighted to indicate selection.

  • Click to move back to the parent level:

    • Click the centre circle to return to the parent node view.

    • When the original root node is selected, no tooltip message is shown.

      _images/memory-usage-zoom-out.png

      Click the centre sunburst chart to back the parent

Zoom In/Out

_images/memory-usage-scale-in-out.png

Zoom in/out the sunburst chart

The user can zoom in or out the entire Sunburst chart by using the mouse wheel:

  • Mouse wheel up: Zoom in

  • Mouse wheel down: Zoom out

This action changes only the display of the chart and does not affect the data hierarchy.

Reset

When the users click Reset button, the following changes occur:

  • The chart returns to the root node with the default zoom level.

  • The root node in the tree view is highlighted, reflecting the current chart view.

Use this button to quickly return to the starting point after drilling down into child nodes.