Clean up changelog from dh_make
[fw/stlink] / src / stlink-sg.c
index ae610bac7d71ac9cf85ff9d5d4417bd73da63c8a..53e93cce086c53471e2a3a7270f45a052f7cfb77 100644 (file)
@@ -878,7 +878,8 @@ stlink_backend_t _stlink_sg_backend = {
     _stlink_sg_write_reg,
     _stlink_sg_step,
     _stlink_sg_current_mode,
-    _stlink_sg_force_debug
+    _stlink_sg_force_debug,
+    NULL
 };
 
 static stlink_t* stlink_open(const int verbose) {
@@ -1021,7 +1022,7 @@ stlink_t* stlink_v1_open_inner(const int verbose) {
     return sl;
 }
 
-stlink_t* stlink_v1_open(const int verbose) {
+stlink_t* stlink_v1_open(const int verbose, int reset) {
     stlink_t *sl = stlink_v1_open_inner(verbose);
     if (sl == NULL) {
         fputs("Error: could not open stlink device\n", stderr);
@@ -1030,7 +1031,9 @@ stlink_t* stlink_v1_open(const int verbose) {
     // by now, it _must_ be fully open and in a useful mode....
        stlink_enter_swd_mode(sl);
     /* Now we are ready to read the parameters  */
-    stlink_reset(sl);
+    if (reset) {
+        stlink_reset(sl);
+    }
     stlink_load_device_params(sl);
     ILOG("Successfully opened a stlink v1 debugger\n");
     return sl;