Debugging tool for mbed enabled microcontrollers, especially for NUCLEO-F303RE and STM32F042F6P6.

Revision:
1:dbb9fcc20d07
Parent:
0:e36b454cc2e6
Child:
2:478ba8b83e3f
--- a/debug_serial.cpp	Mon May 06 00:01:17 2019 +0000
+++ b/debug_serial.cpp	Mon May 06 00:29:00 2019 +0000
@@ -79,6 +79,16 @@
 
 }
 
+// perform one breakpoint and print register
+//------------------------------------------------------------------------------------------------------------------ 
+void Debug_serial::breakpoint(int line_number, uint32_t address, uint32_t offset){
+
+    strcpy(var[2], var[1]);
+    strcpy(var[1], var[0]);
+    sprintf(var[0],"Address 0x%8x   Value 0x%8x", address + offset,read_word(address, offset));
+    print_3_breaks(line_number);
+
+}
 // print formatted string to debug serial port
 //------------------------------------------------------------------------------------------------------------------ 
 int Debug_serial::printf(const char* format, ...){