From 0daba464522c2f3771f74ef80f1cd43c4bd1dfde Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 25 Jan 2024 15:13:33 +0100 Subject: [PATCH] fix build issues --- .cargo/config.toml | 5 +---- build.rs | 1 - src/main.rs | 10 +++++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 95d9bc1..1e1924d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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" diff --git a/build.rs b/build.rs index 035ede0..d662b20 100644 --- a/build.rs +++ b/build.rs @@ -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"); } diff --git a/src/main.rs b/src/main.rs index 5de974d..d376990 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(