Code Monkey home page Code Monkey logo

picorv32_tang's Introduction

Picorv32 + RT-Thread on Lichee Tang (EG4S20)

 \ | /
- RT -     Thread Operating System
 / | \     3.1.3 build Nov 25 2020
 2006 - 2019 Copyright by rt-thread team
Hello RT-Thread!
msh >

This repo aims to run RT-Thread (RTOS) on Picorv32 soft core (荔枝糖 EG4S20 FPGA).

Picorv32 is an open source RISC-V CPU core, and RT-Thread is a burgeoning Real-Time Operating System (RTOS) in China that is small, stable and fast.

Step 0 - Clone and initialize git submodules

This repo consists of two sub-repos. One is the FPGA soft core (picorv32), and the other is the firmware (RT-Thread).

$ git clone https://github.com/wuhanstudio/picorv32_tang
$ cd picorv32_tang
$ git submodule init
$ git submodule update

Step 1 - Build RT-Thread firmware

First, let's build the RT-Thread operating system. The tool chain required for compilation is riscv32-unknown-elf-gcc. You may find this tutorial helpful.

$ cd rtthread-nano/rt-thread/bsp/picorv32_blink/
$ mkdir build & cd build
$ cmake ../
$ make

Now you should have rt-thread.bin.

Step 2 - Generate Memory Initialization File (MIF) from rt-thread.bin

We use MIF to initialize ROM, so let's convert bin to mif.

# Copy generated rt-thread.bin out.
$ cp rtthread-nano/rt-thread/bsp/picorv32_blink/build/rt-thread.bin bin2mif/
$ cd bin2mif

# Generate MIF
$ python3 bin2mif.py rt-thread.bin rt-thread.mif

Then copy generated rt-thread.mif to FPGA project directory:

$ cp bin2mif/rt-thread.mif picorv32_EG4S20/firmware/

Step 3 - Upload bitsream

Now, let's make things work on FPGA. The IDE can be downloaded here, and instructions on how to install it can be found here.

Click on Generate Bitstream, then choose download to flash the bitstream to your board.

TD GUI Mode

Helpful Resources

Related Projects

picorv32_tang's People

Contributors

wuhanstudio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.