@ -172,3 +172,13 @@ void nlr_jump_fail(void *val) {
void mbedtls_debug_set_threshold(int threshold) {
(void)threshold;
}
void *esp_native_code_commit(void *buf, size_t len) {
len = (len + 3) & ~3;
uint32_t *p = heap_caps_malloc(len, MALLOC_CAP_EXEC);
if (p == NULL) {
m_malloc_fail(len);
memcpy(p, buf, len);
return p;
@ -20,6 +20,9 @@
// emitters
#define MICROPY_PERSISTENT_CODE_LOAD (1)
#define MICROPY_EMIT_XTENSAWIN (1)
void *esp_native_code_commit(void*, size_t);
#define MP_PLAT_COMMIT_EXEC(buf, len) esp_native_code_commit(buf, len)
// compiler configuration
#define MICROPY_COMP_MODULE_CONST (1)