Metadata-Version: 2.1
Name: nesiac
Version: 0.2.0
Summary: Memory usage visualiser for embedded applications
Home-page: https://github.com/Eekle/Nesiac/
License: MIT
Keywords: embedded,elf,binary,memory
Author: Eekle
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Dist: cpp-demangle (>=0.1.2,<0.2.0)
Requires-Dist: getchlib (>=1.0.12,<2.0.0)
Requires-Dist: pyelftools (>=0.30,<0.31)
Requires-Dist: rich (>=13.6.0,<14.0.0)
Requires-Dist: rust-demangler (>=1.0,<2.0)
Project-URL: Repository, https://github.com/Eekle/Nesiac/
Description-Content-Type: text/markdown

[![PyPI version](https://badge.fury.io/py/nesiac.svg)](https://badge.fury.io/py/nesiac)

# Overview

Nesiac is a terminal tool for visualising memory usage in embedded programs.

As an example when run on the STM32 "HID_Standalone" project for STM32H747I-DISCO board:

![Nesiac terminal output](docs/example.png)

# Installation

Nesiac may be installed with pip via:

`python -m pip install nesiac`

The `nesiac` executable will then be made available in your python executables directory, which should be on your path.

# Usage

Nesiac requires two files to do its analysis:

- An ELF file for section and symbol info
- A map file (in GCC style) for memory region info

If Nesiac is given a single path as argument, that path should be a directory containing exactly one `.elf` and one `.map` file. In that case, Nesiac will use those files for analysis.

Alternatively those paths may be overriden with the `-e,--elf-file` and `-m,--map-file` arguments.

Exporting a map file from GCC may be enabled with the `-Wl,-Map=<FILE>` flag.

If you are using a linker that cannot generate GCC style map files, then you can provide a dummy map file with the region info in the correct format:

```
Memory Configuration

Name             Origin             Length             Attributes
FLASH            0x0000000008000000 0x0000000000100000 xr
RAM              0x0000000024000000 0x0000000000020000 xrw
ITCMRAM          0x0000000000000000 0x0000000000010000 xrw
*default*        0x0000000000000000 0xffffffffffffffff
```

