diff options
| author | Damien George | 2016-01-31 22:16:41 +0000 |
|---|---|---|
| committer | Damien George | 2016-04-13 16:07:47 +0100 |
| commit | f9448ddc2c49d7cdaf7dee8ed5e88837e8964f05 (patch) | |
| tree | 8a8d82158a8f4a23b76e183a461b7a70ebb41066 /minimal/Makefile | |
| parent | 0a2e9650f5383bc1190d6b27a3d923e313c3d879 (diff) | |
minimal: Add example of frozen persistent bytecode (.mpy file).
frozentest.py is frozen into the binary as frozen bytecode. The .mpy
file is included so that there is no dependency on the cross compiler.
Diffstat (limited to 'minimal/Makefile')
| -rw-r--r-- | minimal/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/minimal/Makefile b/minimal/Makefile index 3206a2121..457d63e31 100644 --- a/minimal/Makefile +++ b/minimal/Makefile @@ -50,6 +50,7 @@ SRC_C = \ lib/utils/pyexec.c \ lib/libc/string0.c \ lib/mp-readline/readline.c \ + $(BUILD)/_frozen_mpy.c \ OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) @@ -59,6 +60,10 @@ else all: $(BUILD)/firmware.elf endif +$(BUILD)/_frozen_mpy.c: frozentest.mpy + $(ECHO) "MISC freezing bytecode" + $(Q)../tools/mpy-tool.py -f -q $(BUILD)/genhdr/qstrdefs.preprocessed.h -mlongint-impl=none $^ > $@ + $(BUILD)/firmware.elf: $(OBJ) $(ECHO) "LINK $@" $(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS) |
