puncover
Analyzes RISCV 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.This project based on https://github.com/HBehrens/puncover, but only support arch riscv. Add -fstask-usage to your gcc build flag. By Heiko Behrens - MIT license, copyright © 2014-2017
Installation and Usage
Install with pip:
pip install puncover_riscv
Run it by passing the binary to analyze:
puncover_riscv --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.
Running Tests Locally
To run the tests locally, you need to install the development dependencies:
install pyenv: https://github.com/pyenv/pyenv
curl https://pyenv.run | bashinstall all the python environments, using this bashism (this can take a few minutes):
for _py in $(<.python-version ); do pyenv install ${_py}; doneinstall the development dependencies:
pip install -r requirements-dev.txt
Then you can run the tests with:
tox
Publishing Release
Update the version in puncover_riscv/__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/Egahp/puncover_riscv/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/*
Release Script
See scripts/release.sh for a script that automates the above steps.
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
Release files for puncover-riscv 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| puncover_riscv-0.2.3.tar.gz | 173.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| puncover_riscv-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 346.7 kB
Release files / puncover_riscv-0.2.3.tar.gz
| Download URL | puncover_riscv-0.2.3.tar.gz |
|---|---|
| Size | 173.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ebf57eb5cccfef9d54d3242f2c1dd7c6e22261893df03931367faa40162e425
|
|
BLAKE2b-256 checksum How to use checksums |
64e64b8d4141eb08ada6f87dad7fccfb601ca3eb6d5467acf61528ef9bde39f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / puncover_riscv-0.2.3-py3-none-any.whl
| Download URL | puncover_riscv-0.2.3-py3-none-any.whl |
|---|---|
| Size | 173.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a62b72ec5d8692fc3d6c57278af13338b9b36a434844ba7fb2f02729804530ae
|
|
BLAKE2b-256 checksum How to use checksums |
4f87fe5dacf19d3475c2d15847c9bfaced1f471033b7da79bf9d88b4c8a507c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|