diff options
Diffstat (limited to 'examples/natmod/framebuf')
-rw-r--r-- | examples/natmod/framebuf/Makefile | 6 | ||||
-rw-r--r-- | examples/natmod/framebuf/framebuf.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/examples/natmod/framebuf/Makefile b/examples/natmod/framebuf/Makefile index 2e2b815975..cb821736e7 100644 --- a/examples/natmod/framebuf/Makefile +++ b/examples/natmod/framebuf/Makefile @@ -8,6 +8,10 @@ MOD = framebuf_$(ARCH) SRC = framebuf.c # Architecture to build for (x86, x64, armv7m, xtensa, xtensawin) -ARCH = x64 +ARCH ?= x64 + +ifeq ($(ARCH),xtensa) +MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld +endif include $(MPY_DIR)/py/dynruntime.mk diff --git a/examples/natmod/framebuf/framebuf.c b/examples/natmod/framebuf/framebuf.c index 1ba702e33d..5fd7c6be3a 100644 --- a/examples/natmod/framebuf/framebuf.c +++ b/examples/natmod/framebuf/framebuf.c @@ -4,6 +4,9 @@ #include "py/dynruntime.h" #if !defined(__linux__) +void *memcpy(void *dst, const void *src, size_t n) { + return mp_fun_table.memmove_(dst, src, n); +} void *memset(void *s, int c, size_t n) { return mp_fun_table.memset_(s, c, n); } |