Add Memory Map Visualization Tool for Marlin Firmware #28301
+1,562
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Memory Map Visualization Tool for Marlin Firmware
Overview
This PR introduces a comprehensive memory analysis and visualization tool for Marlin firmware builds. The
visualize_memory_map.pyscript generates interactive HTML reports that provide detailed insights into Flash and RAM memory usage across different firmware modules.Key Features
🎨 Interactive Visual Memory Map
📊 Comprehensive Statistics
📋 Data Export Options
--csv) - Generatesflash.csvandram.csvfiles with detailed symbol information--list) - Interactive sortable tables with address, size, percentage, and symbol name🔧 Multi-Architecture Support
🔍 Advanced Analysis
--warn-conflicts) - Identifies overlapping module categorization patternsg_pfnVectorson ARM)Usage Examples
Basic Usage
Command-Line Options
Module Categories
The tool categorizes symbols into 14 functional modules with distinct colors:
Technical Details
Architecture Detection
Tool Discovery
avr-nmorarm-none-eabi-nmin PlatformIO directories~/.platformio/packages/toolchain-*/bin/Memory Categorization
.text,.rodata,.data,.init,.fini.data,.bss,.noinitBenefits
Files
buildroot/share/scripts/visualize_memory_map.py- Main visualization scriptmemory_map.html- Standalone HTML file (no external dependencies)flash.csv,ram.csv- Spreadsheet-compatible dataScreenshots
Note: This tool is for development and analysis only. It does not modify firmware or affect runtime behavior.
Requirements
the firmware .elf file