Skip to main content

Minimal ecosystem for bare-metal RISC-V development

Project description

Bronzebeard is a simple, standalone assembler for developing bare metal RISC-V programs. It is designed for applications that stand on their own without relying on operating systems, frameworks, SDKs, or pre-existing software of any kind. This assembler supports the base 32-bit instruction set as well as the M, A, and C extensions (RV32IMAC).

Bronzebeard and its tools are implemented purely in Python. It has been written in order to be free from large, complex toolchains. This keeps the project portable, minimal, and easy to understand.

Motivation

Much of modern software has accrued vast amounts of bulk and complexity throughout the years. Can useful software be developed without relying on any of it? That’s the question that this project seeks to answer. I believe that the rise of RISC-V provides a great opportunity to explore different methods of program development. Installing a full operating system doesn’t have to be a prerequisite to building something useful.

Check out the DerzForth project for further elaboration of this idea.

Installation

If you are unfamiliar with virtual environments, I suggest taking a brief moment to learn about them and set one up. The Python docs provide a great tutorial for getting started with virtual environments and packages.

Bronzebeard can be installed via pip:

pip install bronzebeard

Or, if you’d rather clone this repo and play with the examples:

git clone https://github.com/theandrew168/bronzebeard.git
cd bronzebeard/
# I'd still create and activate a virtual environment here
pip install -e .

Assemble!

First, create a text file with some RISC-V assembly source code in it:

add x1, x2, x3
add x4, x5, x6

Then, with Bronzebeard installed:

bronzebeard my_asm_file.asm

By default, the assembled output binary will be placed in a file named bb.out.

Testing

Bronzebeard’s tests are written using pytest:

pip install pytest

Once installed, the tests can be run via:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bronzebeard-0.3.0.tar.gz (166.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bronzebeard-0.3.0-py3-none-any.whl (138.9 kB view details)

Uploaded Python 3

File details

Details for the file bronzebeard-0.3.0.tar.gz.

File metadata

  • Download URL: bronzebeard-0.3.0.tar.gz
  • Upload date:
  • Size: 166.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for bronzebeard-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6fe751bd1b8fe225c98b88f3c12a2c6f785f7c17732ea7dc77c50ba4535d3c39
MD5 c348b2806c0569dfa7604872c802c329
BLAKE2b-256 78b09271eee58e6a9eb795d46e75155a5b7150a3f28f6dc0baf9b7c4879a3334

See more details on using hashes here.

File details

Details for the file bronzebeard-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: bronzebeard-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 138.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for bronzebeard-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4931ddf126e7a74d8cf05bf2c215479cb668dea5526ec5b8ec1bad92e91b466
MD5 ff3f4d4f7375e070ef6a5aa097ad5901
BLAKE2b-256 622ccb06d72b4cd867e24111cf1ce276ddfee8b6747391a868c406f582994470

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page