diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/LICENSE @@ -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 diff --git a/README.md b/README.md index 674ba89..3288a5b 100644 --- a/README.md +++ b/README.md @@ -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) +

+ + Build Status + + Unlicense +

This repository implements an entirely manually-written, pure _bare_ _metal_ Blinky Project for the SiFive @@ -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 @@ -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). +