fix build issues

This commit is contained in:
Dominic 2024-01-25 15:13:33 +01:00
parent 2ec6d250fe
commit 0daba46452
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
3 changed files with 6 additions and 10 deletions

View file

@ -1,8 +1,5 @@
# [target.thumbv7em-none-eabihf]
# runner = "probe-rs run --chip STM32L476RGTx"
[build]
target = "thumbv6m-none-eabi"
target = "thumbv7m-none-eabi"
[env]
DEFMT_LOG = "trace"

View file

@ -28,5 +28,4 @@ fn main() {
println!("cargo:rustc-link-arg-bins=--nmagic");
println!("cargo:rustc-link-arg-bins=-Tlink.x");
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
}

View file

@ -1,6 +1,7 @@
#![no_std]
#![no_main]
#![allow(clippy::unnecessary_literal_unwrap)] // "false positive"
#![allow(clippy::too_many_arguments)]
#![warn(rust_2018_idioms)]
#![forbid(elided_lifetimes_in_paths)]
@ -9,11 +10,12 @@ mod spi_slave;
use embassy_executor::Spawner;
use embassy_stm32::{
bind_interrupts,
dma::NoDma,
gpio::{self, Output},
peripherals::USART1,
time::{mhz, Hertz},
usart::{self, Uart},
Config, dma::NoDma
Config
};
use panic_halt as _;
use spi_slave::SpiSlave;
@ -38,10 +40,8 @@ async fn main(_spawner: Spawner) {
let p = embassy_stm32::init(config());
let uart1_cfg = usart::Config::default();
let mut uart1 = Uart::new(
p.USART1, p.PA10, p.PA9, Irqs, p.DMA1_CH4, NoDma, uart1_cfg
)
.unwrap();
let mut uart1 =
Uart::new(p.USART1, p.PA10, p.PA9, Irqs, p.DMA1_CH4, NoDma, uart1_cfg).unwrap();
let spi1_cfg = spi_slave::Config::default();
let mut spi1 = SpiSlave::new(