Skip to content

Commit c5d0305

Browse files
committed
Merge branch 'release/v0.1.0'
2 parents 3cb190d + 6515b1f commit c5d0305

23 files changed

Lines changed: 1301 additions & 10 deletions

.cargo/config.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2+
runner = "probe-run --chip STM32F031K6Tx"
3+
rustflags = [
4+
"-C", "linker=flip-link",
5+
"-C", "link-arg=-Tlink.x",
6+
"-C", "link-arg=-Tdefmt.x",
7+
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
8+
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
9+
"-C", "link-arg=--nmagic",
10+
]
11+
12+
[build]
13+
target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
14+
15+
[alias]
16+
rb = "run --bin"
17+
rrb = "run --release --bin"

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v1
11+
with:
12+
submodules: true
13+
- name: Add Target
14+
run: rustup target add thumbv6m-none-eabi
15+
- name: Install flip-link
16+
run: cd / && cargo install flip-link
17+
- name: Build
18+
run: cargo build --verbose --target=thumbv6m-none-eabi

.github/workflows/format.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Format
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Add Tool
11+
run: rustup component add rustfmt
12+
- name: Check Format
13+
run: cargo fmt -- --check

.gitignore

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
# Generated by Cargo
2-
# will have compiled files and executables
3-
/target/
4-
5-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
1+
/target
72
Cargo.lock
8-
9-
# These are backup files generated by rustfmt
10-
**/*.rs.bk

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Cortex Debug",
9+
"cwd": "${workspaceRoot}",
10+
"executable": "./target/thumbv6m-none-eabi/debug/neotron-bmc",
11+
"request": "launch",
12+
"type": "cortex-debug",
13+
"servertype": "openocd",
14+
"device": "stm32f031k6",
15+
"gdbPath": "gdb-multiarch",
16+
"configFiles": [ "./openocd.cfg" ]
17+
}
18+
]
19+
}

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
// override the default setting (`cargo check --all-targets`) which produces the following error
3+
// "can't find crate for `test`" when the default compilation target is a no_std target
4+
// with these changes RA will call `cargo check --bins` on save
5+
"rust-analyzer.checkOnSave.allTargets": false,
6+
"rust-analyzer.checkOnSave.extraArgs": [
7+
"--bins"
8+
]
9+
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
## Unrelease Changes
4+
5+
* Skeleton application using knurling template
6+
* Started work on command protocol definition
7+
* LED Blinking Modes defined
8+
* SPI Frame Format revised

Cargo.toml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
[package]
2+
authors = ["Jonathan 'theJPster' Pallant <github@thejpster.org.uk>"]
3+
name = "neotron-bmc"
4+
edition = "2018"
5+
version = "0.1.0"
6+
7+
[workspace]
8+
members = ["testsuite"]
9+
10+
[dependencies]
11+
cortex-m = "0.7.1"
12+
cortex-m-rt = "0.6.13"
13+
defmt = "0.2.0"
14+
defmt-rtt = "0.2.0"
15+
cortex-m-rtic = "0.5"
16+
panic-probe = { version = "0.2.0", features = ["print-defmt"] }
17+
stm32f0xx-hal = { version = "0.17", features = ["stm32f031", "rt"] }
18+
debouncr = "0.2"
19+
20+
[features]
21+
# set logging levels here
22+
default = [
23+
"defmt-default",
24+
# "dependency-a/defmt-trace",
25+
]
26+
27+
# do NOT modify these features
28+
defmt-default = []
29+
defmt-trace = []
30+
defmt-debug = []
31+
defmt-info = []
32+
defmt-warn = []
33+
defmt-error = []
34+
35+
# cargo build/run
36+
[profile.dev]
37+
codegen-units = 1
38+
debug = 2
39+
debug-assertions = true # <-
40+
incremental = false
41+
opt-level = 3 # <-
42+
overflow-checks = true # <-
43+
44+
# cargo test
45+
[profile.test]
46+
codegen-units = 1
47+
debug = 2
48+
debug-assertions = true # <-
49+
incremental = false
50+
opt-level = 3 # <-
51+
overflow-checks = true # <-
52+
53+
# cargo build/run --release
54+
[profile.release]
55+
codegen-units = 1
56+
debug = 2
57+
debug-assertions = false # <-
58+
incremental = false
59+
lto = 'fat'
60+
opt-level = 3 # <-
61+
overflow-checks = false # <-
62+
63+
# cargo test --release
64+
[profile.bench]
65+
codegen-units = 1
66+
debug = 2
67+
debug-assertions = false # <-
68+
incremental = false
69+
lto = 'fat'
70+
opt-level = 3 # <-
71+
overflow-checks = false # <-
72+
73+
# uncomment this to switch from the crates.io version of defmt to its git version
74+
# check app-template's README for instructions
75+
# [patch.crates-io]
76+
# defmt = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
77+
# defmt-rtt = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
78+
# defmt-test = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
79+
# panic-probe = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }

0 commit comments

Comments
 (0)