Skip to content
Snippets Groups Projects
Commit d2b6104a authored by Per's avatar Per
Browse files

stm32f4 updates

parent 94c766e8
No related branches found
No related tags found
No related merge requests found
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"name": "resource 16Mhz",
"executable": "./target/thumbv7em-none-eabihf/release/examples/resource",
"configFiles": [
"interface/stlink.cfg",
"target/stm32f4x.cfg"
],
"swoConfig": {
"enabled": true,
"cpuFrequency": 16000000,
"swoFrequency": 2000000, // you may try 1000000 if not working
"source": "probe",
"decoders": [
{
"type": "console",
"label": "Name",
"port": 0
}
]
},
"cwd": "${workspaceRoot}"
},
]
}
\ No newline at end of file
...@@ -3,6 +3,18 @@ ...@@ -3,6 +3,18 @@
// for the documentation about the tasks.json format // for the documentation about the tasks.json format
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{
"label": "xargo build --example resource --release --features wcet_bkpt --target thumbv7em-none-eabihf",
"type": "shell",
"command": "xargo build --example resource --release --features wcet_bkpt --target thumbv7em-none-eabihf",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$rustc"
]
},
{ {
"label": "xargo build --example resource --features klee_mode --target x86_64-unknown-linux-gnu", "label": "xargo build --example resource --features klee_mode --target x86_64-unknown-linux-gnu",
"type": "shell", "type": "shell",
......
...@@ -25,9 +25,11 @@ untagged-option = "0.1.1" ...@@ -25,9 +25,11 @@ untagged-option = "0.1.1"
features = ["abort-on-panic"] features = ["abort-on-panic"]
version = "0.3.9" version = "0.3.9"
[dev-dependencies.stm32f103xx] [dev-dependencies.stm32f413]
git = "https://gitlab.henriktjader.com/pln/stm32f413.git"
features = ["rt"] features = ["rt"]
version = "0.8.0" version = "0.2.0"
[dev-dependencies.klee] [dev-dependencies.klee]
path = "./klee" path = "./klee"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
extern crate cortex_m_rtfm as rtfm; extern crate cortex_m_rtfm as rtfm;
// IMPORTANT always do this rename // IMPORTANT always do this rename
extern crate stm32f103xx; extern crate stm32f413;
#[macro_use] #[macro_use]
extern crate klee; extern crate klee;
...@@ -17,7 +17,7 @@ use rtfm::{app, Resource, Threshold}; ...@@ -17,7 +17,7 @@ use rtfm::{app, Resource, Threshold};
app! { app! {
// this is the path to the device crate // this is the path to the device crate
device: stm32f103xx, device: stm32f413,
resources: { resources: {
static X:u32 = 0; static X:u32 = 0;
...@@ -27,13 +27,21 @@ app! { ...@@ -27,13 +27,21 @@ app! {
tasks: { tasks: {
EXTI1: { EXTI1: {
path: exti1, path: exti1,
priority: 1,
resources: [X, Y], resources: [X, Y],
}, },
EXTI2: { EXTI2: {
path: exti2, path: exti2,
priority: 3,
resources: [Y], resources: [Y],
}, },
EXTI3: {
path: exti3,
priority: 2,
resources: [X],
},
}, },
} }
...@@ -60,6 +68,8 @@ fn exti2(t: &mut Threshold, mut r: EXTI2::Resources) { ...@@ -60,6 +68,8 @@ fn exti2(t: &mut Threshold, mut r: EXTI2::Resources) {
}); });
} }
fn exti3(_t: &mut Threshold, _r: EXTI3::Resources) {}
#[inline(never)] #[inline(never)]
#[allow(dead_code)] #[allow(dead_code)]
fn init(_p: init::Peripherals, _r: init::Resources) {} fn init(_p: init::Peripherals, _r: init::Resources) {}
......
...@@ -93,9 +93,9 @@ macro_rules! k_visit { ...@@ -93,9 +93,9 @@ macro_rules! k_visit {
} }
#[cfg(feature = "klee_mode")] #[cfg(feature = "klee_mode")]
pub fn k_read<T>(p: &T) { pub fn k_read<T>(_p: &T) {
unsafe { core::ptr::read_volatile(p) }; unsafe { core::ptr::read_volatile(p) };
} }
#[cfg(not(feature = "klee_mode"))] #[cfg(not(feature = "klee_mode"))]
pub fn k_read<T>(p: &T) {} pub fn k_read<T>(_p: &T) {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment