diff --git a/README.md b/README.md index 456c480..3df8b8d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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. diff --git a/RELEASING.md b/RELEASING.md index 8e552fe..3c587fb 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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 @@ -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". @@ -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. @@ -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 @@ -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 diff --git a/memmap/__init__.py b/memmap/__init__.py index 429b57f..e374e03 100644 --- a/memmap/__init__.py +++ b/memmap/__init__.py @@ -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,) diff --git a/pyproject.toml b/pyproject.toml index 0c9dd07..c935233 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/uv.lock b/uv.lock index 33a59f8..52f3c05 100644 --- a/uv.lock +++ b/uv.lock @@ -450,7 +450,7 @@ wheels = [ [[package]] name = "memmap" -version = "0.2.0" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "click" },