diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mpremote/mpremote/console.py | 2 | ||||
| -rw-r--r-- | tools/mpremote/mpremote/pyboardextended.py | 2 | ||||
| -rwxr-xr-x | tools/mpy-tool.py | 7 | ||||
| -rwxr-xr-x | tools/mpy_ld.py | 1 |
4 files changed, 5 insertions, 7 deletions
diff --git a/tools/mpremote/mpremote/console.py b/tools/mpremote/mpremote/console.py index a0ee55dce..e34fd9e27 100644 --- a/tools/mpremote/mpremote/console.py +++ b/tools/mpremote/mpremote/console.py @@ -172,5 +172,5 @@ else: try: set_conout_mode(mode, mask) VT_ENABLED = True - except WindowsError as e: + except WindowsError: VT_ENABLED = False diff --git a/tools/mpremote/mpremote/pyboardextended.py b/tools/mpremote/mpremote/pyboardextended.py index 6bad94a56..b9dbd1e3b 100644 --- a/tools/mpremote/mpremote/pyboardextended.py +++ b/tools/mpremote/mpremote/pyboardextended.py @@ -449,7 +449,7 @@ class PyboardCommand: try: stat = os.lstat(self.data_ilistdir[0] + "/" + entry) mode = stat.st_mode & 0xC000 - except OSError as er: + except OSError: mode = 0 self.wr_str(entry) self.wr_u32(mode) diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index fe83305d7..7f581d0b1 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -1120,7 +1120,6 @@ class RawCodeNative(RawCode): i_top = len(self.fun_data) i = 0 - qi = 0 while i < i_top: # copy machine code (max 16 bytes) i16 = min(i + 16, i_top) @@ -1276,7 +1275,7 @@ def read_raw_code(reader, parent_name, qstr_table, obj_table, segments): if native_scope_flags & MP_SCOPE_FLAG_VIPERRODATA: rodata_size = reader.read_uint() if native_scope_flags & MP_SCOPE_FLAG_VIPERBSS: - bss_size = reader.read_uint() + reader.read_uint() # bss_size if native_scope_flags & MP_SCOPE_FLAG_VIPERRODATA: reader.read_bytes(rodata_size) if native_scope_flags & MP_SCOPE_FLAG_VIPERRELOC: @@ -1285,10 +1284,10 @@ def read_raw_code(reader, parent_name, qstr_table, obj_table, segments): if op == 0xFF: break if op & 1: - addr = reader.read_uint() + reader.read_uint() # addr op >>= 1 if op <= 5 and op & 1: - n = reader.read_uint() + reader.read_uint() # n else: assert kind == MP_CODE_NATIVE_ASM native_n_pos_args = reader.read_uint() diff --git a/tools/mpy_ld.py b/tools/mpy_ld.py index 05e70709a..87e57869f 100755 --- a/tools/mpy_ld.py +++ b/tools/mpy_ld.py @@ -471,7 +471,6 @@ def do_relocation_text(env, text_addr, r): # Extract relevant info about symbol that's being relocated s = r.sym s_bind = s.entry["st_info"]["bind"] - s_shndx = s.entry["st_shndx"] s_type = s.entry["st_info"]["type"] r_offset = r["r_offset"] + text_addr r_info_type = r["r_info_type"] |
