feat(firmware): add project skeleton
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2024-01-08 13:52:39 +01:00
parent bc04dcfd90
commit 112bcf7d61
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[build]
target = "riscv32ec-unknown-none-elf"
[target.riscv32ec-unknown-none-elf]
runner = "wlink -v flash"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "opt-level=s",
]
[unstable]
build-std = ["core", "compiler_builtins"]

14
firmware/.gitignore vendored Normal file
View File

@ -0,0 +1,14 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

11
firmware/Cargo.toml Normal file
View File

@ -0,0 +1,11 @@
[package]
name = "fosmometer-firmware"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
ch32v00x-hal = { git = "https://github.com/lujoga/ch32v00x-hal.git", branch = "qingke-rt", features = ["ch32v003", "rt"] }
panic-halt = "0.2.0"
qingke-rt = "0.1.7"

11
firmware/src/main.rs Normal file
View File

@ -0,0 +1,11 @@
#![no_std]
#![no_main]
use ch32v00x_hal as hal;
use panic_halt as _;
#[qingke_rt::entry]
fn main() -> ! {
loop {}
}