aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-02-24 00:19:26 +0100
committerDario Nieuwenhuis <[email protected]>2022-02-24 00:37:15 +0100
commite39fd4a7361ef58163adbb3adf6a83c1294f75e8 (patch)
treec193f249c2a607314b9827dce0371c484047b406
parent1b3c34b923c2dcc42cc76b53d53cdb490cb249b9 (diff)
stm32: add stm32f103 bluepill to HIL tests.
-rwxr-xr-xci.sh1
-rw-r--r--tests/stm32/.cargo/config.toml7
-rw-r--r--tests/stm32/Cargo.toml1
-rw-r--r--tests/stm32/src/bin/gpio.rs2
-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.rs2
7 files changed, 13 insertions, 4 deletions
diff --git a/ci.sh b/ci.sh
index 032affa1b..91c7cd3ba 100755
--- a/ci.sh
+++ b/ci.sh
@@ -73,6 +73,7 @@ cargo batch \
73 --- build --release --manifest-path examples/stm32wb55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wb55 \ 73 --- build --release --manifest-path examples/stm32wb55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wb55 \
74 --- build --release --manifest-path examples/stm32wl55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wl55 \ 74 --- build --release --manifest-path examples/stm32wl55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wl55 \
75 --- build --release --manifest-path examples/wasm/Cargo.toml --target wasm32-unknown-unknown --out-dir out/examples/wasm \ 75 --- build --release --manifest-path examples/wasm/Cargo.toml --target wasm32-unknown-unknown --out-dir out/examples/wasm \
76 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f103c8 --out-dir out/tests/bluepill-stm32f103c8 \
76 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \ 77 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \
77 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \ 78 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \
78 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \ 79 --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \
diff --git a/tests/stm32/.cargo/config.toml b/tests/stm32/.cargo/config.toml
index 586a63875..eafab3ed0 100644
--- a/tests/stm32/.cargo/config.toml
+++ b/tests/stm32/.cargo/config.toml
@@ -3,9 +3,8 @@ build-std = ["core"]
3build-std-features = ["panic_immediate_abort"] 3build-std-features = ["panic_immediate_abort"]
4 4
5[target.'cfg(all(target_arch = "arm", target_os = "none"))'] 5[target.'cfg(all(target_arch = "arm", target_os = "none"))']
6# replace STM32F429ZITx with your chip as listed in `probe-run --list-chips` 6runner = "teleprobe client run --target bluepill-stm32f103c8 --elf"
7#runner = "teleprobe run --chip STM32G071RBTx --elf" 7#runner = "teleprobe local run --chip STM32F103C8 --elf"
8runner = "./teleprobe.sh nucleo-stm32f429zi"
9 8
10rustflags = [ 9rustflags = [
11 # Code-size optimizations. 10 # Code-size optimizations.
@@ -15,4 +14,4 @@ rustflags = [
15] 14]
16 15
17[build] 16[build]
18target = "thumbv7em-none-eabi" 17target = "thumbv7m-none-eabi"
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index 8d0901091..041ec76ad 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -6,6 +6,7 @@ version = "0.1.0"
6resolver = "2" 6resolver = "2"
7 7
8[features] 8[features]
9stm32f103c8 = ["embassy-stm32/stm32f103c8"]
9stm32f429zi = ["embassy-stm32/stm32f429zi"] 10stm32f429zi = ["embassy-stm32/stm32f429zi"]
10stm32g071rb = ["embassy-stm32/stm32g071rb"] 11stm32g071rb = ["embassy-stm32/stm32g071rb"]
11stm32g491re = ["embassy-stm32/stm32g491re"] 12stm32g491re = ["embassy-stm32/stm32g491re"]
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs
index 305da8d12..41c10d45f 100644
--- a/tests/stm32/src/bin/gpio.rs
+++ b/tests/stm32/src/bin/gpio.rs
@@ -16,6 +16,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
16 16
17 // Arduino pins D0 and D1 17 // Arduino pins D0 and D1
18 // They're connected together with a 1K resistor. 18 // They're connected together with a 1K resistor.
19 #[cfg(feature = "stm32f103c8")]
20 let (mut a, mut b) = (p.PA9, p.PA10);
19 #[cfg(feature = "stm32g491re")] 21 #[cfg(feature = "stm32g491re")]
20 let (mut a, mut b) = (p.PC4, p.PC5); 22 let (mut a, mut b) = (p.PC4, p.PC5);
21 #[cfg(feature = "stm32g071rb")] 23 #[cfg(feature = "stm32g071rb")]
diff --git a/tests/stm32/src/bin/spi_dma.rs b/tests/stm32/src/bin/spi_dma.rs
index bf682e097..f224d3446 100644
--- a/tests/stm32/src/bin/spi_dma.rs
+++ b/tests/stm32/src/bin/spi_dma.rs
@@ -15,6 +15,8 @@ use example_common::*;
15async fn main(_spawner: Spawner, p: Peripherals) { 15async fn main(_spawner: Spawner, p: Peripherals) {
16 info!("Hello World!"); 16 info!("Hello World!");
17 17
18 #[cfg(feature = "stm32f103c8")]
19 let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2);
18 #[cfg(feature = "stm32f429zi")] 20 #[cfg(feature = "stm32f429zi")]
19 let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA2_CH3, p.DMA2_CH2); 21 let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA2_CH3, p.DMA2_CH2);
20 #[cfg(feature = "stm32h755zi")] 22 #[cfg(feature = "stm32h755zi")]
diff --git a/tests/stm32/src/bin/usart.rs b/tests/stm32/src/bin/usart.rs
index 44ee730e4..87a593ca5 100644
--- a/tests/stm32/src/bin/usart.rs
+++ b/tests/stm32/src/bin/usart.rs
@@ -23,6 +23,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
23 23
24 // Arduino pins D0 and D1 24 // Arduino pins D0 and D1
25 // They're connected together with a 1K resistor. 25 // They're connected together with a 1K resistor.
26 #[cfg(feature = "stm32f103c8")]
27 let (tx, rx, usart) = (p.PA9, p.PA10, p.USART1);
26 #[cfg(feature = "stm32g491re")] 28 #[cfg(feature = "stm32g491re")]
27 let (tx, rx, usart) = (p.PC4, p.PC5, p.USART1); 29 let (tx, rx, usart) = (p.PC4, p.PC5, p.USART1);
28 #[cfg(feature = "stm32g071rb")] 30 #[cfg(feature = "stm32g071rb")]
diff --git a/tests/stm32/src/bin/usart_dma.rs b/tests/stm32/src/bin/usart_dma.rs
index 37faaf376..3cf9c7860 100644
--- a/tests/stm32/src/bin/usart_dma.rs
+++ b/tests/stm32/src/bin/usart_dma.rs
@@ -22,6 +22,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
22 22
23 // Arduino pins D0 and D1 23 // Arduino pins D0 and D1
24 // They're connected together with a 1K resistor. 24 // They're connected together with a 1K resistor.
25 #[cfg(feature = "stm32f103c8")]
26 let (tx, rx, usart, tx_dma, rx_dma) = (p.PA9, p.PA10, p.USART1, p.DMA1_CH4, p.DMA1_CH5);
25 #[cfg(feature = "stm32g491re")] 27 #[cfg(feature = "stm32g491re")]
26 let (tx, rx, usart, tx_dma, rx_dma) = (p.PC4, p.PC5, p.USART1, p.DMA1_CH0, p.DMA1_CH1); 28 let (tx, rx, usart, tx_dma, rx_dma) = (p.PC4, p.PC5, p.USART1, p.DMA1_CH0, p.DMA1_CH1);
27 #[cfg(feature = "stm32g071rb")] 29 #[cfg(feature = "stm32g071rb")]