From 11b0785067e1df1de46a7bace6038dd4073b5e9e Mon Sep 17 00:00:00 2001 From: Per <Per Lindgren> Date: Thu, 4 Jan 2018 15:29:08 +0100 Subject: [PATCH] Cargo --- Cargo.toml | 10 +++++++--- src/main.rs | 12 +++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 004638a..c0f4057 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,14 +19,14 @@ cortex-m-semihosting = "0.2.0" [dependencies.cortex-m-debug] version = "0.1.0" -path = "../cortex-m-debug" +git = "https://gitlab.henriktjader.com/pln/cortex-m-debug.git" [dependencies.cortex-m-rt] features = ["abort-on-panic"] version = "0.3.3" -[dependencies.stm32f413] -path = "../stm32f413" +[dependencies.stm32f40x] +git = "https://gitlab.henriktjader.com/pln/STM32F40x.git" features = ["rt"] version = "0.1.0" @@ -37,3 +37,7 @@ wcet_nop = [] [profile.release] lto = true debug = true + +[profile.dev] +codegen-units = 1 +incremental = false \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 7d990ce..e682a27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,16 +8,16 @@ extern crate cortex_m; extern crate cortex_m_rtfm as rtfm; -extern crate stm32f413; +extern crate stm32f40x; #[macro_use] extern crate cortex_m_debug; -use stm32f413::Interrupt; +use stm32f40x::Interrupt; use rtfm::{app, Resource, Threshold}; app! { - device: stm32f413, + device: stm32f40x, resources: { static LOW: u64 = 0; @@ -46,7 +46,6 @@ app! { } fn init(p: init::Peripherals, _r: init::Resources) { - //iprintln!(&p.ITM.stim[0], "Hello ITM"); ipln!("Hello nasty"); ipln!(); ipln!("Well it's..."); @@ -74,7 +73,10 @@ fn idle() -> ! { } #[allow(non_snake_case)] -fn exti0(t: &mut Threshold, EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resources) { +fn exti0( + t: &mut Threshold, + EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resources, +) { // Because this task has a priority of 1 the preemption threshold `t` also // starts at 1 -- GitLab