[riot-notifications] [RIOT-OS/RIOT] Add helper script for Black Magic Probe (#12251)

maz3max notifications at github.com
Mon Sep 23 14:39:45 CEST 2019


maz3max commented on this pull request.



> +
+def gdb_write_and_wait_for_result(gdbmi, cmd, description, expected_result='done'):
+    res = gdbmi.write(cmd, timeout_sec=TIMEOUT)
+    while True:
+        for msg in res:
+            if msg['type'] == 'result':
+                if msg['message'] == expected_result:
+                    print(description, "successful.")
+                    return True
+                else:
+                    print(description, "failed.", file=sys.stderr)
+                    return False
+        res = gdbmi.get_gdb_response(timeout_sec=TIMEOUT)
+
+
+if __name__ == '__main__':

Do you mean code from the main function? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12251#discussion_r327090358
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190923/6d6dfeb6/attachment.htm>


More information about the notifications mailing list