Skip to content

Commit

Permalink
tools/mpy-tool.py: Fix static qstrs when freezing without qstr header.
Browse files Browse the repository at this point in the history
It's rare to freeze .mpy files without specifying a qstr header from a
firmware build, but it can be useful for testing, eg
`mpy-tool.py -f test.mpy`.  Fix this case so static qstrs are properly
excluded from the frozen qstr list.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Feb 12, 2024
1 parent abe43fe commit 0432f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/mpy-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ def main():
else:
config.MICROPY_QSTR_BYTES_IN_LEN = 1
config.MICROPY_QSTR_BYTES_IN_HASH = 1
firmware_qstr_idents = set(qstrutil.static_qstr_list)
firmware_qstr_idents = set(qstrutil.static_qstr_list_ident)

# Create initial list of global qstrs.
global_qstrs = GlobalQStrList()
Expand Down

0 comments on commit 0432f73

Please sign in to comment.