all: Update to point to files in new shared/ directory.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
4d546713ec
commit
136369d72f
@ -42,8 +42,8 @@ The basic MicroPython firmware is implemented in the main port file, e.g ``main.
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
// Allocate memory for the MicroPython GC heap.
|
||||
static char heap[4096];
|
||||
@ -106,10 +106,10 @@ We also need a Makefile at this point for the port:
|
||||
SRC_C = \
|
||||
main.c \
|
||||
mphalport.c \
|
||||
lib/mp-readline/readline.c \
|
||||
lib/utils/gchelper_generic.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
shared/readline/readline.c \
|
||||
shared/runtime/gchelper_generic.c \
|
||||
shared/runtime/pyexec.c \
|
||||
shared/runtime/stdout_helpers.c \
|
||||
|
||||
# Define the required object files.
|
||||
OBJ = $(PY_CORE_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/dhcp.h"
|
||||
#include "lib/netutils/dhcpserver.h"
|
||||
#include "shared/netutils/dhcpserver.h"
|
||||
#include "drivers/cyw43/cyw43_ll.h"
|
||||
|
||||
// For trace_flags
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "py/mphal.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "lwip/etharp.h"
|
||||
#include "lwip/dns.h"
|
||||
#include "lwip/apps/mdns.h"
|
||||
|
@ -82,9 +82,9 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(MICROPY_USE_READLINE),1)
|
||||
INC += -I$(MPTOP)/lib/mp-readline
|
||||
INC += -I$(MPTOP)/shared/readline
|
||||
CFLAGS_MOD += -DMICROPY_USE_READLINE=1
|
||||
LIB_SRC_C_EXTRA += mp-readline/readline.c
|
||||
SHARED_SRC_C_EXTRA += readline/readline.c
|
||||
endif
|
||||
ifeq ($(MICROPY_USE_READLINE),2)
|
||||
CFLAGS_MOD += -DMICROPY_USE_READLINE=2
|
||||
@ -145,19 +145,19 @@ SRC_C = $(addprefix ports/unix/,\
|
||||
$(SRC_MOD) \
|
||||
)
|
||||
|
||||
LIB_SRC_C = $(addprefix lib/,\
|
||||
$(LIB_SRC_C_EXTRA) \
|
||||
utils/printf.c \
|
||||
utils/gchelper_generic.c \
|
||||
SHARED_SRC_C = $(addprefix shared/,\
|
||||
libc/printf.c \
|
||||
runtime/gchelper_generic.c \
|
||||
timeutils/timeutils.c \
|
||||
$(SHARED_SRC_C_EXTRA) \
|
||||
)
|
||||
|
||||
OBJ = $(PY_O)
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SHARED_SRC_C:.c=.o))
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(SRC_C) $(LIB_SRC_C)
|
||||
SRC_QSTR += $(SRC_C) $(SHARED_SRC_C)
|
||||
# Append any auto-generated sources that are needed by sources listed in
|
||||
# SRC_QSTR
|
||||
SRC_QSTR_AUTO_DEPS +=
|
||||
|
@ -4,8 +4,8 @@ set(MICROPY_EXTMOD_DIR "${MICROPY_DIR}/extmod")
|
||||
set(MICROPY_OOFATFS_DIR "${MICROPY_DIR}/lib/oofatfs")
|
||||
|
||||
set(MICROPY_SOURCE_EXTMOD
|
||||
${MICROPY_DIR}/lib/embed/abort_.c
|
||||
${MICROPY_DIR}/lib/utils/printf.c
|
||||
${MICROPY_DIR}/shared/libc/abort_.c
|
||||
${MICROPY_DIR}/shared/libc/printf.c
|
||||
${MICROPY_EXTMOD_DIR}/machine_i2c.c
|
||||
${MICROPY_EXTMOD_DIR}/machine_mem.c
|
||||
${MICROPY_EXTMOD_DIR}/machine_pulse.c
|
||||
|
@ -153,7 +153,7 @@ LWIP_DIR = lib/lwip/src
|
||||
INC += -I$(TOP)/$(LWIP_DIR)/include
|
||||
CFLAGS_MOD += -DMICROPY_PY_LWIP=1
|
||||
$(BUILD)/$(LWIP_DIR)/core/ipv4/dhcp.o: CFLAGS_MOD += -Wno-address
|
||||
SRC_MOD += extmod/modlwip.c lib/netutils/netutils.c
|
||||
SRC_MOD += extmod/modlwip.c shared/netutils/netutils.c
|
||||
SRC_MOD += $(addprefix $(LWIP_DIR)/,\
|
||||
apps/mdns/mdns.c \
|
||||
core/def.c \
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
|
||||
#include "lwip/init.h"
|
||||
#include "lwip/tcp.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "py/objarray.h"
|
||||
#include "py/stream.h"
|
||||
#include "extmod/misc.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
|
||||
#if MICROPY_PY_OS_DUPTERM
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "extmod/vfs_fat.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
|
||||
#if FF_MAX_SS == FF_MIN_SS
|
||||
#define SECSIZE(fs) (FF_MIN_SS)
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "extmod/vfs.h"
|
||||
#include "extmod/vfs_lfs.h"
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "py/objstr.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "extmod/vfs.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
|
||||
STATIC int MP_VFS_LFSx(dev_ioctl)(const struct LFSx_API (config) * c, int cmd, int arg, bool must_return_int) {
|
||||
mp_obj_t ret = mp_vfs_blockdev_ioctl(c->context, cmd, arg);
|
||||
|
@ -48,7 +48,7 @@ LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
|
||||
SRC_C = \
|
||||
main.c \
|
||||
gccollect.c \
|
||||
lib/utils/gchelper_generic.c \
|
||||
shared/runtime/gchelper_generic.c \
|
||||
|
||||
# Add fmode when compiling with mingw gcc
|
||||
COMPILER_TARGET := $(shell $(CC) -dumpmachine)
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "py/mpstate.h"
|
||||
#include "py/gc.h"
|
||||
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
|
||||
#if MICROPY_ENABLE_GC
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
||||
<Import Project="$(PyMsvcDir)sources.props" />
|
||||
<ItemGroup>
|
||||
<ClCompile Include="@(PyCoreSource)" />
|
||||
<ClCompile Include="$(PyBaseDir)lib/utils/gchelper_generic.c" >
|
||||
<ClCompile Include="$(PyBaseDir)shared/runtime/gchelper_generic.c" >
|
||||
<PreprocessorDefinitions>MICROPY_GCREGS_SETJMP</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PyBaseDir)mpy-cross\gccollect.c"/>
|
||||
@ -103,4 +103,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -54,7 +54,7 @@ void free(void *p) {
|
||||
}
|
||||
|
||||
// These standard string functions are needed by the runtime, and can be
|
||||
// provided either by the system or lib/libc/string0.c. The implementations
|
||||
// provided either by the system or shared/libc/string0.c. The implementations
|
||||
// here are very simple.
|
||||
|
||||
int memcmp(const void *s1, const void *s2, size_t n) {
|
||||
|
@ -140,15 +140,18 @@ APP_MAIN_SRC_C = \
|
||||
APP_LIB_SRC_C = $(addprefix lib/,\
|
||||
oofatfs/ff.c \
|
||||
oofatfs/ffunicode.c \
|
||||
)
|
||||
|
||||
APP_SHARED_SRC_C = $(addprefix shared/,\
|
||||
libc/string0.c \
|
||||
mp-readline/readline.c \
|
||||
readline/readline.c \
|
||||
netutils/netutils.c \
|
||||
timeutils/timeutils.c \
|
||||
utils/gchelper_native.c \
|
||||
utils/pyexec.c \
|
||||
utils/interrupt_char.c \
|
||||
utils/stdout_helpers.c \
|
||||
utils/sys_stdio_mphal.c \
|
||||
runtime/gchelper_native.c \
|
||||
runtime/pyexec.c \
|
||||
runtime/interrupt_char.c \
|
||||
runtime/stdout_helpers.c \
|
||||
runtime/sys_stdio_mphal.c \
|
||||
)
|
||||
|
||||
APP_STM_SRC_C = $(addprefix ports/stm32/,\
|
||||
@ -158,12 +161,12 @@ APP_STM_SRC_C = $(addprefix ports/stm32/,\
|
||||
|
||||
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(APP_FATFS_SRC_C:.c=.o) $(APP_RTOS_SRC_C:.c=.o) $(APP_FTP_SRC_C:.c=.o) $(APP_HAL_SRC_C:.c=.o) $(APP_MISC_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(APP_MODS_SRC_C:.c=.o) $(APP_CC3100_SRC_C:.c=.o) $(APP_SL_SRC_C:.c=.o) $(APP_TELNET_SRC_C:.c=.o) $(APP_UTIL_SRC_C:.c=.o) $(APP_UTIL_SRC_S:.s=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(APP_MAIN_SRC_C:.c=.o) $(APP_LIB_SRC_C:.c=.o) $(APP_STM_SRC_C:.c=.o))
|
||||
OBJ += $(BUILD)/lib/utils/gchelper_m3.o
|
||||
OBJ += $(addprefix $(BUILD)/, $(APP_MAIN_SRC_C:.c=.o) $(APP_SHARED_SRC_C:.c=.o) $(APP_LIB_SRC_C:.c=.o) $(APP_STM_SRC_C:.c=.o))
|
||||
OBJ += $(BUILD)/shared/runtime/gchelper_m3.o
|
||||
OBJ += $(BUILD)/pins.o
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(APP_MODS_SRC_C) $(APP_MISC_SRC_C) $(APP_STM_SRC_C)
|
||||
SRC_QSTR += $(APP_MODS_SRC_C) $(APP_MISC_SRC_C) $(APP_STM_SRC_C) $(APP_SHARED_SRC_C)
|
||||
# Append any auto-generated sources that are needed by sources listed in
|
||||
# SRC_QSTR
|
||||
SRC_QSTR_AUTO_DEPS +=
|
||||
|
@ -65,14 +65,14 @@ BOOT_PY_SRC_C = $(addprefix py/,\
|
||||
mpprint.c \
|
||||
)
|
||||
|
||||
BOOT_LIB_SRC_C = $(addprefix lib/,\
|
||||
BOOT_SHARED_SRC_C = $(addprefix shared/,\
|
||||
libc/printf.c \
|
||||
libc/string0.c \
|
||||
utils/printf.c \
|
||||
)
|
||||
|
||||
OBJ = $(addprefix $(BUILD)/, $(BOOT_HAL_SRC_C:.c=.o) $(BOOT_SL_SRC_C:.c=.o) $(BOOT_CC3100_SRC_C:.c=.o) $(BOOT_UTIL_SRC_C:.c=.o) $(BOOT_MISC_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(BOOT_MAIN_SRC_C:.c=.o) $(BOOT_MAIN_SRC_S:.s=.o) $(BOOT_PY_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(BOOT_LIB_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(BOOT_SHARED_SRC_C:.c=.o))
|
||||
|
||||
# Add the linker script
|
||||
LINKER_SCRIPT = bootmgr/bootmgr.lds
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "mods/pybrtc.h"
|
||||
|
||||
#if FF_FS_REENTRANT
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "extmod/vfs.h"
|
||||
#include "extmod/vfs_fat.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "py/objtuple.h"
|
||||
#include "py/objstr.h"
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "lib/oofatfs/diskio.h"
|
||||
#include "genhdr/mpversion.h"
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "modnetwork.h"
|
||||
#include "modusocket.h"
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "py/obj.h"
|
||||
#include "py/smallint.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "extmod/utime_mphal.h"
|
||||
#include "inc/hw_types.h"
|
||||
#include "inc/hw_ints.h"
|
||||
|
@ -35,8 +35,8 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "modnetwork.h"
|
||||
#include "modusocket.h"
|
||||
#include "modwlan.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "inc/hw_types.h"
|
||||
#include "inc/hw_ints.h"
|
||||
#include "inc/hw_memmap.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "py/objlist.h"
|
||||
#include "py/stream.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
#include "inc/hw_types.h"
|
||||
#include "inc/hw_ints.h"
|
||||
#include "inc/hw_memmap.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "lib/oofatfs/diskio.h"
|
||||
#include "extmod/vfs.h"
|
||||
@ -49,8 +49,8 @@
|
||||
#include "pybuart.h"
|
||||
#include "pybpin.h"
|
||||
#include "pybrtc.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "gccollect.h"
|
||||
#include "mperror.h"
|
||||
#include "simplelink.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
#include "telnet.h"
|
||||
#include "simplelink.h"
|
||||
#include "modnetwork.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "py/gc.h"
|
||||
#include "py/mpthread.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "gccollect.h"
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/time.h>
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
|
||||
DWORD get_fattime(void) {
|
||||
struct timeval tv;
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "modmachine.h"
|
||||
#include "machine_rtc.h"
|
||||
|
||||
|
@ -54,8 +54,8 @@
|
||||
#include "py/repl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "uart.h"
|
||||
#include "usb.h"
|
||||
#include "modmachine.h"
|
||||
|
@ -15,21 +15,24 @@ set(MICROPY_QSTRDEFS_PORT
|
||||
${PROJECT_DIR}/qstrdefsport.h
|
||||
)
|
||||
|
||||
set(MICROPY_SOURCE_SHARED
|
||||
${MICROPY_DIR}/shared/readline/readline.c
|
||||
${MICROPY_DIR}/shared/netutils/netutils.c
|
||||
${MICROPY_DIR}/shared/timeutils/timeutils.c
|
||||
${MICROPY_DIR}/shared/runtime/interrupt_char.c
|
||||
${MICROPY_DIR}/shared/runtime/stdout_helpers.c
|
||||
${MICROPY_DIR}/shared/runtime/sys_stdio_mphal.c
|
||||
${MICROPY_DIR}/shared/runtime/pyexec.c
|
||||
)
|
||||
|
||||
set(MICROPY_SOURCE_LIB
|
||||
${MICROPY_DIR}/lib/littlefs/lfs1.c
|
||||
${MICROPY_DIR}/lib/littlefs/lfs1_util.c
|
||||
${MICROPY_DIR}/lib/littlefs/lfs2.c
|
||||
${MICROPY_DIR}/lib/littlefs/lfs2_util.c
|
||||
${MICROPY_DIR}/lib/mbedtls_errors/mp_mbedtls_errors.c
|
||||
${MICROPY_DIR}/lib/mp-readline/readline.c
|
||||
${MICROPY_DIR}/lib/netutils/netutils.c
|
||||
${MICROPY_DIR}/lib/oofatfs/ff.c
|
||||
${MICROPY_DIR}/lib/oofatfs/ffunicode.c
|
||||
${MICROPY_DIR}/lib/timeutils/timeutils.c
|
||||
${MICROPY_DIR}/lib/utils/interrupt_char.c
|
||||
${MICROPY_DIR}/lib/utils/stdout_helpers.c
|
||||
${MICROPY_DIR}/lib/utils/sys_stdio_mphal.c
|
||||
${MICROPY_DIR}/lib/utils/pyexec.c
|
||||
)
|
||||
|
||||
set(MICROPY_SOURCE_DRIVERS
|
||||
@ -80,6 +83,7 @@ set(MICROPY_SOURCE_QSTR
|
||||
${MICROPY_SOURCE_PY}
|
||||
${MICROPY_SOURCE_EXTMOD}
|
||||
${MICROPY_SOURCE_USERMOD}
|
||||
${MICROPY_SOURCE_SHARED}
|
||||
${MICROPY_SOURCE_LIB}
|
||||
${MICROPY_SOURCE_PORT}
|
||||
)
|
||||
@ -142,6 +146,7 @@ idf_component_register(
|
||||
SRCS
|
||||
${MICROPY_SOURCE_PY}
|
||||
${MICROPY_SOURCE_EXTMOD}
|
||||
${MICROPY_SOURCE_SHARED}
|
||||
${MICROPY_SOURCE_LIB}
|
||||
${MICROPY_SOURCE_DRIVERS}
|
||||
${MICROPY_SOURCE_PORT}
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "modmachine.h"
|
||||
#include "machine_rtc.h"
|
||||
#include "modesp32.h"
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "extmod/machine_mem.h"
|
||||
#include "extmod/machine_signal.h"
|
||||
#include "extmod/machine_pulse.h"
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "esp_eth.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_log.h"
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "py/mphal.h"
|
||||
#include "py/stream.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "mdns.h"
|
||||
#include "modnetwork.h"
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "extmod/utime_mphal.h"
|
||||
|
||||
STATIC mp_obj_t time_localtime(size_t n_args, const mp_obj_t *args) {
|
||||
|
@ -47,8 +47,8 @@
|
||||
#include "py/mpstate.h"
|
||||
#include "py/mphal.h"
|
||||
#include "extmod/misc.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "mphalport.h"
|
||||
#include "usb.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define INCLUDED_MPHALPORT_H
|
||||
|
||||
#include "py/ringbuf.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "py/mphal.h"
|
||||
#include "py/objtype.h"
|
||||
#include "py/stream.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "modmachine.h"
|
||||
|
||||
#include "netif/ppp/ppp.h"
|
||||
|
@ -119,8 +119,6 @@ EXTMOD_SRC_C = $(addprefix extmod/,\
|
||||
)
|
||||
|
||||
LIB_SRC_C = $(addprefix lib/,\
|
||||
embed/__errno.c \
|
||||
libc/string0.c \
|
||||
libm/math.c \
|
||||
libm/fmodf.c \
|
||||
libm/nearbyintf.c \
|
||||
@ -140,13 +138,18 @@ LIB_SRC_C = $(addprefix lib/,\
|
||||
libm/atanf.c \
|
||||
libm/atan2f.c \
|
||||
libm/roundf.c \
|
||||
mp-readline/readline.c \
|
||||
)
|
||||
|
||||
SHARED_SRC_C = $(addprefix shared/,\
|
||||
libc/__errno.c \
|
||||
libc/string0.c \
|
||||
netutils/netutils.c \
|
||||
readline/readline.c \
|
||||
runtime/interrupt_char.c \
|
||||
runtime/pyexec.c \
|
||||
runtime/stdout_helpers.c \
|
||||
runtime/sys_stdio_mphal.c \
|
||||
timeutils/timeutils.c \
|
||||
utils/pyexec.c \
|
||||
utils/interrupt_char.c \
|
||||
utils/stdout_helpers.c \
|
||||
utils/sys_stdio_mphal.c \
|
||||
)
|
||||
|
||||
DRIVERS_SRC_C = $(addprefix drivers/,\
|
||||
@ -162,11 +165,12 @@ OBJ += $(PY_O)
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(EXTMOD_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SHARED_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(SRC_C) $(EXTMOD_SRC_C) $(LIB_SRC_C) $(DRIVERS_SRC_C)
|
||||
SRC_QSTR += $(SRC_C) $(EXTMOD_SRC_C) $(SHARED_SRC_C) $(DRIVERS_SRC_C)
|
||||
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
|
||||
SRC_QSTR_AUTO_DEPS +=
|
||||
|
||||
|
@ -134,14 +134,14 @@ SECTIONS
|
||||
*lib/berkeley-db-1.xx/*.o(.literal*, .text*)
|
||||
*lib/libm/*.o*(.literal*, .text*)
|
||||
*lib/littlefs/*.o*(.literal*, .text*)
|
||||
*lib/mp-readline/*.o(.literal*, .text*)
|
||||
*lib/netutils/*.o*(.literal*, .text*)
|
||||
*lib/timeutils/*.o*(.literal*, .text*)
|
||||
*lib/utils/printf.o*(.literal*, .text*)
|
||||
*lib/utils/sys_stdio_mphal.o*(.literal*, .text*)
|
||||
*lib/utils/pyexec.o*(.literal*, .text*)
|
||||
*lib/utils/stdout_helpers.o*(.literal*, .text*)
|
||||
*lib/utils/interrupt_char.o*(.literal*, .text*)
|
||||
*shared/libc/printf.o*(.literal*, .text*)
|
||||
*shared/netutils/*.o*(.literal*, .text*)
|
||||
*shared/readline/*.o(.literal*, .text*)
|
||||
*shared/runtime/interrupt_char.o*(.literal*, .text*)
|
||||
*shared/runtime/pyexec.o*(.literal*, .text*)
|
||||
*shared/runtime/stdout_helpers.o*(.literal*, .text*)
|
||||
*shared/runtime/sys_stdio_mphal.o*(.literal*, .text*)
|
||||
*shared/timeutils/*.o*(.literal*, .text*)
|
||||
*drivers/bus/*.o(.literal* .text*)
|
||||
|
||||
build-*/main.o(.literal* .text*)
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
#include "extmod/misc.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
STATIC byte stdin_ringbuf_array[256];
|
||||
ringbuf_t stdin_ringbuf = {stdin_ringbuf_array, sizeof(stdin_ringbuf_array), 0, 0};
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "user_interface.h"
|
||||
#include "py/ringbuf.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
#include "xtirq.h"
|
||||
|
||||
void mp_sched_keyboard_interrupt(void);
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "modmachine.h"
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "user_interface.h"
|
||||
#include "modmachine.h"
|
||||
|
||||
|
@ -39,8 +39,8 @@
|
||||
#define USE_US_TIMER 1
|
||||
|
||||
#include "extmod/misc.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "gccollect.h"
|
||||
#include "user_interface.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
// This needs to be set before we include the RTOS headers
|
||||
#define USE_US_TIMER 1
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "py/objlist.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "queue.h"
|
||||
#include "user_interface.h"
|
||||
#include "espconn.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/smallint.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "modmachine.h"
|
||||
#include "user_interface.h"
|
||||
#include "extmod/utime_mphal.h"
|
||||
|
@ -285,7 +285,7 @@ void ICACHE_FLASH_ATTR uart0_set_rxbuf(uint8 *buf, int len) {
|
||||
// Task-based UART interface
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
#if MICROPY_REPL_EVENT_DRIVEN
|
||||
void ICACHE_FLASH_ATTR uart_task_handler(os_event_t *evt) {
|
||||
|
@ -24,11 +24,11 @@ CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
|
||||
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
|
||||
endif
|
||||
|
||||
SRC_LIB = $(addprefix lib/,\
|
||||
utils/interrupt_char.c \
|
||||
utils/stdout_helpers.c \
|
||||
utils/pyexec.c \
|
||||
mp-readline/readline.c \
|
||||
SRC_SHARED = $(addprefix shared/,\
|
||||
runtime/interrupt_char.c \
|
||||
runtime/stdout_helpers.c \
|
||||
runtime/pyexec.c \
|
||||
readline/readline.c \
|
||||
)
|
||||
|
||||
SRC_C = \
|
||||
@ -39,7 +39,7 @@ SRC_C = \
|
||||
SRC_QSTR += $(SRC_C)
|
||||
|
||||
OBJ += $(PY_O)
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
|
||||
JSFLAGS += -s ASYNCIFY
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "py/repl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
#include "emscripten.h"
|
||||
#include "library.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "py/smallint.h"
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "extmod/utime_mphal.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t time_module_globals_table[] = {
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
|
||||
#define mp_hal_stdin_rx_chr() (0)
|
||||
void mp_hal_stdout_tx_strn(const char *str, size_t len);
|
||||
|
@ -155,15 +155,15 @@ SRC_C = \
|
||||
moduos.c \
|
||||
mphalport.c \
|
||||
hal/flexspi_nor_flash.c \
|
||||
lib/mp-readline/readline.c \
|
||||
lib/libc/string0.c \
|
||||
lib/timeutils/timeutils.c \
|
||||
lib/utils/gchelper_native.c \
|
||||
lib/utils/mpirq.c \
|
||||
lib/utils/printf.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
lib/utils/sys_stdio_mphal.c \
|
||||
shared/libc/printf.c \
|
||||
shared/libc/string0.c \
|
||||
shared/readline/readline.c \
|
||||
shared/runtime/gchelper_native.c \
|
||||
shared/runtime/mpirq.c \
|
||||
shared/runtime/pyexec.c \
|
||||
shared/runtime/stdout_helpers.c \
|
||||
shared/runtime/sys_stdio_mphal.c \
|
||||
shared/timeutils/timeutils.c \
|
||||
drivers/bus/softspi.c \
|
||||
extmod/modonewire.c \
|
||||
$(SRC_TINYUSB_C) \
|
||||
@ -264,7 +264,7 @@ endif
|
||||
|
||||
SRC_SS = $(MCU_DIR)/gcc/startup_$(MCU_SERIES).S
|
||||
|
||||
SRC_S = lib/utils/gchelper_m3.s \
|
||||
SRC_S = shared/runtime/gchelper_m3.s \
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += \
|
||||
@ -281,8 +281,8 @@ SRC_QSTR += \
|
||||
modmimxrt.c \
|
||||
moduos.c \
|
||||
pin.c \
|
||||
lib/utils/mpirq.c \
|
||||
lib/utils/sys_stdio_mphal.c \
|
||||
shared/runtime/mpirq.c \
|
||||
shared/runtime/sys_stdio_mphal.c \
|
||||
extmod/modonewire.c \
|
||||
$(GEN_PINS_SRC) \
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/mpirq.h"
|
||||
#include "shared/runtime/mpirq.h"
|
||||
#include "pin.h"
|
||||
|
||||
// Local functions
|
||||
|
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "modmachine.h"
|
||||
#include "ticks.h"
|
||||
#include "fsl_snvs_lp.h"
|
||||
|
@ -30,9 +30,9 @@
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "ticks.h"
|
||||
#include "tusb.h"
|
||||
#include "led.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "extmod/utime_mphal.h"
|
||||
#include "fsl_snvs_lp.h"
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "ticks.h"
|
||||
#include "tusb.h"
|
||||
#include "fsl_snvs_lp.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "py/obj.h"
|
||||
#include "lib/utils/mpirq.h"
|
||||
#include "shared/runtime/mpirq.h"
|
||||
#include "fsl_gpio.h"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------ //
|
||||
|
@ -46,14 +46,14 @@ LIBS =
|
||||
SRC_C = \
|
||||
main.c \
|
||||
uart_core.c \
|
||||
lib/utils/printf.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/mp-readline/readline.c \
|
||||
shared/libc/printf.c \
|
||||
shared/readline/readline.c \
|
||||
shared/runtime/pyexec.c \
|
||||
shared/runtime/stdout_helpers.c \
|
||||
$(BUILD)/_frozen_mpy.c \
|
||||
|
||||
ifeq ($(CROSS), 1)
|
||||
SRC_C += lib/libc/string0.c
|
||||
SRC_C += shared/libc/string0.c
|
||||
endif
|
||||
|
||||
OBJ = $(PY_CORE_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "py/repl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
#if MICROPY_ENABLE_COMPILER
|
||||
void do_str(const char *src, mp_parse_input_kind_t input_kind) {
|
||||
|
@ -70,7 +70,7 @@ INC += -I./modules/ubluepy
|
||||
INC += -I./modules/music
|
||||
INC += -I./modules/ble
|
||||
INC += -I./modules/board
|
||||
INC += -I../../lib/mp-readline
|
||||
INC += -I../../shared/readline
|
||||
INC += -I./drivers/bluetooth
|
||||
INC += -I./drivers
|
||||
INC += -I../../lib/nrfx/
|
||||
@ -216,12 +216,12 @@ include drivers/secureboot/secureboot.mk
|
||||
|
||||
endif
|
||||
|
||||
SRC_LIB += $(addprefix lib/,\
|
||||
SRC_LIB += $(addprefix shared/,\
|
||||
libc/string0.c \
|
||||
mp-readline/readline.c \
|
||||
utils/pyexec.c \
|
||||
utils/sys_stdio_mphal.c \
|
||||
utils/interrupt_char.c \
|
||||
readline/readline.c \
|
||||
runtime/pyexec.c \
|
||||
runtime/sys_stdio_mphal.c \
|
||||
runtime/interrupt_char.c \
|
||||
timeutils/timeutils.c \
|
||||
)
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "ble_uart.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "mphalport.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
#if MICROPY_PY_SYS_STDFILES
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "py/stackctrl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/compile.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "readline.h"
|
||||
#include "gccollect.h"
|
||||
#include "modmachine.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "py/builtin.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/obj.h"
|
||||
#include "led.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "extmod/machine_mem.h"
|
||||
#include "extmod/machine_pulse.h"
|
||||
#include "extmod/machine_i2c.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "lib/oofatfs/diskio.h"
|
||||
#include "gccollect.h"
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "py/ringbuf.h"
|
||||
#include "pin.h"
|
||||
#include "genhdr/pins.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
|
||||
#include "uart.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
@ -39,9 +39,9 @@ SRC_C = \
|
||||
modpyb.c \
|
||||
modpybled.c \
|
||||
modpybswitch.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/utils/sys_stdio_mphal.c \
|
||||
lib/mp-readline/readline.c \
|
||||
shared/runtime/pyexec.c \
|
||||
shared/runtime/sys_stdio_mphal.c \
|
||||
shared/readline/readline.c \
|
||||
|
||||
SRC_S = \
|
||||
# gchelper.s \
|
||||
|
@ -34,8 +34,8 @@
|
||||
#include "py/gc.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "board.h"
|
||||
#include "modpyb.h"
|
||||
|
||||
|
@ -34,11 +34,11 @@ LIBS =
|
||||
SRC_C = \
|
||||
main.c \
|
||||
uart_$(UART).c \
|
||||
lib/utils/printf.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/libc/string0.c \
|
||||
lib/mp-readline/readline.c \
|
||||
shared/libc/printf.c \
|
||||
shared/libc/string0.c \
|
||||
shared/readline/readline.c \
|
||||
shared/runtime/pyexec.c \
|
||||
shared/runtime/stdout_helpers.c \
|
||||
$(BUILD)/_frozen_mpy.c \
|
||||
|
||||
OBJ = $(PY_CORE_O)
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
void __stack_chk_fail(void);
|
||||
void __stack_chk_fail(void) {
|
||||
|
@ -16,7 +16,7 @@ ifeq ($(BOARD),netduino2)
|
||||
CFLAGS += -mthumb -mcpu=cortex-m3 -mfloat-abi=soft
|
||||
CFLAGS += -DQEMU_SOC_STM32
|
||||
LDSCRIPT = stm32.ld
|
||||
SRC_BOARD_O = lib/utils/gchelper_native.o lib/utils/gchelper_m3.o
|
||||
SRC_BOARD_O = shared/runtime/gchelper_native.o shared/runtime/gchelper_m3.o
|
||||
MPY_CROSS_FLAGS += -march=armv7m
|
||||
endif
|
||||
|
||||
@ -25,7 +25,7 @@ CFLAGS += -mthumb -mcpu=cortex-m0 -mfloat-abi=soft
|
||||
CFLAGS += -DQEMU_SOC_NRF51
|
||||
LDSCRIPT = nrf51.ld
|
||||
QEMU_EXTRA = -global nrf51-soc.flash-size=1048576 -global nrf51-soc.sram-size=262144
|
||||
SRC_BOARD_O = lib/utils/gchelper_native.o lib/utils/gchelper_m0.o
|
||||
SRC_BOARD_O = shared/runtime/gchelper_native.o shared/runtime/gchelper_m0.o
|
||||
MPY_CROSS_FLAGS += -march=armv7m
|
||||
endif
|
||||
|
||||
@ -33,7 +33,7 @@ ifeq ($(BOARD),mps2-an385)
|
||||
CFLAGS += -mthumb -mcpu=cortex-m3 -mfloat-abi=soft
|
||||
CFLAGS += -DQEMU_SOC_MPS2
|
||||
LDSCRIPT = mps2.ld
|
||||
SRC_BOARD_O = lib/utils/gchelper_native.o lib/utils/gchelper_m3.o
|
||||
SRC_BOARD_O = shared/runtime/gchelper_native.o shared/runtime/gchelper_m3.o
|
||||
MPY_CROSS_FLAGS += -march=armv7m
|
||||
endif
|
||||
|
||||
@ -42,7 +42,7 @@ CFLAGS += -mcpu=cortex-a9
|
||||
CFLAGS += -DQEMU_SOC_IMX6
|
||||
LDSCRIPT = imx6.ld
|
||||
QEMU_EXTRA = -m 128M
|
||||
SRC_BOARD_O = lib/utils/gchelper_generic.o
|
||||
SRC_BOARD_O = shared/runtime/gchelper_generic.o
|
||||
# It's really armv7a but closest supported value is armv6.
|
||||
MPY_CROSS_FLAGS += -march=armv6
|
||||
endif
|
||||
@ -79,6 +79,8 @@ SRC_COMMON_C = \
|
||||
uart.c \
|
||||
moduos.c \
|
||||
modmachine.c \
|
||||
shared/libc/string0.c \
|
||||
shared/runtime/sys_stdio_mphal.c \
|
||||
|
||||
SRC_RUN_C = \
|
||||
main.c \
|
||||
@ -88,7 +90,6 @@ SRC_TEST_C = \
|
||||
lib/tinytest/tinytest.c \
|
||||
|
||||
LIB_SRC_C += $(addprefix lib/,\
|
||||
libc/string0.c \
|
||||
libm/math.c \
|
||||
libm/fmodf.c \
|
||||
libm/nearbyintf.c \
|
||||
@ -108,7 +109,6 @@ LIB_SRC_C += $(addprefix lib/,\
|
||||
libm/atanf.c \
|
||||
libm/atan2f.c \
|
||||
libm/roundf.c \
|
||||
utils/sys_stdio_mphal.c \
|
||||
)
|
||||
|
||||
OBJ_COMMON =
|
||||
|
@ -1,4 +1,4 @@
|
||||
LIB_SRC_C = lib/upytesthelper/upytesthelper.c
|
||||
LIB_SRC_C = shared/upytesthelper/upytesthelper.c
|
||||
|
||||
FROZEN_MANIFEST ?= "freeze('test-frzmpy')"
|
||||
|
||||
|
@ -74,7 +74,7 @@ extern const struct _mp_obj_module_t mp_module_uos;
|
||||
#include <alloca.h>
|
||||
|
||||
#ifdef TEST
|
||||
#include "lib/upytesthelper/upytesthelper.h"
|
||||
#include "shared/upytesthelper/upytesthelper.h"
|
||||
#undef MP_PLAT_PRINT_STRN
|
||||
#define MP_PLAT_PRINT_STRN(str, len) upytest_output(str, len)
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "py/stackctrl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "lib/tinytest/tinytest.h"
|
||||
#include "lib/tinytest/tinytest_macros.h"
|
||||
|
||||
|
@ -64,16 +64,16 @@ set(MICROPY_SOURCE_LIB
|
||||
${MICROPY_DIR}/lib/littlefs/lfs1_util.c
|
||||
${MICROPY_DIR}/lib/littlefs/lfs2.c
|
||||
${MICROPY_DIR}/lib/littlefs/lfs2_util.c
|
||||
${MICROPY_DIR}/lib/mp-readline/readline.c
|
||||
${MICROPY_DIR}/lib/oofatfs/ff.c
|
||||
${MICROPY_DIR}/lib/oofatfs/ffunicode.c
|
||||
${MICROPY_DIR}/lib/timeutils/timeutils.c
|
||||
${MICROPY_DIR}/lib/utils/gchelper_m0.s
|
||||
${MICROPY_DIR}/lib/utils/gchelper_native.c
|
||||
${MICROPY_DIR}/lib/utils/mpirq.c
|
||||
${MICROPY_DIR}/lib/utils/pyexec.c
|
||||
${MICROPY_DIR}/lib/utils/stdout_helpers.c
|
||||
${MICROPY_DIR}/lib/utils/sys_stdio_mphal.c
|
||||
${MICROPY_DIR}/shared/readline/readline.c
|
||||
${MICROPY_DIR}/shared/runtime/gchelper_m0.s
|
||||
${MICROPY_DIR}/shared/runtime/gchelper_native.c
|
||||
${MICROPY_DIR}/shared/runtime/mpirq.c
|
||||
${MICROPY_DIR}/shared/runtime/pyexec.c
|
||||
${MICROPY_DIR}/shared/runtime/stdout_helpers.c
|
||||
${MICROPY_DIR}/shared/runtime/sys_stdio_mphal.c
|
||||
${MICROPY_DIR}/shared/timeutils/timeutils.c
|
||||
)
|
||||
|
||||
set(MICROPY_SOURCE_DRIVERS
|
||||
@ -108,8 +108,8 @@ set(MICROPY_SOURCE_QSTR
|
||||
${MICROPY_SOURCE_PY}
|
||||
${MICROPY_SOURCE_EXTMOD}
|
||||
${MICROPY_SOURCE_USERMOD}
|
||||
${MICROPY_DIR}/lib/utils/mpirq.c
|
||||
${MICROPY_DIR}/lib/utils/sys_stdio_mphal.c
|
||||
${MICROPY_DIR}/shared/runtime/mpirq.c
|
||||
${MICROPY_DIR}/shared/runtime/sys_stdio_mphal.c
|
||||
${PROJECT_SOURCE_DIR}/machine_adc.c
|
||||
${PROJECT_SOURCE_DIR}/machine_i2c.c
|
||||
${PROJECT_SOURCE_DIR}/machine_pin.c
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/mpirq.h"
|
||||
#include "shared/runtime/mpirq.h"
|
||||
#include "modmachine.h"
|
||||
#include "extmod/virtpin.h"
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "hardware/rtc.h"
|
||||
#include "pico/util/datetime.h"
|
||||
#include "modmachine.h"
|
||||
|
@ -32,9 +32,9 @@
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "tusb.h"
|
||||
#include "uart.h"
|
||||
#include "modmachine.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "extmod/machine_i2c.h"
|
||||
#include "extmod/machine_mem.h"
|
||||
#include "extmod/machine_pulse.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "extmod/utime_mphal.h"
|
||||
#include "hardware/rtc.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/timeutils/timeutils.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
#include "tusb.h"
|
||||
#include "uart.h"
|
||||
#include "hardware/rtc.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/mpirq.h"
|
||||
#include "shared/runtime/mpirq.h"
|
||||
#include "modrp2.h"
|
||||
|
||||
#include "hardware/clocks.h"
|
||||
|
@ -53,27 +53,27 @@ SRC_C = \
|
||||
samd_isr.c \
|
||||
samd_soc.c \
|
||||
tusb_port.c \
|
||||
lib/libc/string0.c \
|
||||
lib/libm/ef_sqrt.c \
|
||||
lib/libm/fmodf.c \
|
||||
lib/libm/math.c \
|
||||
lib/libm/nearbyintf.c \
|
||||
lib/mp-readline/readline.c \
|
||||
lib/tinyusb/src/class/cdc/cdc_device.c \
|
||||
lib/tinyusb/src/common/tusb_fifo.c \
|
||||
lib/tinyusb/src/device/usbd.c \
|
||||
lib/tinyusb/src/device/usbd_control.c \
|
||||
lib/tinyusb/src/portable/microchip/samd/dcd_samd.c \
|
||||
lib/tinyusb/src/tusb.c \
|
||||
lib/utils/gchelper_native.c \
|
||||
lib/utils/printf.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
shared/libc/printf.c \
|
||||
shared/libc/string0.c \
|
||||
shared/readline/readline.c \
|
||||
shared/runtime/gchelper_native.c \
|
||||
shared/runtime/pyexec.c \
|
||||
shared/runtime/stdout_helpers.c \
|
||||
|
||||
ifeq ($(MCU_SERIES),SAMD21)
|
||||
SRC_S = lib/utils/gchelper_m0.s
|
||||
SRC_S = shared/runtime/gchelper_m0.s
|
||||
else
|
||||
SRC_S = lib/utils/gchelper_m3.s
|
||||
SRC_S = shared/runtime/gchelper_m3.s
|
||||
endif
|
||||
|
||||
# List of sources for qstr extraction
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
extern uint8_t _sstack, _estack, _sheap, _eheap;
|
||||
|
||||
|
@ -157,19 +157,19 @@ endif
|
||||
# Options for mpy-cross
|
||||
MPY_CROSS_FLAGS += -march=armv7m
|
||||
|
||||
LIB_SRC_C += $(addprefix lib/,\
|
||||
SHARED_SRC_C += $(addprefix shared/,\
|
||||
libc/string0.c \
|
||||
mp-readline/readline.c \
|
||||
netutils/dhcpserver.c \
|
||||
netutils/netutils.c \
|
||||
netutils/trace.c \
|
||||
netutils/dhcpserver.c \
|
||||
readline/readline.c \
|
||||
runtime/gchelper_native.c \
|
||||
runtime/interrupt_char.c \
|
||||
runtime/mpirq.c \
|
||||
runtime/pyexec.c \
|
||||
runtime/stdout_helpers.c \
|
||||
runtime/sys_stdio_mphal.c \
|
||||
timeutils/timeutils.c \
|
||||
utils/gchelper_native.c \
|
||||
utils/pyexec.c \
|
||||
utils/interrupt_char.c \
|
||||
utils/stdout_helpers.c \
|
||||
utils/sys_stdio_mphal.c \
|
||||
utils/mpirq.c \
|
||||
)
|
||||
|
||||
ifeq ($(MICROPY_FLOAT_IMPL),double)
|
||||
@ -359,18 +359,18 @@ SRC_O += \
|
||||
ifeq ($(MCU_SERIES),f0)
|
||||
SRC_O += \
|
||||
resethandler_m0.o \
|
||||
lib/utils/gchelper_m0.o
|
||||
shared/runtime/gchelper_m0.o
|
||||
else
|
||||
ifeq ($(MCU_SERIES),l0)
|
||||
CSUPEROPT = -Os # save some code space
|
||||
SRC_O += \
|
||||
resethandler_m0.o \
|
||||
lib/utils/gchelper_m0.o
|
||||
shared/runtime/gchelper_m0.o
|
||||
else
|
||||
SRC_O += \
|
||||
system_stm32.o \
|
||||
resethandler.o \
|
||||
lib/utils/gchelper_m3.o
|
||||
shared/runtime/gchelper_m3.o
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -542,6 +542,7 @@ endif
|
||||
OBJ += $(PY_O)
|
||||
OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o))
|
||||
OBJ += $(LIBM_O)
|
||||
OBJ += $(addprefix $(BUILD)/, $(SHARED_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(EXTMOD_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(HAL_SRC_C:.c=.o))
|
||||
@ -555,7 +556,7 @@ OBJ += $(BUILD)/pins_$(BOARD).o
|
||||
# This file contains performance critical functions so turn up the optimisation
|
||||
# level. It doesn't add much to the code size and improves performance a bit.
|
||||
# Don't use -O3 with this file because gcc tries to optimise memset in terms of itself.
|
||||
$(BUILD)/lib/libc/string0.o: COPT += -O2
|
||||
$(BUILD)/shared/libc/string0.o: COPT += -O2
|
||||
|
||||
# We put several files into the first 16K section with the ISRs.
|
||||
# If we compile these using -O0 then it won't fit. So if you really want these
|
||||
@ -728,7 +729,7 @@ GEN_CDCINF_FILE = $(HEADER_BUILD)/pybcdc.inf
|
||||
GEN_CDCINF_HEADER = $(HEADER_BUILD)/pybcdc_inf.h
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SRC_MOD) $(LIB_SRC_C) $(EXTMOD_SRC_C)
|
||||
SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SRC_MOD) $(SHARED_SRC_C) $(EXTMOD_SRC_C)
|
||||
# Append any auto-generated sources that are needed by sources listed in
|
||||
# SRC_QSTR
|
||||
SRC_QSTR_AUTO_DEPS += $(GEN_CDCINF_HEADER)
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "boardctrl.h"
|
||||
#include "led.h"
|
||||
#include "usrsw.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <string.h>
|
||||
#include "py/mphal.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "pin_static_af.h"
|
||||
#include "modnetwork.h"
|
||||
#include "mpu.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "py/mpstate.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mpthread.h"
|
||||
#include "lib/utils/gchelper.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "gccollect.h"
|
||||
#include "softtimer.h"
|
||||
#include "systick.h"
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include "py/stream.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "lib/utils/mpirq.h"
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
#include "shared/runtime/mpirq.h"
|
||||
#include "uart.h"
|
||||
#include "irq.h"
|
||||
#include "pendsv.h"
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/readline/readline.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "lib/littlefs/lfs1.h"
|
||||
#include "lib/littlefs/lfs1_util.h"
|
||||
|
@ -105,9 +105,9 @@ else
|
||||
COPT += -Os -DNDEBUG
|
||||
endif
|
||||
|
||||
$(BUILD)/lib/libc/string0.o: CFLAGS += $(CFLAGS_BUILTIN)
|
||||
$(BUILD)/shared/libc/string0.o: CFLAGS += $(CFLAGS_BUILTIN)
|
||||
LIB_SRC_C += \
|
||||
lib/libc/string0.c \
|
||||
shared/libc/string0.c \
|
||||
lib/littlefs/lfs1.c \
|
||||
lib/littlefs/lfs1_util.c \
|
||||
lib/littlefs/lfs2.c \
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "extmod/machine_pulse.h"
|
||||
#include "extmod/machine_i2c.h"
|
||||
#include "extmod/machine_spi.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "lib/oofatfs/ff.h"
|
||||
#include "extmod/vfs.h"
|
||||
#include "extmod/vfs_fat.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "py/objlist.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "systick.h"
|
||||
#include "pendsv.h"
|
||||
#include "modnetwork.h"
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "modnetwork.h"
|
||||
#include "pin.h"
|
||||
#include "spi.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "py/stream.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/netutils/netutils.h"
|
||||
#include "shared/netutils/netutils.h"
|
||||
#include "modnetwork.h"
|
||||
#include "pin.h"
|
||||
#include "spi.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
#include "drivers/dht/dht.h"
|
||||
#include "stm32_it.h"
|
||||
#include "irq.h"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user