GithubHelp home page GithubHelp logo

varghes / linux-ch32v003 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tvlad1234/linux-ch32v003

0.0 0.0 0.0 1017 KB

Linux on a $0.15 RISC-V microcontroller

License: MIT License

C 97.54% Makefile 2.46%

linux-ch32v003's Introduction

linux-ch32v003

Linux on a $0.15 RISC-V microcontroller

This project enables the CH32V003 microcontroller to run Linux. It achieves this by using an 8 megabyte SPI PSRAM chip and a RISC-V emulator (the very nice mini-rv32ima by cnlohr). The emulation is needed because the PSRAM cannot be mapped into the address space of the microcontroler. The Linux kernel and rootfs is loaded into PSRAM at boot from an SD card. FAT filesystem access is provided by the Petit FatFs library.

How to use

This project uses the ch32v003fun SDK, which must reside in the same folder where this repository was cloned.

The PSRAM and SD card are connected to the hardware SPI interface of the CH32V003. The chip select pins can be set in the thing_config.h file. The console can be accessed over the UART pins. The SD card containing the Linux image file must be formatted as FAT32 or FAT16, and the file must be placed in the root.

A suggested schematic and corresponding single-layer PCB design can be found in the hardware folder (it's a KiCad 7 project).

Boot time is around 5 minutes. The Linux image includes the coremark benchmark in the /root/ folder.

Building the Linux image

If you wish to build your own Linux image, you can do so by running make linux. The resulting image will be located in linux/buildroot/output/images/.

linux-ch32v003's People

Contributors

tvlad1234 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.