summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/mpconfigport.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-12-09 16:47:47 +1100
committerDamien George <damien.p.george@gmail.com>2016-12-09 16:51:49 +1100
commit45a6156dfd327f14f58c30ebf9159a92a5567ed5 (patch)
tree0e4d06d0be20ecaa7e610e4292580d71f4e97814 /esp8266/mpconfigport.h
parent8e5aced1fd4845b23b203d8d15f9b34b6b022ceb (diff)
downloadmicropython-45a6156dfd327f14f58c30ebf9159a92a5567ed5.tar.gz
micropython-45a6156dfd327f14f58c30ebf9159a92a5567ed5.zip
esp8266: Enable native emitter for Xtensa arch.
This patch allows esp8266 to use @micropython.native and @micropython.viper function decorators. By default the executable machine code is written to the space at the end of the iram1 region. The user can call esp.set_native_code_location() to make the code go to flash instead.
Diffstat (limited to 'esp8266/mpconfigport.h')
-rw-r--r--esp8266/mpconfigport.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h
index 03d664e570..40550024b6 100644
--- a/esp8266/mpconfigport.h
+++ b/esp8266/mpconfigport.h
@@ -10,9 +10,7 @@
#define MICROPY_ALLOC_PARSE_RESULT_INC (8)
#define MICROPY_ALLOC_PARSE_CHUNK_INIT (64)
#define MICROPY_PERSISTENT_CODE_LOAD (1)
-#define MICROPY_EMIT_X64 (0)
-#define MICROPY_EMIT_THUMB (0)
-#define MICROPY_EMIT_INLINE_THUMB (0)
+#define MICROPY_EMIT_XTENSA (1)
#define MICROPY_MEM_STATS (0)
#define MICROPY_DEBUG_PRINTERS (1)
#define MICROPY_DEBUG_PRINTER_DEST mp_debug_print
@@ -131,6 +129,8 @@ typedef uint32_t sys_prot_t; // for modlwip
#include <sys/types.h>
#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
+void *esp_native_code_commit(void*, size_t);
+#define MP_PLAT_COMMIT_EXEC(buf, len) esp_native_code_commit(buf, len)
#define mp_type_fileio fatfs_type_fileio
#define mp_type_textio fatfs_type_textio