summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mpy-tool.py8
-rwxr-xr-xtools/pyboard.py9
2 files changed, 11 insertions, 6 deletions
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index ded962487..ac7b2c1cc 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -57,7 +57,7 @@ class FreezeError(Exception):
return 'error while freezing %s: %s' % (self.rawcode.source_file, self.msg)
class Config:
- MPY_VERSION = 2
+ MPY_VERSION = 3
MICROPY_LONGINT_IMPL_NONE = 0
MICROPY_LONGINT_IMPL_LONGLONG = 1
MICROPY_LONGINT_IMPL_MPZ = 2
@@ -105,7 +105,7 @@ def make_opcode_format():
OC4(O, O, U, U), # 0x38-0x3b
OC4(U, O, B, O), # 0x3c-0x3f
OC4(O, B, B, O), # 0x40-0x43
- OC4(B, B, O, U), # 0x44-0x47
+ OC4(B, B, O, B), # 0x44-0x47
OC4(U, U, U, U), # 0x48-0x4b
OC4(U, U, U, U), # 0x4c-0x4f
OC4(V, V, U, V), # 0x50-0x53
@@ -145,7 +145,7 @@ def make_opcode_format():
OC4(B, B, B, B), # 0xcc-0xcf
OC4(B, B, B, B), # 0xd0-0xd3
- OC4(B, B, B, B), # 0xd4-0xd7
+ OC4(U, U, U, B), # 0xd4-0xd7
OC4(B, B, B, B), # 0xd8-0xdb
OC4(B, B, B, B), # 0xdc-0xdf
@@ -156,7 +156,7 @@ def make_opcode_format():
OC4(B, B, B, B), # 0xf0-0xf3
OC4(B, B, B, B), # 0xf4-0xf7
- OC4(B, B, B, U), # 0xf8-0xfb
+ OC4(U, U, U, U), # 0xf8-0xfb
OC4(U, U, U, U), # 0xfc-0xff
))
diff --git a/tools/pyboard.py b/tools/pyboard.py
index d15f520ac..16ee41f70 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -5,6 +5,7 @@
# The MIT License (MIT)
#
# Copyright (c) 2014-2016 Damien P. George
+# Copyright (c) 2017 Paul Sokolovsky
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +29,11 @@
pyboard interface
This module provides the Pyboard class, used to communicate with and
-control the pyboard over a serial USB connection.
+control a MicroPython device over a communication channel. Both real
+boards and emulated devices (e.g. running in QEMU) are supported.
+Various communication channels are supported, including a serial
+connection, telnet-style network connection, external process
+connection.
Example usage:
@@ -343,7 +348,7 @@ class Pyboard:
# check if we could exec command
data = self.serial.read(2)
if data != b'OK':
- raise PyboardError('could not exec command (response: %s)' % data)
+ raise PyboardError('could not exec command (response: %r)' % data)
def exec_raw(self, command, timeout=10, data_consumer=None):
self.exec_raw_no_follow(command);