Analyses C/C++ build output for code size, static variables, and stack usage.
Project description
puncover
Analyzes C/C++ binaries for code size, static variables and stack usages. It creates a report with disassembler and call-stack analysis per directory, file, or function.
Installation and Usage
Install with pip:
pip install puncover
Run it by passing the binary to analyze:
puncover project.elf
...
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Open the link in your browser to view the analysis.
You can also use uvx to run the script without installing globally:
uvx puncover project.elf
Running Tests Locally
Setup
To run the tests locally, you need to install the development dependencies. This
project uses uv to manage the python environment.
uv venv && source .venv/bin/activate
uv sync
Running Tests
Then you can run the tests with tox (note that this will fail if any of the
supported python versions aren't found, see tox.ini):
tox
or, to target only the current python on $PATH:
tox -e py
Publishing Release
Release Script
See release.sh for a script that automates the above steps. Requires
uv to be installed. This example will work
with the PyPi tokens (now required):
PUNCOVER_VERSION=0.3.5 PYPI_TOKEN=<pypi token> ./release.sh
Manual Steps
Only for reference, the release script should take care of all of this.
Click to expand
-
Update the version in
puncover/__version__.py. -
Commit the version update:
git add . && git commit -m "Bump version to x.y.z"
-
Create an annotated tag:
git tag -a {-m=,}x.y.z
-
Push the commit and tag:
git push && git push --tags
-
Either wait for the GitHub Action to complete and download the release artifact for uploading: https://github.com/HBehrens/puncover/actions OR Build the package locally:
python setup.py sdist bdist_wheel -
Upload the package to PyPI:
twine upload dist/*
-
Create GitHub releases:
gh release create --generate-notes x.y.z- attach the artifacts to the release too:
gh release upload x.y.z dist/*
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file puncover-0.7.0.tar.gz.
File metadata
- Download URL: puncover-0.7.0.tar.gz
- Upload date:
- Size: 169.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71bef764d8b633cbda93852146b7e336ac9017f6375b433d476e24c93b719d50
|
|
| MD5 |
c5d7ed50d520d8bc67ae7709b8eeec70
|
|
| BLAKE2b-256 |
cb435d3ae5788f166d5305658c680d3623b2f6880f2c04a5a502f84e402dd022
|
File details
Details for the file puncover-0.7.0-py3-none-any.whl.
File metadata
- Download URL: puncover-0.7.0-py3-none-any.whl
- Upload date:
- Size: 171.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e780dbd174c5ddd2854f83938cf6ce16e13adfdcb3bf3730421ac781809ef382
|
|
| MD5 |
b492989da1c340c39c6af8d9f4545ac6
|
|
| BLAKE2b-256 |
f53efcbfad938892f81a2dc2637c4069552047ed74520967ce1e50a1211cad55
|