move debugging output to common code
authorKarl Palsson <karlp@tweak.net.au>
Fri, 7 Oct 2011 20:21:37 +0000 (20:21 +0000)
committerKarl Palsson <karlp@tweak.net.au>
Fri, 7 Oct 2011 20:21:37 +0000 (20:21 +0000)
src/stlink-common.c
src/stlink-sg.c

index 5f1e0c3d5af5240c3b6d281cb7915464bfd74d5d..93b5e766c303f6a22efd43b95a2387c8249c6c25 100644 (file)
@@ -280,6 +280,8 @@ void stlink_exit_dfu_mode(stlink_t *sl) {
 void stlink_core_id(stlink_t *sl) {
     D(sl, "\n*** stlink_core_id ***\n");
     sl->backend->core_id(sl);
+    if (sl->verbose > 2)
+        stlink_print_data(sl);
     DD(sl, "core_id = 0x%08x\n", sl->core_id);
 }
 
index 63640e60aba121e8ed84aaab5a7729605eea5483..86238be22dcf52111ff9ca99f3f3a436ec577511 100644 (file)
@@ -421,9 +421,6 @@ void _stlink_sg_core_id(stlink_t *sl) {
     sg->q_addr = 0;
     stlink_q(sl);
     sl->core_id = read_uint32(sl->q_buf, 0);
-    if (sl->verbose < 2)
-        return;
-    stlink_print_data(sl);
 }
 
 // Arm-core reset -> halted state.