Turn down default logging level.
authorKarl Palsson <karlp@tweak.net.au>
Mon, 14 Nov 2011 04:11:10 +0000 (04:11 +0000)
committerKarl Palsson <karlp@tweak.net.au>
Mon, 14 Nov 2011 04:11:10 +0000 (04:11 +0000)
And remove dead/duplicate code that is included in the opening of the device

gdbserver/gdb-server.c

index ce0549e7abbbfdcb8ca912c918ab8caf84a26ec1..e7676219ce8151d84d80498ccd0a75cf7275fb08 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "gdb-remote.h"
 
-#define DEFAULT_LOGGING_LEVEL 100
+#define DEFAULT_LOGGING_LEVEL 50
 #define DEFAULT_GDB_LISTEN_PORT 4242
 
 #define STRINGIFY_inner(name) #name
@@ -169,17 +169,8 @@ int main(int argc, char** argv) {
                break;
     }
     
-    // ALLLL of this should move into "stlink_open_xxx"
-
-    if (stlink_current_mode(sl) != STLINK_DEV_DEBUG_MODE) {
-        if (stlink_current_mode(sl) == STLINK_DEV_DFU_MODE) {
-            stlink_exit_dfu_mode(sl);
-        }
-        stlink_enter_swd_mode(sl);
-    }
-
-       uint32_t chip_id = stlink_chip_id(sl);
-       uint32_t core_id = stlink_core_id(sl);
+       uint32_t chip_id = sl->chip_id;
+       uint32_t core_id = sl->core_id;
 
        /* Fix chip_id for F4 */
        if (((chip_id & 0xFFF) == 0x411) && (core_id == CORE_M4_R0)) {