RAM Size tool
This tool shows the size, address and overlay of the variables of a project per unit/module and procedure/function.
The software: RamSizes.zip
The tool is started up from within the mP/mC/mB IDE, one of the IDE "tools" is programmed (see section "How to make it work from within the IDE") to start up the tool and pass the currently selected project to it
(which has to be "compiled" beforehand).
On startup, the list file of the project is loaded automatically and the tool shows this window:
The left hand pane shows the units (see also section "Details") in the project, the right hand pane shows the variables,
together with their sizes, address, the unit/module they belong to, the procedure/function they belong to and if the variable is (partly) overlaid or not (100% means all bytes are used by at least one other variable too).
In the "Variable" pane the user can choose for ordering by name, by size (in this case the highest size is on top), by address, by unit/module name,
by procedure/function name or by overlay.
If wanted, one can reload a new version of the listfile (after e.g. recompiling the project) by hitting "Reload"
How to make it work from within the IDE
All files present in the zipfile should be placed in the same directory.
To make the tool work from within the mP IDE the tool must be added in the "Tools" (Tools menu --> Options --> Tools --> Toolx) menu:
As you can see, the path to the tool must be given and one parameter: "%PROJECT_FILE_NAME". Do not forget to hit "Insert" after you have chosen the parameter.
IMPORTANT: Be sure that "Include Source Lines in the Output Files" is checked in menu Tools -> Options -> Output -> OutputSetting.
- All information showed by this tool is derived from the project's listfile. Currently the list file format of MicroPascal/MicroC/MikroBasic PRO is used (mikroListExporter - v.2.0).
- All the processor's "register" variables are hidden. They are read from the processor's .mpas file in the Defs directory.
- There are 3 "pseudo" units/modules created:
The reason for the existance of "_Global__" is that variables declared in interface sections do not contain the name of their unit/module in their own name, so the link to a unit/module can
not be made.
- "_All__": If chosen, the variable pane shows all variables.
- "_Global__": If chosen, the variable pane shows variables declared in the interface sections of units/modules.
- "_Unknown__": If chosen, the variable pane shows variables that can not be allocated to _Global__ or any other unit/module.
- "_All__without_Unknown": if chosen, the variable pane shows all variables with exception of those identified as "_Unknown__".
Additionally, "_Global__" variable names start with '_' or '?' in the listing. If not, the variables are considered "_Unknown__".
- Variables with a unit/module related to but without procedure/function related to are global variables declared in the unit/s implementation section.
- "_Unknown__" variables do not have an "Overlay" value (and do also not add to others being "overlaid"), it is meaningless.