From cfd2994fb785800054b076bdb734114854b3fc65 Mon Sep 17 00:00:00 2001 From: Per Lindgren <per.lindgren@ltu.se> Date: Thu, 10 Jan 2019 00:20:19 +0100 Subject: [PATCH] bare8 --- .vscode/launch.json | 35 ++++++++++++++++++++++++++++++++--- .vscode/tasks.json | 36 ++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 1cc5296..f2dcf0a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -613,7 +613,8 @@ "type": "cortex-debug", "request": "launch", "servertype": "openocd", - "name": "c bare8 16Mhz", + "name": "bare8 (debug)", + "preLaunchTask": "cargo build --example bare8 --features stm32f4", "executable": "./target/thumbv7em-none-eabihf/debug/examples/bare8", "configFiles": [ "interface/stlink.cfg", @@ -622,16 +623,44 @@ "swoConfig": { "enabled": true, "cpuFrequency": 16000000, - "swoFrequency": 2000000, // you may try 1000000 if not working + "swoFrequency": 2000000, "source": "probe", "decoders": [ { "type": "console", - "label": "Name", + "label": "ITM", "port": 0 } ] }, + "svdFile": "STM32F413.svd", + "cwd": "${workspaceRoot}" + }, + { + "type": "cortex-debug", + "request": "launch", + "servertype": "openocd", + "name": "bare9 (debug)", + "preLaunchTask": "cargo build --example bare9 --features stm32f4", + "executable": "./target/thumbv7em-none-eabihf/debug/examples/bare9", + "configFiles": [ + "interface/stlink.cfg", + "target/stm32f4x.cfg" + ], + "swoConfig": { + "enabled": true, + "cpuFrequency": 16000000, + "swoFrequency": 2000000, + "source": "probe", + "decoders": [ + { + "type": "console", + "label": "ITM", + "port": 0 + } + ] + }, + "svdFile": "STM32F413.svd", "cwd": "${workspaceRoot}" }, ] diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 06b3cd1..05e549f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -219,5 +219,41 @@ "isDefault": true } }, + { + "type": "shell", + "label": "cargo build --example bare8 --features stm32f4", + "command": "cargo build --example bare8 --features stm32f4", + "problemMatcher": [ + "$rustc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "type": "shell", + "label": "cargo build --example bare8 --features stm32f4", + "command": "cargo build --example bare8 --features stm32f4", + "problemMatcher": [ + "$rustc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "type": "shell", + "label": "cargo build --example bare9 --features stm32f4", + "command": "cargo build --example bare9 --features stm32f4", + "problemMatcher": [ + "$rustc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, ] } \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index b7f933d..2ccfbed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ panic-semihosting = "0.5.1" panic-itm = "0.4.0" bare-metal = "0.2.4" nb = "0.1.1" +cortex-m-rtfm = "0.4.0" [dependencies.cortex-m] version = "0.5.8" -- GitLab