Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cortex m7 options #70

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
83262e5
Specialized for RTIC
korken89 Aug 20, 2021
4afa073
Updated RTIC version
korken89 Nov 9, 2021
706ffce
Updated to RTIC 1.0 and defmt 0.3
korken89 Jan 3, 2022
750fb8b
Update deps
korken89 Jul 2, 2022
fb03cda
More clarifications
korken89 Jul 2, 2022
1b3f6cc
Update to v2
datdenkikniet Apr 22, 2023
2883ed1
Merge remote-tracking branch 'knurling/main' into v2
datdenkikniet Apr 22, 2023
0492e02
Use brtt instead of rtt
datdenkikniet Apr 22, 2023
ff4a353
Get rid of this comment
datdenkikniet Apr 22, 2023
9c7df1a
Merge pull request #1 from datdenkikniet/v2
korken89 Apr 22, 2023
6ac3019
Add missing `use`
datdenkikniet Apr 30, 2023
4ca2c53
Add DEFMT_LOG env variable
datdenkikniet Apr 30, 2023
3b98048
Merge pull request #2 from datdenkikniet/fix
korken89 May 1, 2023
b0b2355
Also fix this version...
datdenkikniet May 1, 2023
6d3fa4e
Improve docs here
datdenkikniet May 1, 2023
3352f0c
Switch back to defmt_rtt till brtt is fixed
datdenkikniet May 1, 2023
5b2d65c
With a comment
datdenkikniet May 1, 2023
b8d8591
Make this more descriptive
datdenkikniet May 1, 2023
b969f75
Actually just use defmt-brtt without default features
datdenkikniet May 1, 2023
59721a0
Also re-rename this
datdenkikniet May 1, 2023
6f2fbf4
Ignore instead of exclude
datdenkikniet May 1, 2023
27d65b8
Add CI and fix the rest of the readme
datdenkikniet May 1, 2023
589450e
Merge pull request #3 from datdenkikniet/fix
korken89 May 1, 2023
f6f59cc
master -> main
datdenkikniet May 1, 2023
cda3985
Merge pull request #5 from datdenkikniet/ci
korken89 May 1, 2023
74903c2
Fix CI
korken89 May 1, 2023
1794312
SKip over instaling probe-run for now
datdenkikniet May 1, 2023
23eb2ae
Merge pull request #6 from datdenkikniet/ci
korken89 May 1, 2023
43a6abe
Remove unnecesarily heavy and practically unused cargo-generate
datdenkikniet May 1, 2023
30bbca6
Clean up todo format and clarify usage of dispatchers
datdenkikniet May 1, 2023
28f7130
Clean up the steps
datdenkikniet May 1, 2023
39eaa23
Clean up diffs and remove "running from git" steps
datdenkikniet May 1, 2023
fbead89
Rename run-steps.sh to ci.sh
datdenkikniet May 1, 2023
31c3b27
This shouldn't be commented out either
datdenkikniet May 1, 2023
f44c150
Merge pull request #7 from datdenkikniet/cargo-generate
korken89 May 2, 2023
c5a2364
Switch to RTIC v2.0.0
90degs2infty Jul 3, 2023
19d0e7f
Switch to rtic-monotonics v1.0.0
90degs2infty Jul 3, 2023
654a0cd
Merge pull request #8 from 90degs2infty/feature_rtic-version
korken89 Jul 5, 2023
0eb680c
Raise task1 priority to 1
AfoHT Jul 5, 2023
3a95124
Update README.md
AfoHT Jul 5, 2023
c1ffa72
Enable GHMQ
AfoHT Jul 5, 2023
1f71224
Add Cortex M7 options to config.toml
korken89 Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ rustflags = [
"-C", "linker=flip-link",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x",
# "-C", "target-cpu=cortex-m7", # For Cortex M7 instructions/pipelining
# "-C", "target-feature=+fp64", # For Cortex M7 double precision FPU
# 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",
# "-C", "link-arg=--nmagic",
]

[build]
# TODO(3) Adjust the compilation target.
# (`thumbv6m-*` is compatible with all ARM Cortex-M chips but using the right
# target improves performance)
target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
# target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
# target = "thumbv7m-none-eabi" # Cortex-M3
# target = "thumbv7em-none-eabi" # Cortex-M4 and Cortex-M7 (no FPU)
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)

[alias]
rb = "run --bin"
rrb = "run --release --bin"
bbr = "build --release --bin"
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build
on:
merge_group:
pull_request:
push:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build the project according to the steps
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install rust nightly
run: |
rustup override set nightly

- name: Configure rust target
run: |
rustup target add thumbv7em-none-eabihf

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- name: Run steps
run: |
./ci.sh
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/target
Cargo.lock
Cargo.lock
45 changes: 18 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,47 +1,38 @@
[package]
# TODO(1) fix `authors` and `name` if you didn't use `cargo-generate`
authors = ["{{authors}}"]
name = "{{project-name}}"
# TODO fix `authors` and `name` if you didn't use `cargo-generate`
name = "test-app"
edition = "2021"
version = "0.1.0"

[lib]
harness = false

# needed for each integration test
[[test]]
name = "integration"
harness = false

[dependencies]
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7"
defmt = "0.3"
defmt-rtt = "0.4"
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"] }
# TODO(4) enter your HAL here
# some-hal = "1.2.3"

[dev-dependencies]
defmt-test = "0.3"
# TODO(4) Select the correct rtic backend
rtic = { version = "2.0.0", features = [ "$RTIC_BACKEND" ] }
# TODO(5) Add hal as dependency
some-hal = "1.2.3"
# TODO add a monotonic if you use scheduling
# rtic-monotonics = { version = "1.0.0", features = [ "cortex-m-systick" ]}

# cargo build/run
[profile.dev]
codegen-units = 1
debug = 2
debug-assertions = true # <-
incremental = false
opt-level = 'z' # <-
overflow-checks = true # <-
opt-level = "s" # <-
overflow-checks = true # <-

# cargo test
[profile.test]
codegen-units = 1
debug = 2
debug-assertions = true # <-
incremental = false
opt-level = 3 # <-
overflow-checks = true # <-
opt-level = "s" # <-
overflow-checks = true # <-

# cargo build/run --release
[profile.release]
Expand All @@ -50,8 +41,8 @@ debug = 2
debug-assertions = false # <-
incremental = false
lto = 'fat'
opt-level = 3 # <-
overflow-checks = false # <-
opt-level = "s" # <-
overflow-checks = false # <-

# cargo test --release
[profile.bench]
Expand All @@ -60,8 +51,8 @@ debug = 2
debug-assertions = false # <-
incremental = false
lto = 'fat'
opt-level = 3 # <-
overflow-checks = false # <-
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
Expand Down
Loading