stm32: add stm32f103 bluepill to HIL tests.

This commit is contained in:
Dario Nieuwenhuis 2022-02-24 00:19:26 +01:00
parent 1b3c34b923
commit e39fd4a736
7 changed files with 13 additions and 4 deletions

1
ci.sh
View File

@ -73,6 +73,7 @@ cargo batch \
--- build --release --manifest-path examples/stm32wb55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wb55 \ --- build --release --manifest-path examples/stm32wb55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wb55 \
--- build --release --manifest-path examples/stm32wl55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wl55 \ --- build --release --manifest-path examples/stm32wl55/Cargo.toml --target thumbv7em-none-eabihf --out-dir out/examples/stm32wl55 \
--- build --release --manifest-path examples/wasm/Cargo.toml --target wasm32-unknown-unknown --out-dir out/examples/wasm \ --- build --release --manifest-path examples/wasm/Cargo.toml --target wasm32-unknown-unknown --out-dir out/examples/wasm \
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f103c8 --out-dir out/tests/bluepill-stm32f103c8 \
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \ --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \ --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \ --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \

View File

@ -3,9 +3,8 @@ build-std = ["core"]
build-std-features = ["panic_immediate_abort"] build-std-features = ["panic_immediate_abort"]
[target.'cfg(all(target_arch = "arm", target_os = "none"))'] [target.'cfg(all(target_arch = "arm", target_os = "none"))']
# replace STM32F429ZITx with your chip as listed in `probe-run --list-chips` runner = "teleprobe client run --target bluepill-stm32f103c8 --elf"
#runner = "teleprobe run --chip STM32G071RBTx --elf" #runner = "teleprobe local run --chip STM32F103C8 --elf"
runner = "./teleprobe.sh nucleo-stm32f429zi"
rustflags = [ rustflags = [
# Code-size optimizations. # Code-size optimizations.
@ -15,4 +14,4 @@ rustflags = [
] ]
[build] [build]
target = "thumbv7em-none-eabi" target = "thumbv7m-none-eabi"

View File

@ -6,6 +6,7 @@ version = "0.1.0"
resolver = "2" resolver = "2"
[features] [features]
stm32f103c8 = ["embassy-stm32/stm32f103c8"]
stm32f429zi = ["embassy-stm32/stm32f429zi"] stm32f429zi = ["embassy-stm32/stm32f429zi"]
stm32g071rb = ["embassy-stm32/stm32g071rb"] stm32g071rb = ["embassy-stm32/stm32g071rb"]
stm32g491re = ["embassy-stm32/stm32g491re"] stm32g491re = ["embassy-stm32/stm32g491re"]

View File

@ -16,6 +16,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Arduino pins D0 and D1 // Arduino pins D0 and D1
// They're connected together with a 1K resistor. // They're connected together with a 1K resistor.
#[cfg(feature = "stm32f103c8")]
let (mut a, mut b) = (p.PA9, p.PA10);
#[cfg(feature = "stm32g491re")] #[cfg(feature = "stm32g491re")]
let (mut a, mut b) = (p.PC4, p.PC5); let (mut a, mut b) = (p.PC4, p.PC5);
#[cfg(feature = "stm32g071rb")] #[cfg(feature = "stm32g071rb")]

View File

@ -15,6 +15,8 @@ use example_common::*;
async fn main(_spawner: Spawner, p: Peripherals) { async fn main(_spawner: Spawner, p: Peripherals) {
info!("Hello World!"); info!("Hello World!");
#[cfg(feature = "stm32f103c8")]
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2);
#[cfg(feature = "stm32f429zi")] #[cfg(feature = "stm32f429zi")]
let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA2_CH3, p.DMA2_CH2); let (sck, mosi, miso, tx_dma, rx_dma) = (p.PA5, p.PA7, p.PA6, p.DMA2_CH3, p.DMA2_CH2);
#[cfg(feature = "stm32h755zi")] #[cfg(feature = "stm32h755zi")]

View File

@ -23,6 +23,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Arduino pins D0 and D1 // Arduino pins D0 and D1
// They're connected together with a 1K resistor. // They're connected together with a 1K resistor.
#[cfg(feature = "stm32f103c8")]
let (tx, rx, usart) = (p.PA9, p.PA10, p.USART1);
#[cfg(feature = "stm32g491re")] #[cfg(feature = "stm32g491re")]
let (tx, rx, usart) = (p.PC4, p.PC5, p.USART1); let (tx, rx, usart) = (p.PC4, p.PC5, p.USART1);
#[cfg(feature = "stm32g071rb")] #[cfg(feature = "stm32g071rb")]

View File

@ -22,6 +22,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Arduino pins D0 and D1 // Arduino pins D0 and D1
// They're connected together with a 1K resistor. // They're connected together with a 1K resistor.
#[cfg(feature = "stm32f103c8")]
let (tx, rx, usart, tx_dma, rx_dma) = (p.PA9, p.PA10, p.USART1, p.DMA1_CH4, p.DMA1_CH5);
#[cfg(feature = "stm32g491re")] #[cfg(feature = "stm32g491re")]
let (tx, rx, usart, tx_dma, rx_dma) = (p.PC4, p.PC5, p.USART1, p.DMA1_CH0, p.DMA1_CH1); let (tx, rx, usart, tx_dma, rx_dma) = (p.PC4, p.PC5, p.USART1, p.DMA1_CH0, p.DMA1_CH1);
#[cfg(feature = "stm32g071rb")] #[cfg(feature = "stm32g071rb")]