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

maz3max notifications at github.com
Tue Sep 24 14:47:22 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__':

I moved some stuff out of the main function, is it better now?

-- 
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_r327586844
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190924/f3b38321/attachment-0001.htm>


More information about the notifications mailing list