mirror of
https://github.com/micropython/micropython.git
synced 2026-01-12 15:07:15 +01:00
This commit adds the ability to compile native modules for the RV64 platform, using "rv64imc" as its architecture name (eg. "make ARCH=rv64imc" should build a RV64 natmod). The rest of 64-bits relocations needed to build a native module are now implemented, and all sample native modules build without errors or warnings. The same Picolibc caveats on RV32 also apply on RV64, thus the documentation was updated accordingly. RV64 native modules are also built as part of the CI process, but not yet executed as the QEMU port is not yet able to load and run them. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
23 lines
554 B
Makefile
23 lines
554 B
Makefile
# Location of top-level MicroPython directory
|
|
MPY_DIR = ../../..
|
|
|
|
# Name of module (different to built-in random so it can coexist)
|
|
MOD = random_$(ARCH)
|
|
|
|
# Source files (.c or .py)
|
|
SRC = random.c
|
|
|
|
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc, rv64imc)
|
|
ARCH ?= x64
|
|
|
|
ifeq ($(ARCH),xtensa)
|
|
MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld
|
|
endif
|
|
|
|
ifeq ($(ARCH),$(filter $(ARCH),armv6m armv7m))
|
|
# Link with libm.a for soft-float helper functions
|
|
LINK_RUNTIME = 1
|
|
endif
|
|
|
|
include $(MPY_DIR)/py/dynruntime.mk
|