Commit 3a4ebf57 authored by Damien George's avatar Damien George
Browse files

esp8266: Enable inline Xtensa assembler.

With this patch, @micropython.asm_xtensa can be used on the esp8266 port.
parent f76b1bfa
......@@ -58,7 +58,7 @@ STATIC void mp_reset(void) {
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
MP_STATE_PORT(dupterm_arr_obj) = MP_OBJ_NULL;
#if MICROPY_EMIT_XTENSA
#if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA
extern void esp_native_code_init(void);
esp_native_code_init();
#endif
......
......@@ -699,7 +699,7 @@ STATIC mp_obj_t esp_esf_free_bufs(mp_obj_t idx_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(esp_esf_free_bufs_obj, esp_esf_free_bufs);
#if MICROPY_EMIT_XTENSA
#if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA
// We provide here a way of committing executable data to a region from
// which it can be executed by the CPU. There are 2 such writable regions:
......@@ -822,7 +822,7 @@ STATIC const mp_map_elem_t esp_module_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_malloc), (mp_obj_t)&esp_malloc_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_free), (mp_obj_t)&esp_free_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_esf_free_bufs), (mp_obj_t)&esp_esf_free_bufs_obj },
#if MICROPY_EMIT_XTENSA
#if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA
{ MP_OBJ_NEW_QSTR(MP_QSTR_set_native_code_location), (mp_obj_t)&esp_set_native_code_location_obj },
#endif
......
......@@ -11,6 +11,7 @@
#define MICROPY_ALLOC_PARSE_CHUNK_INIT (64)
#define MICROPY_PERSISTENT_CODE_LOAD (1)
#define MICROPY_EMIT_XTENSA (1)
#define MICROPY_EMIT_INLINE_XTENSA (1)
#define MICROPY_MEM_STATS (0)
#define MICROPY_DEBUG_PRINTERS (1)
#define MICROPY_DEBUG_PRINTER_DEST mp_debug_print
......
......@@ -2,6 +2,8 @@
#undef MICROPY_EMIT_XTENSA
#define MICROPY_EMIT_XTENSA (0)
#undef MICROPY_EMIT_INLINE_XTENSA
#define MICROPY_EMIT_INLINE_XTENSA (0)
#undef MICROPY_FSUSERMOUNT
#define MICROPY_FSUSERMOUNT (0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment