mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 21:11:12 +02:00
tools/mpy_ld.py: Add native modules support for RV32 code.
This commit adds support for RV32IMC native modules, as in embedding native code into a self-contained MPY module and and make its exported functions available to the MicroPython environment. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
committed by
Damien George
parent
136058496f
commit
6760e00817
@@ -65,7 +65,7 @@ your system package manager or installed from PyPI in a virtual environment
|
||||
with `pip`.
|
||||
|
||||
Each example provides a Makefile. You should specify the `ARCH` argument to
|
||||
make (one of x86, x64, armv6m, armv7m, xtensa, xtensawin):
|
||||
make (one of x86, x64, armv6m, armv7m, xtensa, xtensawin, rv32imc):
|
||||
|
||||
```
|
||||
$ cd features0
|
||||
|
@@ -7,7 +7,7 @@ MOD = btree_$(ARCH)
|
||||
# Source files (.c or .py)
|
||||
SRC = btree_c.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
BTREE_DIR = $(MPY_DIR)/lib/berkeley-db-1.xx
|
||||
|
@@ -7,7 +7,7 @@ MOD = deflate_$(ARCH)
|
||||
# Source files (.c or .py)
|
||||
SRC = deflate.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
@@ -7,8 +7,9 @@ MOD = features0
|
||||
# Source files (.c or .py)
|
||||
SRC = features0.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
# Include to get the rules for compiling and linking the module
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
||||
|
@@ -7,7 +7,7 @@ MOD = features1
|
||||
# Source files (.c or .py)
|
||||
SRC = features1.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
# Include to get the rules for compiling and linking the module
|
||||
|
@@ -7,7 +7,7 @@ MOD = features3
|
||||
# Source files (.c or .py)
|
||||
SRC = features3.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
# Include to get the rules for compiling and linking the module
|
||||
|
@@ -7,7 +7,7 @@ MOD = features4
|
||||
# Source files (.c or .py)
|
||||
SRC = features4.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
# Include to get the rules for compiling and linking the module
|
||||
|
@@ -7,7 +7,7 @@ MOD = heapq_$(ARCH)
|
||||
# Source files (.c or .py)
|
||||
SRC = heapq.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
@@ -7,7 +7,7 @@ MOD = random_$(ARCH)
|
||||
# Source files (.c or .py)
|
||||
SRC = random.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
@@ -7,7 +7,7 @@ MOD = re_$(ARCH)
|
||||
# Source files (.c or .py)
|
||||
SRC = re.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
Reference in New Issue
Block a user