A python wrapper for RISC-V disassembler.
First make sure you have already installed pip3, and git tools:
sudo apt install git python3-pip
At first, you need to clone the repository and install the package:
git clone https://github.com/mbaharan/PyRISCV-Disas.git
cd PyRISCV-Disas
sudo python3 setup.py install
To generate the python bindings (from the PyRISCV-Disas directory)
swig4.0 -python -py3 -relativeimport -outdir ./src/pyriscv_disas/ ./c_core/riscv-disas.i
Change the path to the demo
directory and run the test.py
:
cd demo
python3 test.py
- Reza Baharani: Python code - My personal webpage
Copyright (c) 2018, University of North Carolina at Charlotte. All rights reserved. - see the LICENSE file for details.
The C core of this project is available here.