Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Each [GitHub release](https://github.com/iharhl/memmap/releases) has a wheel att
one with Python 3.10 or newer, without uv or a checkout:

```bash
pipx install https://github.com/iharhl/memmap/releases/download/v0.2.0/memmap-0.2.0-py3-none-any.whl
pipx install https://github.com/iharhl/memmap/releases/download/v0.3.0/memmap-0.3.0-py3-none-any.whl
```

PNG and PDF output needs the `raster` extra and the system cairo library. SVG always works.

```bash
pipx install "memmap[raster] @ https://github.com/iharhl/memmap/releases/download/v0.2.0/memmap-0.2.0-py3-none-any.whl"
pipx install "memmap[raster] @ https://github.com/iharhl/memmap/releases/download/v0.3.0/memmap-0.3.0-py3-none-any.whl"
```

To work from a checkout instead, run `uv sync` (or `uv sync --extra raster`), and put `uv run` in
Expand Down Expand Up @@ -68,6 +68,13 @@ memmap from-elf build/firmware.elf -o layout.yaml --map build/firmware.map
memmap from-partitions partitions.csv -o layout.yaml --sdkconfig sdkconfig
```

**A Zephyr or nRF Connect SDK build.** Pass the merged devicetree, or the Partition Manager's
`partitions.yml`:

```bash
memmap from-partitions build/zephyr/zephyr.dts -o layout.yaml
```

Then check the config, see what will be drawn, and render it:

```bash
Expand Down Expand Up @@ -254,11 +261,13 @@ regenerate those too:
MEMMAP_UPDATE_GOLDEN=1 uv run pytest tests/test_elf_snapshots.py tests/test_linker.py
```

`from-partitions` is tested on real ESP-IDF builds, where the `partition-table.bin` the build
wrote checks how memmap places the CSV. After an intended change to it, review and regenerate:
`from-partitions` is tested on real ESP-IDF, Zephyr and nRF Connect SDK builds. The
`partition-table.bin` an ESP-IDF build wrote checks how memmap places the CSV, and the header a
Zephyr or Partition Manager build generated checks the addresses read. After an intended change
to it, review and regenerate:

```bash
MEMMAP_UPDATE_GOLDEN=1 uv run pytest tests/test_from_partitions.py
MEMMAP_UPDATE_GOLDEN=1 uv run pytest tests/test_from_partitions.py tests/test_from_zephyr.py
```

[docs/from-elf.md](docs/from-elf.md#testing) explains the approach and shows the drawings.
Expand Down
14 changes: 7 additions & 7 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ git switch main && git pull
```

```bash
git switch -c release-prep/v0.2.0
git switch -c release-prep/v0.3.0
```

```bash
Expand Down Expand Up @@ -52,11 +52,11 @@ git switch main && git pull
```

```bash
gh release create v0.2.0 --target main --generate-notes
gh release create v0.3.0 --target main --generate-notes
```

Or on GitHub, under Releases, choose "Draft a new release":
- Tag: type `v0.2.0` and pick "Create new tag on publish".
- Tag: type `v0.3.0` and pick "Create new tag on publish".
- Target: `main`.
- "Generate release notes" lists the pull requests merged since the last release.
- "Publish release".
Expand All @@ -69,7 +69,7 @@ release does not start the workflow until it is published. A pre-release does.

1. Fails if the tag without its `v` differs from the version in `pyproject.toml`.
2. Runs `pytest`.
3. Builds `memmap-0.2.0-py3-none-any.whl` and `memmap-0.2.0.tar.gz`.
3. Builds `memmap-0.3.0-py3-none-any.whl` and `memmap-0.3.0.tar.gz`.
4. Installs the wheel in a clean venv and runs `memmap guide` and `memmap check` from it.
5. Uploads both files to the release's Assets.

Expand All @@ -78,14 +78,14 @@ It takes about a minute. Follow it in the Actions tab.
## 4. Install a release

```bash
pipx install https://github.com/iharhl/memmap/releases/download/v0.2.0/memmap-0.2.0-py3-none-any.whl
pipx install https://github.com/iharhl/memmap/releases/download/v0.3.0/memmap-0.3.0-py3-none-any.whl
```

`pip install` with the same URL works too. For PNG and PDF output, which also needs the system
cairo library, name the `raster` extra:

```bash
pipx install "memmap[raster] @ https://github.com/iharhl/memmap/releases/download/v0.2.0/memmap-0.2.0-py3-none-any.whl"
pipx install "memmap[raster] @ https://github.com/iharhl/memmap/releases/download/v0.3.0/memmap-0.3.0-py3-none-any.whl"
```

## When something fails
Expand All @@ -94,7 +94,7 @@ pipx install "memmap[raster] @ https://github.com/iharhl/memmap/releases/downloa
Delete the release and its tag, merge the bump, and publish again.

```bash
gh release delete v0.2.0 --cleanup-tag
gh release delete v0.3.0 --cleanup-tag
```

- **A later step fails**: the release stays published without assets. Fix the cause and choose
Expand Down
2 changes: 1 addition & 1 deletion memmap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""memmap: datasheet-style memory map images from a YAML description."""

__version__ = "0.2.0"
__version__ = "0.3.0"
# Config `version` values this release reads. Keep in step with schema.Version.
SCHEMA_VERSIONS = (1,)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "memmap"
version = "0.2.0"
version = "0.3.0"
description = "Turn a YAML description of an MCU memory layout into a datasheet-style memory map image."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading