aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci.sh1
-rw-r--r--embassy-stm32/Cargo.toml4
-rw-r--r--tests/stm32/Cargo.toml3
-rw-r--r--tests/stm32/build.rs6
-rw-r--r--tests/stm32/src/bin/gpio.rs2
-rw-r--r--tests/stm32/src/bin/spi.rs4
-rw-r--r--tests/stm32/src/bin/spi_dma.rs2
-rw-r--r--tests/stm32/src/bin/usart.rs2
-rw-r--r--tests/stm32/src/bin/usart_dma.rs3
9 files changed, 23 insertions, 4 deletions
diff --git a/ci.sh b/ci.sh
index 47bf5d660..f81b34c05 100755
--- a/ci.sh
+++ b/ci.sh
@@ -117,6 +117,7 @@ cargo batch \
117 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \ 117 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \
118 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \ 118 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \
119 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \ 119 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \
120 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32c031c6 --out-dir out/tests/nucleo-stm32c031c6 \
120 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi --out-dir out/tests/nucleo-stm32h755zi \ 121 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi --out-dir out/tests/nucleo-stm32h755zi \
121 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \ 122 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \
122 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h563zi --out-dir out/tests/nucleo-stm32h563zi \ 123 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h563zi --out-dir out/tests/nucleo-stm32h563zi \
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index a8ebacd25..51ca9ff71 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -58,7 +58,7 @@ sdio-host = "0.5.0"
58embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "46d1b1c2ff13e31e282ec1e352421721694f126a", optional = true } 58embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "46d1b1c2ff13e31e282ec1e352421721694f126a", optional = true }
59critical-section = "1.1" 59critical-section = "1.1"
60atomic-polyfill = "1.0.1" 60atomic-polyfill = "1.0.1"
61stm32-metapac = "5" 61stm32-metapac = "6"
62vcell = "0.1.3" 62vcell = "0.1.3"
63bxcan = "0.7.0" 63bxcan = "0.7.0"
64nb = "1.0.0" 64nb = "1.0.0"
@@ -73,7 +73,7 @@ critical-section = { version = "1.1", features = ["std"] }
73[build-dependencies] 73[build-dependencies]
74proc-macro2 = "1.0.36" 74proc-macro2 = "1.0.36"
75quote = "1.0.15" 75quote = "1.0.15"
76stm32-metapac = { version = "5", default-features = false, features = ["metadata"]} 76stm32-metapac = { version = "6", default-features = false, features = ["metadata"]}
77 77
78[features] 78[features]
79default = ["stm32-metapac/rt"] 79default = ["stm32-metapac/rt"]
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index bd181f235..227eabe73 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0"
8stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill 8stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill
9stm32f429zi = ["embassy-stm32/stm32f429zi"] # Nucleo 9stm32f429zi = ["embassy-stm32/stm32f429zi"] # Nucleo
10stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo 10stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo
11stm32c031c6 = ["embassy-stm32/stm32c031c6"] # Nucleo
11stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo 12stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo
12stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo 13stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo
13stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo 14stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo
@@ -18,7 +19,7 @@ stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
18embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 19embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
19embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 20embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
20embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] } 21embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] }
21embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] } 22embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-any"] }
22 23
23defmt = "0.3.0" 24defmt = "0.3.0"
24defmt-rtt = "0.4" 25defmt-rtt = "0.4"
diff --git a/tests/stm32/build.rs b/tests/stm32/build.rs
index 6f4872249..3e67a7392 100644
--- a/tests/stm32/build.rs
+++ b/tests/stm32/build.rs
@@ -9,7 +9,13 @@ fn main() -> Result<(), Box<dyn Error>> {
9 println!("cargo:rerun-if-changed=link_ram.x"); 9 println!("cargo:rerun-if-changed=link_ram.x");
10 10
11 println!("cargo:rustc-link-arg-bins=--nmagic"); 11 println!("cargo:rustc-link-arg-bins=--nmagic");
12
13 // too little RAM to run from RAM.
14 #[cfg(any(feature = "stm32c031c6"))]
15 println!("cargo:rustc-link-arg-bins=-Tlink.x");
16 #[cfg(not(any(feature = "stm32c031c6")))]
12 println!("cargo:rustc-link-arg-bins=-Tlink_ram.x"); 17 println!("cargo:rustc-link-arg-bins=-Tlink_ram.x");
18
13 println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); 19 println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
14 20
15 Ok(()) 21 Ok(())
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs
index 6a36df8cc..8b99b08a5 100644
--- a/tests/stm32/src/bin/gpio.rs
+++ b/tests/stm32/src/bin/gpio.rs
@@ -32,6 +32,8 @@ async fn main(_spawner: Spawner) {
32 let (mut a, mut b) = (p.PD9, p.PD8); 32 let (mut a, mut b) = (p.PD9, p.PD8);
33 #[cfg(feature = "stm32h563zi")] 33 #[cfg(feature = "stm32h563zi")]
34 let (mut a, mut b) = (p.PB6, p.PB7); 34 let (mut a, mut b) = (p.PB6, p.PB7);
35 #[cfg(feature = "stm32c031c6")]
36 let (mut a, mut b) = (p.PB6, p.PB7);
35 37
36 // Test initial output 38 // Test initial output
37 { 39 {
diff --git a/tests/stm32/src/bin/spi.rs b/tests/stm32/src/bin/spi.rs
index bf8098b1b..0f5e563b1 100644
--- a/tests/stm32/src/bin/spi.rs
+++ b/tests/stm32/src/bin/spi.rs
@@ -32,6 +32,8 @@ async fn main(_spawner: Spawner) {
32 let (spi, sck, mosi, miso) = (p.SPI1, p.PE13, p.PE15, p.PE14); 32 let (spi, sck, mosi, miso) = (p.SPI1, p.PE13, p.PE15, p.PE14);
33 #[cfg(feature = "stm32h563zi")] 33 #[cfg(feature = "stm32h563zi")]
34 let (spi, sck, mosi, miso) = (p.SPI4, p.PE12, p.PE14, p.PE13); 34 let (spi, sck, mosi, miso) = (p.SPI4, p.PE12, p.PE14, p.PE13);
35 #[cfg(feature = "stm32c031c6")]
36 let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6);
35 37
36 info!("asdfa;"); 38 info!("asdfa;");
37 let mut spi = Spi::new( 39 let mut spi = Spi::new(
@@ -49,7 +51,7 @@ async fn main(_spawner: Spawner) {
49 51
50 // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. 52 // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor.
51 // so we should get the data we sent back. 53 // so we should get the data we sent back.
52 let mut buf = data; 54 let mut buf = [0; 9];
53 spi.blocking_transfer(&mut buf, &data).unwrap(); 55 spi.blocking_transfer(&mut buf, &data).unwrap();
54 assert_eq!(buf, data); 56 assert_eq!(buf, data);
55 57
diff --git a/tests/stm32/src/bin/spi_dma.rs b/tests/stm32/src/bin/spi_dma.rs
index b3dad8132..74776ebf8 100644
--- a/tests/stm32/src/bin/spi_dma.rs
+++ b/tests/stm32/src/bin/spi_dma.rs
@@ -31,6 +31,8 @@ async fn main(_spawner: Spawner) {
31 let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PE13, p.PE15, p.PE14, p.GPDMA1_CH0, p.GPDMA1_CH1); 31 let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PE13, p.PE15, p.PE14, p.GPDMA1_CH0, p.GPDMA1_CH1);
32 #[cfg(feature = "stm32h563zi")] 32 #[cfg(feature = "stm32h563zi")]
33 let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI4, p.PE12, p.PE14, p.PE13, p.GPDMA1_CH0, p.GPDMA1_CH1); 33 let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI4, p.PE12, p.PE14, p.PE13, p.GPDMA1_CH0, p.GPDMA1_CH1);
34 #[cfg(feature = "stm32c031c6")]
35 let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2);
34 36
35 let mut spi = Spi::new( 37 let mut spi = Spi::new(
36 spi, 38 spi,
diff --git a/tests/stm32/src/bin/usart.rs b/tests/stm32/src/bin/usart.rs
index 52409567c..cca8c42ee 100644
--- a/tests/stm32/src/bin/usart.rs
+++ b/tests/stm32/src/bin/usart.rs
@@ -34,6 +34,8 @@ async fn main(_spawner: Spawner) {
34 let (tx, rx, usart, irq) = (p.PD8, p.PD9, p.USART3, interrupt::take!(USART3)); 34 let (tx, rx, usart, irq) = (p.PD8, p.PD9, p.USART3, interrupt::take!(USART3));
35 #[cfg(feature = "stm32h563zi")] 35 #[cfg(feature = "stm32h563zi")]
36 let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.LPUART1, interrupt::take!(LPUART1)); 36 let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.LPUART1, interrupt::take!(LPUART1));
37 #[cfg(feature = "stm32c031c6")]
38 let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.USART1, interrupt::take!(USART1));
37 39
38 let config = Config::default(); 40 let config = Config::default();
39 let mut usart = Uart::new(usart, rx, tx, irq, NoDma, NoDma, config); 41 let mut usart = Uart::new(usart, rx, tx, irq, NoDma, NoDma, config);
diff --git a/tests/stm32/src/bin/usart_dma.rs b/tests/stm32/src/bin/usart_dma.rs
index 3f70791c1..d673df0f3 100644
--- a/tests/stm32/src/bin/usart_dma.rs
+++ b/tests/stm32/src/bin/usart_dma.rs
@@ -71,6 +71,9 @@ async fn main(_spawner: Spawner) {
71 p.GPDMA1_CH0, 71 p.GPDMA1_CH0,
72 p.GPDMA1_CH1, 72 p.GPDMA1_CH1,
73 ); 73 );
74 #[cfg(feature = "stm32c031c6")]
75 let (tx, rx, usart, irq, tx_dma, rx_dma) =
76 (p.PB6, p.PB7, p.USART1, interrupt::take!(USART1), p.DMA1_CH1, p.DMA1_CH2);
74 77
75 let config = Config::default(); 78 let config = Config::default();
76 let mut usart = Uart::new(usart, rx, tx, irq, tx_dma, rx_dma, config); 79 let mut usart = Uart::new(usart, rx, tx, irq, tx_dma, rx_dma, config);