Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion boards/atsame54_xpro/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ runner = 'arm-none-eabi-gdb'
[build]
target = "thumbv7em-none-eabihf"
rustflags = [

# 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",

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
2 changes: 2 additions & 0 deletions boards/atsame54_xpro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ rtt-target = {version = "0.3", features = ["cortex-m"]}

[features]
default = ["rt", "atsamd-hal/same54p"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
# Enable async support from atsamd-hal
Expand Down
3 changes: 3 additions & 0 deletions boards/atsame54_xpro/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
6 changes: 5 additions & 1 deletion boards/feather_m0/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ rustflags = [
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
"-C", "link-arg=--nmagic",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x" # uncomment if using defmt

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, or uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",
]

[target.thumbv6m-none-eabi]
Expand Down
8 changes: 5 additions & 3 deletions boards/feather_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ version = "0.3"
[dev-dependencies]
cortex-m = "0.7"
cortex-m-semihosting = "0.3"
defmt = "0.3"
defmt-rtt = "0.4"
defmt = "1.0.1"
defmt-rtt = "1.0.0"
drogue-nom-utils = "0.1"
embassy-executor = {version = "0.6.2", features = ["arch-cortex-m", "executor-thread", "task-arena-size-64"]}
embedded-graphics = "0.7.1"
Expand All @@ -61,6 +61,8 @@ usbd-serial = "0.2"
[features]
# ask the HAL to enable atsamd21g support
default = ["rt", "atsamd-hal/samd21g"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
rt = ["cortex-m-rt", "atsamd-hal/samd21g-rt"]
usb = ["atsamd-hal/usb", "usb-device"]
use_rtt = ["atsamd-hal/use_rtt"]
Expand Down Expand Up @@ -113,7 +115,7 @@ required-features = ["async"]

[[example]]
name = "async_uart"
required-features = ["dma", "async"]
required-features = ["defmt", "dma", "async"]

[[example]]
name = "blinky_basic"
Expand Down
3 changes: 3 additions & 0 deletions boards/feather_m0/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
6 changes: 5 additions & 1 deletion boards/feather_m4/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ runner = 'arm-none-eabi-gdb'
[build]
target = "thumbv7em-none-eabihf"
rustflags = [

# 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",

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, or uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
2 changes: 2 additions & 0 deletions boards/feather_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ ws2812-timer-delay = "0.3"
[features]
# ask the HAL to enable atsamd51j support
default = ["rt", "atsamd-hal/samd51j"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/dma"]
rt = ["cortex-m-rt", "atsamd-hal/samd51j-rt"]
Expand Down
3 changes: 3 additions & 0 deletions boards/feather_m4/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
6 changes: 5 additions & 1 deletion boards/grand_central_m4/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ runner = 'arm-none-eabi-gdb'
[build]
target = "thumbv7em-none-eabihf"
rustflags = [

# 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",

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, or uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
2 changes: 2 additions & 0 deletions boards/grand_central_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ ws2812-timer-delay = "0.3"

[features]
default = ["rt", "atsamd-hal/samd51p"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
rt = ["cortex-m-rt", "atsamd-hal/samd51p-rt"]
Expand Down
3 changes: 3 additions & 0 deletions boards/grand_central_m4/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
8 changes: 6 additions & 2 deletions boards/metro_m0/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ runner = 'arm-none-eabi-gdb'
#runner = 'probe-run --chip ATSAMD21G18A'

rustflags = [

# 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",


# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, or uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
2 changes: 2 additions & 0 deletions boards/metro_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ usbd-serial = "0.2"
[features]
# ask the HAL to enable atsamd21g support
default = ["rt", "atsamd-hal/samd21g"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
# Enable async support from atsamd-hal
Expand Down
3 changes: 3 additions & 0 deletions boards/metro_m0/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
8 changes: 6 additions & 2 deletions boards/metro_m4/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ runner = 'probe-rs run --chip ATSAMD51J19A --speed 20000'
[build]
target = "thumbv7em-none-eabihf"
rustflags = [

# 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=-Tdefmt.x", # uncomment if using defmt

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, or uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
6 changes: 4 additions & 2 deletions boards/metro_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ version = "0.7"
[dev-dependencies]
cortex-m = "0.7"
cortex-m-semihosting = "0.3"
defmt = "0.3"
defmt-rtt = "0.4"
defmt = "1.0.1"
defmt-rtt = "1.0.0"
embassy-executor = {version = "0.6.2", features = ["arch-cortex-m", "executor-thread", "task-arena-size-8192"]}
embedded-hal = "1.0"
embedded-hal-nb = "1.0"
Expand All @@ -57,6 +57,8 @@ version = "0.3"
default = ["rt", "atsamd-hal/samd51j"]
# Enable async support from atsamd-hal
async = ["atsamd-hal/async"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
rt = ["cortex-m-rt", "atsamd-hal/samd51j-rt"]
Expand Down
4 changes: 4 additions & 0 deletions boards/metro_m4/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}

println!("cargo:rerun-if-changed=build.rs");
}
6 changes: 5 additions & 1 deletion boards/pygamer/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ runner = "hf2 elf"
[build]
target = "thumbv7em-none-eabihf"
rustflags = [

# 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",

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
2 changes: 2 additions & 0 deletions boards/pygamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ usbd-serial = "0.2"
[features]
# ask the HAL to enable atsamd51j support
default = ["rt", "atsamd-hal/samd51j"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
neopixel-spi = ["dep:ws2812-spi"]
Expand Down
3 changes: 3 additions & 0 deletions boards/pygamer/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
6 changes: 5 additions & 1 deletion boards/samd11_bare/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ target = "thumbv6m-none-eabi"
[target.thumbv6m-none-eabi]
runner = 'probe-run --chip ATSAMD11C14A'
rustflags = [

# 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",

# To use defmt, the linker needs to be provided with this argument. The BSP
# uses build.rs to supply it conditionally, or uncomment this line to use it
# unconditionally.
# "-C", "link-arg=-Tdefmt.x",

"-C", "link-arg=-Tlink.x",
]
2 changes: 2 additions & 0 deletions boards/samd11_bare/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ rtt-target = {version = "0.3.0", features = ["cortex-m"]}
[features]
# ask the HAL to enable atsamd11c support
default = ["rt", "atsamd-hal/samd11c"]
# Use DEFMT_LOG environment variable to set logging level, defaults to `error`
defmt = ["atsamd-hal/defmt"]
dma = ["atsamd-hal/dma"]
max-channels = ["dma", "atsamd-hal/max-channels"]
# Enable async support from atsamd-hal
Expand Down
3 changes: 3 additions & 0 deletions boards/samd11_bare/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=memory.x");
}
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
println!("cargo:rustc-link-arg=-Tdefmt.x");
}
println!("cargo:rerun-if-changed=build.rs");
}
Loading