8000 GitHub - davidvidovic/riscv-toolchain: Hand-made RISCV toolchain involving a C-to-RV assembly compiler and RV software emulator.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

davidvidovic/riscv-toolchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RISC-V Toolchain

A simple RISC-V toolchain containing ANSI C to RV64I compiler built from scratch, RV assembler and RV software emulator that takes binary file as input. Built on top of it is Qt application with interactive text field, compile button and text box to show assembly output. Additionaly, it highlights which ANSI C lines compiled into which assembly lines of code.

Table of Contents

Prerequisites

Compiler relays on yacc and lex as frontend tools for parsing and lexical analaysis of input code. Before buiding the project, make sure you have installed yacc and lex:

  • yacc and lex (also known as bison and flex)

Checking Versions

# For yacc (bison) and lex (flex), check the version using
bison --version
flex --version

Installing Prerequisites

# Update package lists
sudo apt update

# Install yacc (bison) and lex (flex)
sudo apt install bison flex
# Clone the repository
git clone https://github.com/davidvidovic/riscv-toolchain.git

Usage

To compile input source code, edit input.c file and run run.sh bash script from terminal.

To run Qt app, an app should be first built from Qt Creator using .pro file in folder app.

Features

Examples of app usage:

Compile success is shown for correct input syntax

You can switch tabs to show binary output

Any error that compile reports is shown in UI textbox

About

Hand-made RISCV toolchain involving a C-to-RV assembly compiler and RV software emulator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0