Skip to main content

memory_map_manager

The Memory Map Manager (MMM) generates code and documentation for embedded device parameters intended for external interfaces.

Motivation

Embedded systems typically run on constrained systems, providing some sort of access to more powerful machines. A number of parameters can be read (such as a temperature from a sensor) or written (such as the intended state of a light). These amount of parameters and complexity can grow and change over the development cycle of the device. Every parameter needs to not only be available in the embedded device but also all the external interfaces as well. If this information is not coordinated it can lead to human error and extra development time. There are solutions available that helps with that, however, they typically don't operate under the asymmetric nature of embedded vs host computer capabilities or end of being very complex requiring large stacks in order to use.

Solution

The MMM generates simple C code that allows both named parameter access via typedef structs and byte offset access. Decoding of these parameters are done on the host, taking advantage of asymmetric computational resources of host vs. device. The embedded device only needs to expose a way to read or write an offset and size.

Installation

As this is a "console application" one can use a venv or pipx instead of pip.

Stable versions can be installed with:

pip install memory-map-manager

Generating with the MMM

Installing the package comes with a console command mmm-gen.

usage: mmm-gen [-h] [--cfg-path CFG_PATH] [--clean]
               [--loglevel {debug,info,warning,error,fatal,critical}]

optional arguments:
  -h, --help            show this help message and exit
  --cfg-path CFG_PATH, -p CFG_PATH
                        the path to the memory map manager configuration importer.
  --clean, -C           clean the generated directories before generation. be careful!
  --loglevel {debug,info,warning,error,fatal,critical}
                        python logger log level, defaults to "info"

There are a number of examples available coming with the generation configurations and the map configurations.

To run the minimal example run:

mmm-gen -p examples/minimal/main.yaml

This generates C files, csv files, and the configuration outputs.

Writing a Custom Map

Along with the examples of maps there are schemas available that document the capabilities.

There are two files that are needed:

  • a generation configuration that specifies generation information such as input configuration files and output directories. The default file is assumed to be main.yaml
  • a map configuration that specifies the parameters in the map.

Metadata

Release files for memory-map-manager 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memory-map-manager 2.0.1
File Size Uploaded
memory_map_manager-2.0.1.tar.gz 59.4 kB Details

Release files / memory_map_manager-2.0.1.tar.gz

Download URL memory_map_manager-2.0.1.tar.gz
Size 59.4 kB
Tags Source
SHA-256 checksum
How to use checksums
288b339ed5b52a45dedccd7722bb20c25850f22c8b13e4c316ca99d844362d01
BLAKE2b-256 checksum
How to use checksums
2eefcd24102f7dae05264a8aa2285ea6e0b0d9331b263c752b8c793f5dc759b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.27.1 setuptools/62.1.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

2.0.1 This release

1 release file

2.0.0

1 release file

1.0.0

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page