I was very happy to see the native modules being added to release 1.12, as described at http://docs.micropython.org/en/latest/d ... atmod.html so I decided to go and try to compile my "stage" game library this way, because a lot of people wanting to use it are unable to compile their own firmware. I actually need to compile only a very small "_stage" helper module, that contains two classes for tile layers, and a simple function for rendering them and sending over SPI to the display. According to the documentation, it should be very simple.
So I started with my mod_stage.c (https://github.com/python-ugame/micropy ... od_stage.c) and replaced the module dict definition with the mpy_init function, as in the examples. I got _stage.c file: https://github.com/python-ugame/micropy ... y/_stage.c
So far so good. Next I created a simple Makefile based on the examples:
Code: Select all
MPY_DIR = ../../../micropython/micropython
ARCH = xtensa
MOD = _stage
SRC = _stage.c
include $(MPY_DIR)/py/dynruntime.mk
Code: Select all
CFLAGS += -I$(MPY_DIR)/ports/esp32/
Code: Select all
MPY_DIR = ../../../micropython/micropython
ARCH = xtensawin
MOD = _stage
SRC = _stage.c
CFLAGS += \
-I$(MPY_DIR)/ports/esp32/ \
-I$(MPY_DIR)/ports/esp32/build \
-I../../../micropython/esp-idf/components/freertos/include \
-I../../../micropython/esp-idf/components/esp32/include \
-I../../../micropython/esp-idf/components/driver/include \
-I../../../micropython/esp-idf/components/soc/include \
-I../../../micropython/esp-idf/components/soc/esp32/include \
-I../../../micropython/esp-idf/components/heap/include \
include $(MPY_DIR)/py/dynruntime.mk
Code: Select all
CC _stage.c
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'text_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:171:22: error: initializer element is not constant
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
./build/_stage.config.h:171:22: note: (near initialization for 'mp_type_text.name')
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[1].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:170:23: error: initializer element is not constant
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
./build/_stage.config.h:170:23: note: (near initialization for 'mp_type_layer.name')
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
_stage.c:383:33: error: 'stage_module_globals' undeclared here (not in a function)
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: error: initializer element is not constant
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: note: (near initialization for 'mp_module__stage.globals')
_stage.c:387:19: error: unknown type name 'mp_obj_fun_bc_t'
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw,
^
../../../micropython/micropython/py/dynruntime.mk:128: recipe for target 'build/_stage.o' failed
make: *** [build/_stage.o] Error 1
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$ make
CC _stage.c
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'text_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:171:22: error: initializer element is not constant
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
./build/_stage.config.h:171:22: note: (near initialization for 'mp_type_text.name')
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[1].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:170:23: error: initializer element is not constant
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
./build/_stage.config.h:170:23: note: (near initialization for 'mp_type_layer.name')
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
_stage.c:383:33: error: 'stage_module_globals' undeclared here (not in a function)
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: error: initializer element is not constant
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: note: (near initialization for 'mp_module__stage.globals')
_stage.c:387:19: error: unknown type name 'mp_obj_fun_bc_t'
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw,
^
../../../micropython/micropython/py/dynruntime.mk:128: recipe for target 'build/_stage.o' failed
make: *** [build/_stage.o] Error 1
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$ make clean
/bin/rm -rf build
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$ make
GEN build/_stage.config.h
CC _stage.c
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'text_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:171:22: error: initializer element is not constant
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
./build/_stage.config.h:171:22: note: (near initialization for 'mp_type_text.name')
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[1].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:170:23: error: initializer element is not constant
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
./build/_stage.config.h:170:23: note: (near initialization for 'mp_type_layer.name')
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
_stage.c:383:33: error: 'stage_module_globals' undeclared here (not in a function)
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: error: initializer element is not constant
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: note: (near initialization for 'mp_module__stage.globals')
_stage.c:387:19: error: unknown type name 'mp_obj_fun_bc_t'
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw,
^
../../../micropython/micropython/py/dynruntime.mk:128: recipe for target 'build/_stage.o' failed
make: *** [build/_stage.o] Error 1
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$ make clean
/bin/rm -rf build
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$
sheep@ghostwheel:~/dev/ugame/micropython-stage/mpy$ make
GEN build/_stage.config.h
CC _stage.c
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'text_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:215:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&text_move_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:171:22: error: initializer element is not constant
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
./build/_stage.config.h:171:22: note: (near initialization for 'mp_type_text.name')
#define MP_QSTR_Text (mp_native_qstr_val_table[1])
^
_stage.c:221:13: note: in expansion of macro 'MP_QSTR_Text'
.name = MP_QSTR_Text,
^
In file included from ../../../micropython/micropython/py/mpstate.h:35:0,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[0].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:287:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&layer_move_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
../../../micropython/micropython/py/obj.h:92:30: note: (near initialization for 'layer_locals_dict_table[1].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))
^
../../../micropython/micropython/py/obj.h:248:24: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)
^
_stage.c:288:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_frame), MP_ROM_PTR(&layer_frame_obj) },
^
In file included from ../../../micropython/micropython/py/mpconfig.h:60:0,
from ../../../micropython/micropython/py/mpstate.h:31,
from ../../../micropython/micropython/py/runtime.h:29,
from _stage.c:28:
./build/_stage.config.h:170:23: error: initializer element is not constant
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
./build/_stage.config.h:170:23: note: (near initialization for 'mp_type_layer.name')
#define MP_QSTR_Layer (mp_native_qstr_val_table[0])
^
_stage.c:294:13: note: in expansion of macro 'MP_QSTR_Layer'
.name = MP_QSTR_Layer,
^
_stage.c:383:33: error: 'stage_module_globals' undeclared here (not in a function)
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: error: initializer element is not constant
.globals = (mp_obj_dict_t*)&stage_module_globals,
^
_stage.c:383:16: note: (near initialization for 'mp_module__stage.globals')
_stage.c:387:19: error: unknown type name 'mp_obj_fun_bc_t'
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw,
^
../../../micropython/micropython/py/dynruntime.mk:128: recipe for target 'build/_stage.o' failed