Skip to content

Commit

Permalink
Preliminary update docs and license
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Jun 23, 2024
1 parent 6629d4f commit e386e41
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 11 deletions.
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <https://unlicense.org>
44 changes: 33 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# WCH_V307_RISC-V
Bare metal programming on WCH RISC-V MCU CH32V307VCT6 board (CH32V307V-EVT-R1)

[![Build Status](https://github.com/Embedded-System-Lovers/WCH_V307_RISC-V/actions/workflows/WCH_V307_RISC-V.yml/badge.svg)](https://github.com/Embedded-System-Lovers/WCH_V307_RISC-V/actions)
<p align="center">
<a href="https://github.com/Embedded-System-Lovers/WCH_V307_RISC-V/actions">
<img src="https://github.com/Embedded-System-Lovers/WCH_V307_RISC-V/actions/workflows/WCH_V307_RISC-V.yml/badge.svg" alt="Build Status"></a>
<a href="https://github.com/Embedded-System-Lovers/WCH_V307_RISC-V/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-Unlicense-blue.svg" alt="Unlicense"></a>
</p>

This repository implements an entirely manually-written, pure
_bare_ _metal_ Blinky Project for the SiFive
Expand All @@ -13,11 +18,13 @@ Features include:
- blinky LED show with adjustable frequency,
- implementation in C99 with absolute minimal use of assembly.

A clear and easy-to-understand build system based on GNUmake
completes this fun and educational project.
Clear and easy-to-understand build systems based on either
GNUmake or CMake complete this fun and educational project.

This repository provides keen insight on starting up
a _bare_ _metal_ SiFive RISC-V controller.
a _bare_ _metal_ SiFive RISC-V controller. It emphasizes
simplicity and independence from monolithic toolchains
through its lightweight, self-written implementation.

## Details on the Application

Expand All @@ -34,28 +41,43 @@ interrupt handler.

## Building the Application

Build on `*nix*` is easy using an installed `gcc-riscv-none-embed`
Build on `*nix*` is easy using `gcc-riscv32-unknown-elf`

Make can be used to build the Application:
Both Make and Cmake can be used to build the Application:

```sh
cd WCH_V307_RISC-V
cd Build
```
### Make

```sh
./Rebuild.sh
```
bash Rebuild.sh

### CMake

```sh
mkdir Output && cd Output
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-unix.cmake .. && make
```

The build results including ELF-file, HEX-mask, MAP-file
and assembly list file are created in the `Output` directory.

If `gcc-riscv-none-embed` is not installed, it can easily
be obtained [here](https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases).
If `gcc-riscv32-unknown-elf` is not installed, it can easily
be obtained from [embecosm](https://www.embecosm.com/resources/tool-chain-downloads/#riscv-stable).
Add the path of the RISC-V GCC tools' bin folder to `$PATH`
in the usual `*nix` way.

## Continuous Integration

CI runs on pushes and pull-requests with simple
at the moment a single build including result verification
runs on `ubuntu-latest` using GitHub Actions.
build(s) including result verification on `ubuntu-latest`
and `macos-latest` using GitHub Actions.

## Licensing

- The source and build code written for this repo is licensed under [_The_ _Unlicense_](./LICENSE).
- Also the system-register file [`riscv-csr.h`](https://github.com/Embedded-System-Lovers/RED-V_SiFive_RISC-V_FE310_SoC/blob/master/Code/Mcal/riscv-csr.h), originally from [five-embedded](https://five-embeddev.com), is licenced under [_The_ _Unlicense_](./LICENSE).

0 comments on commit e386e41

Please sign in to comment.