Skip to main content

Minimal ecosystem for bare-metal RISC-V development

Project description

bronzebeard

Simple RISC-V assembler for writing bare-metal programs

Overview

Bronzebeard is a single-file, nanopass 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. 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.

Documentation

Most of the surface-level documentation for Bronzebeard lives right here in this README. For more specific details regarding the usage and accepted syntax of the assembler, check out the docs directory. This is where the project's primary documentation will live until the time comes to setup something more official.

Devices

The assembler itself supports the base 32-bit instruction set as well as the M, A, and C extensions (RV32IMAC). At the moment, Bronzebeard has only been used to target the Longan Nano and the Wio Lite. There are plans to test on additional RISC-V boards such as the HiFive1 Rev B in the future.

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

Assemble!

With Bronzebeard installed:

bronzebeard examples/example.asm

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

Command Line Interface

usage: bronzebeard [-h] [-o OUTPUT] [--compress] [-v] [-vv] [--version] input_asm

Assemble RISC-V source code

positional arguments:
  input_asm             input source file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output binary file (default "bb.out")
  --compress            identify and compress eligible instructions (TODO)
  -v, --verbose         verbose assembler output
  -vv, --very-verbose   very verbose assembler output
  --version             print assembler version and exit

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.0.23.tar.gz (21.7 kB view hashes)

Uploaded Source

Built Distribution

bronzebeard-0.0.23-py3-none-any.whl (21.7 kB view hashes)

Uploaded Python 3

Supported by

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