embed: Fix arguments to mp_raw_code_load_mem.
Update arguments to mp_raw_code_load_mem so that the embed port can build when MICROPY_PERSISTENT_CODE_LOAD is enabled.
This commit is contained in:
parent
416707eefe
commit
d5c45a80d2
1 changed files with 3 additions and 1 deletions
|
|
@ -66,7 +66,9 @@ void mp_embed_exec_mpy(const uint8_t *mpy, size_t len) {
|
||||||
// Execute the given .mpy data.
|
// Execute the given .mpy data.
|
||||||
mp_module_context_t *ctx = m_new_obj(mp_module_context_t);
|
mp_module_context_t *ctx = m_new_obj(mp_module_context_t);
|
||||||
ctx->module.globals = mp_globals_get();
|
ctx->module.globals = mp_globals_get();
|
||||||
mp_compiled_module_t cm = mp_raw_code_load_mem(mpy, len, ctx);
|
mp_compiled_module_t cm;
|
||||||
|
cm.context = ctx;
|
||||||
|
mp_raw_code_load_mem(mpy, len, &cm);
|
||||||
mp_obj_t f = mp_make_function_from_raw_code(cm.rc, ctx, MP_OBJ_NULL);
|
mp_obj_t f = mp_make_function_from_raw_code(cm.rc, ctx, MP_OBJ_NULL);
|
||||||
mp_call_function_0(f);
|
mp_call_function_0(f);
|
||||||
nlr_pop();
|
nlr_pop();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue