File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ SRC_C = \
50
50
lib/utils/pyexec.c \
51
51
lib/libc/string0.c \
52
52
lib/mp-readline/readline.c \
53
+ $(BUILD ) /_frozen_mpy.c \
53
54
54
55
OBJ = $(PY_O ) $(addprefix $(BUILD ) /, $(SRC_C:.c=.o ) )
55
56
59
60
all : $(BUILD ) /firmware.elf
60
61
endif
61
62
63
+ $(BUILD ) /_frozen_mpy.c : frozentest.mpy
64
+ $(ECHO ) " MISC freezing bytecode"
65
+ $(Q ) ../tools/mpy-tool.py -f -q $(BUILD ) /genhdr/qstrdefs.preprocessed.h -mlongint-impl=none $^ > $@
66
+
62
67
$(BUILD ) /firmware.elf : $(OBJ )
63
68
$(ECHO ) " LINK $@ "
64
69
$(Q )$(LD ) $(LDFLAGS ) -o $@ $^ $(LIBS )
Original file line number Diff line number Diff line change
1
+ print ('uPy' )
2
+ print ('a long string that is not interned' )
3
+ print ('a string that has unicode αβγ chars' )
4
+ print (b'bytes 1234\x01 ' )
5
+ print (123456789 )
6
+ for i in range (4 ):
7
+ print (i )
Original file line number Diff line number Diff line change 3
3
// options to control how Micro Python is built
4
4
5
5
#define MICROPY_QSTR_BYTES_IN_HASH (1)
6
+ #define MICROPY_QSTR_EXTRA_POOL mp_qstr_frozen_const_pool
6
7
#define MICROPY_ALLOC_PATH_MAX (256)
7
8
#define MICROPY_ALLOC_PARSE_CHUNK_INIT (16)
8
9
#define MICROPY_EMIT_X64 (0)
43
44
#define MICROPY_PY_IO (0)
44
45
#define MICROPY_PY_STRUCT (0)
45
46
#define MICROPY_PY_SYS (0)
46
- #define MICROPY_MODULE_FROZEN (0 )
47
+ #define MICROPY_MODULE_FROZEN_MPY (1 )
47
48
#define MICROPY_CPYTHON_COMPAT (0)
48
49
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
49
50
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_NONE)
You can’t perform that action at this time.
0 commit comments