diff --git a/src/target/stm32f1.c b/src/target/stm32f1.c index 4cc1661..61d6f0e 100644 --- a/src/target/stm32f1.c +++ b/src/target/stm32f1.c @@ -165,7 +165,6 @@ bool stm32f1_probe(target *t) } flash_size = (target_mem_read32(t, FLASHSIZE_F0) & 0xffff) *0x400; - tc_printf(t, "flash size %d block_size %d\n", flash_size, block_size); target_add_ram(t, 0x20000000, 0x5000); stm32f1_add_flash(t, 0x8000000, flash_size, block_size); target_add_commands(t, stm32f1_cmd_list, "STM32F0"); diff --git a/src/target/target.c b/src/target/target.c index 2c112fd..0737eb2 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -446,6 +446,10 @@ void tc_printf(target *t, const char *fmt, ...) { (void)t; va_list ap; + + if (t->tc == NULL) + return; + va_start(ap, fmt); t->tc->printf(t->tc, fmt, ap); va_end(ap);