diff --git a/.vscode/launch.json b/.vscode/launch.json index cf8d8a9187784c49dd1448daaf6bb7a1cd0da899..efdb5fba0f9622a0060235bc1f5cbe9ca0525eaa 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,17 +9,14 @@ "request": "attach", "name": "Release", "gdbpath": "/usr/bin/arm-none-eabi-gdb", - "executable": "./target/thumbv7em-none-eabihf/release/bluepill", + //"executable": "./target/thumbv7em-none-eabihf/release/bluepill", "target": ":3333", "remote": true, "autorun": [ "monitor arm semihosting enable", "monitor reset init", - //"set target-async off", - "load ./target/thumbv7em-none-eabihf/release/bluepill" - //"set remotetimeout 30", - //"monitor reset halt", - //"step" + "file ./target/thumbv7em-none-eabihf/release/bluepill", + "load" ], "cwd": "${workspaceRoot}" }, @@ -28,22 +25,14 @@ "request": "attach", "name": "Debug", "gdbpath": "/usr/bin/arm-none-eabi-gdb", - "executable": "./target/thumbv7em-none-eabihf/debug/bluepill", + //"executable": "./target/thumbv7em-none-eabihf/debug/bluepill", "target": ":3333", "remote": true, "autorun": [ "monitor reset init", "monitor arm semihosting enable", - "set mem inaccessible-by-default off", - "d breakpoints", - //"set target-async off", - "set remotetimeout 300", - //"monitor reset halt", - "load ./target/thumbv7em-none-eabihf/debug/bluepill", - "step", - "monitor reset halt" - //"info target" - //"cont" + "file ./target/thumbv7em-none-eabihf/debug/bluepill", + "load" ], "cwd": "${workspaceRoot}" } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e16c85b372e3fe77d44e3e1cf1464d000e18fb60..fd45ed4de64e4f64aa56fa194d28be23413ebf32 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,10 +7,6 @@ "taskName": "xargo build --release", "type": "shell", "command": "xargo build --release", - "group": { - "kind": "build", - "isDefault": true - }, "problemMatcher": [ "$rustc" ] @@ -21,6 +17,7 @@ "command": "xargo build", "group": { "kind": "build", + "isDefault": true }, "problemMatcher": [ "$rustc" diff --git a/src/main.rs b/src/main.rs index 1c913dbd42df9523d3910f5f82851dbd855eccf1..6f74b52b6981ae8d219b6dc8a6bed2d91a632e89 100644 --- a/src/main.rs +++ b/src/main.rs @@ -233,16 +233,19 @@ fn main() { writeln!(stdout, "{:#08x}", codgen(&mut seed)).unwrap(); seed = 0x0e0657c1; - //asm::bkpt(); + asm::bkpt(); unsafe { (*DWT.get()).enable_cycle_counter(); (*DWT.get()).cyccnt.write(0); } - //asm::bkpt(); + asm::bkpt(); decode(&ABC, unsafe { &mut PLAIN }, &mut seed); - //asm::bkpt(); - writeln!(stdout, "string {}", from_utf8(unsafe { &PLAIN }).unwrap()) - .unwrap(); + asm::bkpt(); + writeln!( + stdout, + "plain string {}", + from_utf8(unsafe { &PLAIN }).unwrap() + ).unwrap(); } // As we are not using interrupts, we just register a dummy catch all handler