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.
Install with pip:
pip install puncover
Run it by passing the binary to analyze:
puncover --elf_file 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.
To run the tests locally, you need to install the development dependencies:
install pyenv: https://github.com/pyenv/pyenv
curl https://pyenv.run | bash
install all the python environments, using this bashism (this can take a few minutes):
for _py in $(<.python-version ); do pyenv install ${_py}; done
install the development dependencies:
pip install -r requirements-dev.txt
Then you can run the tests with:
tox
Update the version in
puncover/__version__.py
.Commit the version update: .. code-block:: bash
git add . && git commit -m "Bump version to x.y.z"
Create an annotated tag: .. code-block:: bash
git tag -a {-m=,}x.y.z
Push the commit and tag: .. code-block:: bash
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: .. code-block:: bash
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/*
The full release recipe (for local running) looks like this:
PUNCOVER_VERSION=x.y.z
# little sed magic to update the version in the code
sed -i -r 's/(.*__version_info__ = )\(.*\)/\1\('"$(echo ${PUNCOVER_VERSION} | sed 's/\./, /g')"'\)/g' puncover/version.py
git add . && git commit -m "Bump version to ${PUNCOVER_VERSION}"
git tag -a {-m=,}${PUNCOVER_VERSION}
git push && git push --tags
python setup.py sdist bdist_wheel
twine upload dist/*
gh release create --generate-notes ${PUNCOVER_VERSION}
gh release upload ${PUNCOVER_VERSION} dist/*