-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
477 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"anchor", | ||
"anchor_codegen", | ||
"anchor_macro", | ||
"testjig" | ||
] | ||
members = ["anchor", "anchor_codegen", "anchor_macro", "testjig"] | ||
|
||
exclude = [ | ||
"rp2040_demo", | ||
"esp32c3_demo", | ||
] | ||
exclude = ["rp2040_demo", "esp32c3_demo", "nrf52840_rtic_demo"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[target.'cfg(all(target_arch = "arm", target_os = "none"))'] | ||
runner = "probe-rs run --chip nRF52840_xxAA" | ||
rustflags = [ | ||
"-C", | ||
"linker=flip-link", | ||
"-C", | ||
"link-arg=-Tlink.x", | ||
"-C", | ||
"link-arg=-Tdefmt.x", | ||
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x | ||
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95 | ||
"-C", | ||
"link-arg=--nmagic", | ||
] | ||
|
||
[build] | ||
target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU) | ||
|
||
[alias] | ||
rb = "run --bin" | ||
rrb = "run --release --bin" | ||
bbr = "build --release --bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
[package] | ||
name = "test-app" | ||
edition = "2021" | ||
version = "0.1.0" | ||
|
||
[dependencies] | ||
cortex-m = { version = "0.7", features = ["critical-section-single-core"] } | ||
defmt = { version = "0.3", features = ["encoding-rzcobs"] } | ||
defmt-brtt = { version = "0.1", default-features = false, features = ["rtt"] } | ||
panic-probe = { version = "0.3", features = ["print-defmt"] } | ||
rtic = { version = "2.0.0", features = ["thumbv7-backend"] } | ||
nrf52840-hal = "0.16" | ||
rtic-monotonics = { version = "1.0.0", features = [ | ||
"cortex-m-systick", | ||
"nrf52840", | ||
] } | ||
embassy-usb = { version = "0.1.0", features = ["defmt"] } | ||
embassy-nrf = { version = "0.1.0", features = ["nrf52840"] } | ||
embassy-futures = { version = "0.1.1", features = ["defmt"] } | ||
anchor = { git = "https://github.com/Annex-engineering/anchor.git" } | ||
rtic-sync = { version = "1.2.0", features = ["embedded-hal"] } | ||
embedded-hal-async = "1.0.0" | ||
bbqueue = "0.5.1" | ||
embassy-sync = "0.5.0" | ||
heapless = "0.8.0" | ||
fugit = { version = "0.3.7", features = ["defmt"] } | ||
|
||
[build-dependencies] | ||
anchor_codegen = { git = "https://github.com/Annex-engineering/anchor.git" } | ||
|
||
# cargo build/run | ||
[profile.dev] | ||
codegen-units = 1 | ||
debug = 2 | ||
debug-assertions = true # <- | ||
incremental = false | ||
opt-level = "s" # <- | ||
overflow-checks = true # <- | ||
|
||
# cargo test | ||
[profile.test] | ||
codegen-units = 1 | ||
debug = 2 | ||
debug-assertions = true # <- | ||
incremental = false | ||
opt-level = "s" # <- | ||
overflow-checks = true # <- | ||
|
||
# cargo build/run --release | ||
[profile.release] | ||
codegen-units = 1 | ||
debug = 2 | ||
debug-assertions = false # <- | ||
incremental = false | ||
lto = 'fat' | ||
opt-level = "s" # <- | ||
overflow-checks = false # <- | ||
|
||
# cargo test --release | ||
[profile.bench] | ||
codegen-units = 1 | ||
debug = 2 | ||
debug-assertions = false # <- | ||
incremental = false | ||
lto = 'fat' | ||
opt-level = "s" # <- | ||
overflow-checks = false # <- | ||
|
||
# uncomment this to switch from the crates.io version of defmt to its git version | ||
# check app-template's README for instructions | ||
# [patch.crates-io] | ||
# defmt = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version supported by probe-rs (see changelog)" } | ||
# defmt-rtt = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version supported by probe-rs (see changelog)" } | ||
# defmt-test = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version supported by probe-rs (see changelog)" } | ||
# panic-probe = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version supported by probe-rs (see changelog)" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Anchor nRF52840 RTIC demo | ||
|
||
This project contains a small example of integrating Anchor in an nRF52840 based | ||
project. This example was tested on the nRF52840-DK development kit board, but should | ||
work on other nRF52840 based boards too. | ||
|
||
The project uses RTIC and shows one possible way of integrating Anchor in to such a project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn main() { | ||
anchor_codegen::ConfigBuilder::new() | ||
.entry("src/bin/minimal.rs") | ||
.set_version("rticjig 0.1") | ||
.set_build_versions("rust: someversion") | ||
.build() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* Linker script for the nRF52 - WITHOUT SOFT DEVICE */ | ||
MEMORY | ||
{ | ||
/* NOTE K = KiBi = 1024 bytes */ | ||
FLASH : ORIGIN = 0x00000000, LENGTH = 1024K | ||
RAM : ORIGIN = 0x20000000, LENGTH = 256K | ||
} | ||
|
||
/* This is where the call stack will be allocated. */ | ||
/* The stack is of the full descending type. */ | ||
/* You may want to use this variable to locate the call stack and static | ||
variables in different memory regions. Below is shown the default value */ | ||
/* _stack_start = ORIGIN(RAM) + LENGTH(RAM); */ | ||
|
||
/* You can use this symbol to customize the location of the .text section */ | ||
/* If omitted the .text section will be placed right after the .vector_table | ||
section */ | ||
/* This is required only on microcontrollers that store some configuration right | ||
after the vector table */ | ||
/* _stext = ORIGIN(FLASH) + 0x400; */ | ||
|
||
/* Size of the heap (in bytes) */ | ||
/* _heap_size = 1024; */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[toolchain] | ||
channel = "nightly" | ||
components = [ "rust-src", "rustfmt", "llvm-tools-preview" ] |
Oops, something went wrong.