From 7b2a0421519f64da89266d3e2524fd1b00000643 Mon Sep 17 00:00:00 2001
From: Grumme2 <agh@live.se>
Date: Wed, 15 Apr 2020 14:43:10 +0200
Subject: [PATCH] bare1_2

---
 .vscode/launch.json | 18 +++++++++---------
 examples/bare1.rs   | 10 ++++++++--
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/.vscode/launch.json b/.vscode/launch.json
index c361322..f46a995 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -18,7 +18,7 @@
             "configFiles": [
                 //"interface/stlink.cfg",
                 "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+                // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor arm semihosting enable"
@@ -41,7 +41,7 @@
             "configFiles": [
                 //"interface/stlink.cfg",
                 "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+                // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor arm semihosting enable",
@@ -76,8 +76,8 @@
             "executable": "./target/thumbv7em-none-eabihf/debug/examples/${fileBasenameNoExtension}",
             "configFiles": [
                 "interface/stlink.cfg",
-                // "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+                "interface/stlink-v2-1.cfg", // deprecated setup script
+                // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor arm semihosting enable",
@@ -101,8 +101,8 @@
             "executable": "./target/thumbv7em-none-eabihf/debug/examples/${fileBasenameNoExtension}",
             "configFiles": [
                 "interface/stlink.cfg",
-                // "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+                "interface/stlink-v2-1.cfg", // deprecated setup script
+                // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor arm semihosting enable",
@@ -127,7 +127,7 @@
             "configFiles": [
                 //"interface/stlink.cfg",
                 "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+               // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor arm semihosting enable",
@@ -152,7 +152,7 @@
             "configFiles": [
                 //"interface/stlink.cfg",
                 "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+                // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor arm semihosting enable",
@@ -177,7 +177,7 @@
             "configFiles": [
                 //"interface/stlink.cfg",
                 "interface/stlink-v2-1.cfg", // deprecated setup script
-                "target/stm32f4x.cfg"
+                // "target/stm32f4x.cfg"
             ],
             "postLaunchCommands": [
                 "monitor reset init", // sets the MCU to 64MHz
diff --git a/examples/bare1.rs b/examples/bare1.rs
index 7f8b642..962f7c4 100644
--- a/examples/bare1.rs
+++ b/examples/bare1.rs
@@ -59,7 +59,7 @@ fn main() -> ! {
 //    (passing 3 breakpoints)
 //
 //    ** your answer here **
-//    The program panics "panicked at 'attempt to add with overflow', examples/bare1.rs:23:9 "
+//    The program panicsc
 
 //    What is the `ITM` output.
 //
@@ -75,9 +75,15 @@ fn main() -> ! {
 //
 //    What is the output of:
 //    > disassemble
-//
 //    ** your answer here **
 //
+//      Dump of assembler code for function main:
+//        0x08000400 <+0>:     push    {r7, lr}
+//        0x08000402 <+2>:     mov     r7, sp
+//     => 0x08000404 <+4>:     bl      0x800040a <bare1::__cortex_m_rt_main>
+//        0x08000408 <+8>:     udf     #254    ; 0xfe
+//     End of assembler dump.
+//
 //    How many instructions are in between the two `bkpt` instructions in the loop.
 //    Notice, the generated code may not be exactly what you expect :)
 //
-- 
GitLab