summaryrefslogtreecommitdiff
path: root/minimal/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'minimal/main.c')
-rw-r--r--minimal/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/minimal/main.c b/minimal/main.c
index 5e104e7e8..6b77b1a42 100644
--- a/minimal/main.c
+++ b/minimal/main.c
@@ -9,6 +9,7 @@
#include "py/gc.h"
#include "lib/utils/pyexec.h"
+#if MICROPY_ENABLE_COMPILER
void do_str(const char *src, mp_parse_input_kind_t input_kind) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, src, strlen(src), 0);
if (lex == NULL) {
@@ -28,6 +29,7 @@ void do_str(const char *src, mp_parse_input_kind_t input_kind) {
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
}
}
+#endif
static char *stack_top;
static char heap[2048];
@@ -40,6 +42,7 @@ int main(int argc, char **argv) {
gc_init(heap, heap + sizeof(heap));
#endif
mp_init();
+ #if MICROPY_ENABLE_COMPILER
#if MICROPY_REPL_EVENT_DRIVEN
pyexec_event_repl_init();
for (;;) {
@@ -53,6 +56,9 @@ int main(int argc, char **argv) {
#endif
//do_str("print('hello world!', list(x+1 for x in range(10)), end='eol\\n')", MP_PARSE_SINGLE_INPUT);
//do_str("for i in range(10):\r\n print(i)", MP_PARSE_FILE_INPUT);
+ #else
+ pyexec_frozen_module("frozentest.py");
+ #endif
mp_deinit();
return 0;
}