Skip to content

Instantly share code, notes, and snippets.

@9names
Created February 5, 2023 05:04
Show Gist options
  • Save 9names/6f6f25f58b7b66377c74fb16907128ac to your computer and use it in GitHub Desktop.
Save 9names/6f6f25f58b7b66377c74fb16907128ac to your computer and use it in GitHub Desktop.
enabling critical-section for stm32f4
[package]
name = "stm32f4-test"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] }
stm32f4 = { path = "../stm32f4", features = ["rt", "critical-section"] }
embedded-hal = { version="0.2.7", features = ["unproven"] }
panic-halt = "0.2.0"
cortex-m-rt = "0.7.2"
[profile.dev]
codegen-units = 1
debug = 2
debug-assertions = true
incremental = false
opt-level = 1
overflow-checks = true
# cargo build/run --release
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 1
overflow-checks = false
# do not optimize proc-macro crates = faster builds from scratch
[profile.dev.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false
[profile.release.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false
# cargo test
[profile.test]
codegen-units = 1
debug = 2
debug-assertions = true
incremental = false
opt-level = 3
overflow-checks = true
# cargo test --release
[profile.bench]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment