2022-06-17 17:11:30 +01:00
|
|
|
# This makefile fragment adds the source code files for the core extmod modules
|
|
|
|
# and provides rules to build 3rd-party components for extmod modules.
|
|
|
|
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
SRC_EXTMOD_C += \
|
|
|
|
extmod/machine_bitstream.c \
|
|
|
|
extmod/machine_i2c.c \
|
|
|
|
extmod/machine_mem.c \
|
|
|
|
extmod/machine_pinbase.c \
|
|
|
|
extmod/machine_pulse.c \
|
|
|
|
extmod/machine_pwm.c \
|
|
|
|
extmod/machine_signal.c \
|
|
|
|
extmod/machine_spi.c \
|
2022-10-27 04:32:43 +01:00
|
|
|
extmod/machine_timer.c \
|
2023-10-10 08:19:03 +01:00
|
|
|
extmod/machine_wdt.c \
|
2023-06-08 06:51:50 +01:00
|
|
|
extmod/modasyncio.c \
|
2022-08-18 07:24:27 +01:00
|
|
|
extmod/modbinascii.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/modbluetooth.c \
|
|
|
|
extmod/modbtree.c \
|
2022-08-18 07:24:27 +01:00
|
|
|
extmod/modcryptolib.c \
|
2023-06-26 04:52:10 +01:00
|
|
|
extmod/moddeflate.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/modframebuf.c \
|
2022-08-18 07:24:27 +01:00
|
|
|
extmod/modhashlib.c \
|
|
|
|
extmod/modheapq.c \
|
|
|
|
extmod/modjson.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/modlwip.c \
|
|
|
|
extmod/modnetwork.c \
|
|
|
|
extmod/modonewire.c \
|
2022-08-18 07:24:27 +01:00
|
|
|
extmod/modos.c \
|
|
|
|
extmod/modplatform.c\
|
|
|
|
extmod/modrandom.c \
|
|
|
|
extmod/modre.c \
|
|
|
|
extmod/modselect.c \
|
|
|
|
extmod/modsocket.c \
|
|
|
|
extmod/modssl_axtls.c \
|
|
|
|
extmod/modssl_mbedtls.c \
|
|
|
|
extmod/modtime.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/moductypes.c \
|
|
|
|
extmod/modwebrepl.c \
|
2022-08-18 07:24:27 +01:00
|
|
|
extmod/modwebsocket.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/network_cyw43.c \
|
2023-06-21 16:15:46 +01:00
|
|
|
extmod/network_esp_hosted.c \
|
2023-02-01 03:19:45 +00:00
|
|
|
extmod/network_lwip.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/network_ninaw10.c \
|
|
|
|
extmod/network_wiznet5k.c \
|
2022-08-18 07:24:27 +01:00
|
|
|
extmod/os_dupterm.c \
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
extmod/vfs.c \
|
|
|
|
extmod/vfs_blockdev.c \
|
|
|
|
extmod/vfs_fat.c \
|
|
|
|
extmod/vfs_fat_diskio.c \
|
|
|
|
extmod/vfs_fat_file.c \
|
|
|
|
extmod/vfs_lfs.c \
|
|
|
|
extmod/vfs_posix.c \
|
|
|
|
extmod/vfs_posix_file.c \
|
|
|
|
extmod/vfs_reader.c \
|
|
|
|
extmod/virtpin.c \
|
|
|
|
shared/libc/abort_.c \
|
|
|
|
shared/libc/printf.c \
|
2022-06-17 17:11:30 +01:00
|
|
|
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
SRC_THIRDPARTY_C += \
|
2022-06-17 17:11:30 +01:00
|
|
|
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
PY_O += $(addprefix $(BUILD)/, $(SRC_EXTMOD_C:.c=.o))
|
|
|
|
PY_O += $(addprefix $(BUILD)/, $(SRC_THIRDPARTY_C:.c=.o))
|
|
|
|
SRC_QSTR += $(SRC_EXTMOD_C)
|
|
|
|
|
|
|
|
CFLAGS += $(CFLAGS_EXTMOD) $(CFLAGS_THIRDPARTY)
|
|
|
|
LDFLAGS += $(LDFLAGS_EXTMOD) $(LDFLAGS_THIRDPARTY)
|
2019-06-05 05:23:12 +01:00
|
|
|
|
2019-11-07 07:27:51 +00:00
|
|
|
################################################################################
|
|
|
|
# VFS FAT FS
|
|
|
|
|
|
|
|
OOFATFS_DIR = lib/oofatfs
|
|
|
|
|
2019-06-05 05:23:12 +01:00
|
|
|
# this sets the config file for FatFs
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_THIRDPARTY += -DFFCONF_H=\"$(OOFATFS_DIR)/ffconf.h\"
|
2019-11-07 07:27:51 +00:00
|
|
|
|
|
|
|
ifeq ($(MICROPY_VFS_FAT),1)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_VFS_FAT=1
|
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(OOFATFS_DIR)/,\
|
2019-11-07 07:27:51 +00:00
|
|
|
ff.c \
|
|
|
|
ffunicode.c \
|
|
|
|
)
|
|
|
|
endif
|
2019-06-05 05:23:12 +01:00
|
|
|
|
|
|
|
################################################################################
|
2019-10-18 07:25:08 +01:00
|
|
|
# VFS littlefs
|
|
|
|
|
|
|
|
LITTLEFS_DIR = lib/littlefs
|
2019-10-30 01:08:58 +00:00
|
|
|
|
|
|
|
ifeq ($(MICROPY_VFS_LFS1),1)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_VFS_LFS1=1
|
|
|
|
CFLAGS_THIRDPARTY += -DLFS1_NO_MALLOC -DLFS1_NO_DEBUG -DLFS1_NO_WARN -DLFS1_NO_ERROR -DLFS1_NO_ASSERT
|
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(LITTLEFS_DIR)/,\
|
2019-10-18 07:25:08 +01:00
|
|
|
lfs1.c \
|
|
|
|
lfs1_util.c \
|
2019-10-30 01:08:58 +00:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_VFS_LFS2),1)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_VFS_LFS2=1
|
|
|
|
CFLAGS_THIRDPARTY += -DLFS2_NO_MALLOC -DLFS2_NO_DEBUG -DLFS2_NO_WARN -DLFS2_NO_ERROR -DLFS2_NO_ASSERT
|
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(LITTLEFS_DIR)/,\
|
2019-10-18 07:25:08 +01:00
|
|
|
lfs2.c \
|
|
|
|
lfs2_util.c \
|
|
|
|
)
|
2020-10-03 11:19:48 +01:00
|
|
|
|
|
|
|
$(BUILD)/$(LITTLEFS_DIR)/lfs2.o: CFLAGS += -Wno-missing-field-initializers
|
2019-10-18 07:25:08 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
2019-06-05 05:23:12 +01:00
|
|
|
# ussl
|
|
|
|
|
2022-08-18 06:01:26 +01:00
|
|
|
ifeq ($(MICROPY_PY_SSL),1)
|
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_SSL=1
|
2019-06-05 05:23:12 +01:00
|
|
|
ifeq ($(MICROPY_SSL_AXTLS),1)
|
|
|
|
AXTLS_DIR = lib/axtls
|
2022-10-08 13:47:57 +01:00
|
|
|
GIT_SUBMODULES += $(AXTLS_DIR)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_SSL_AXTLS=1 -I$(TOP)/lib/axtls/ssl -I$(TOP)/lib/axtls/crypto -I$(TOP)/extmod/axtls-include
|
2020-04-20 14:48:34 +01:00
|
|
|
$(BUILD)/$(AXTLS_DIR)/%.o: CFLAGS += -Wno-all -Wno-unused-parameter -Wno-uninitialized -Wno-sign-compare -Wno-old-style-definition -Dmp_stream_errno=errno $(AXTLS_DEFS_EXTRA)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(AXTLS_DIR)/,\
|
2019-06-05 05:23:12 +01:00
|
|
|
ssl/asn1.c \
|
|
|
|
ssl/loader.c \
|
|
|
|
ssl/tls1.c \
|
|
|
|
ssl/tls1_svr.c \
|
|
|
|
ssl/tls1_clnt.c \
|
|
|
|
ssl/x509.c \
|
|
|
|
crypto/aes.c \
|
|
|
|
crypto/bigint.c \
|
|
|
|
crypto/crypto_misc.c \
|
|
|
|
crypto/hmac.c \
|
|
|
|
crypto/md5.c \
|
|
|
|
crypto/rsa.c \
|
|
|
|
crypto/sha1.c \
|
|
|
|
)
|
|
|
|
else ifeq ($(MICROPY_SSL_MBEDTLS),1)
|
2019-06-05 06:22:21 +01:00
|
|
|
MBEDTLS_DIR = lib/mbedtls
|
2022-11-09 17:35:40 +00:00
|
|
|
MBEDTLS_CONFIG_FILE ?= \"mbedtls/mbedtls_config.h\"
|
2022-10-08 13:47:57 +01:00
|
|
|
GIT_SUBMODULES += $(MBEDTLS_DIR)
|
2022-11-09 17:35:40 +00:00
|
|
|
CFLAGS_EXTMOD += -DMBEDTLS_CONFIG_FILE=$(MBEDTLS_CONFIG_FILE)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_SSL_MBEDTLS=1 -I$(TOP)/$(MBEDTLS_DIR)/include
|
|
|
|
SRC_THIRDPARTY_C += lib/mbedtls_errors/mp_mbedtls_errors.c
|
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(MBEDTLS_DIR)/library/,\
|
2019-06-05 06:22:21 +01:00
|
|
|
aes.c \
|
|
|
|
aesni.c \
|
|
|
|
arc4.c \
|
|
|
|
asn1parse.c \
|
|
|
|
asn1write.c \
|
|
|
|
base64.c \
|
|
|
|
bignum.c \
|
|
|
|
blowfish.c \
|
|
|
|
camellia.c \
|
|
|
|
ccm.c \
|
|
|
|
certs.c \
|
|
|
|
chacha20.c \
|
|
|
|
chachapoly.c \
|
|
|
|
cipher.c \
|
|
|
|
cipher_wrap.c \
|
|
|
|
cmac.c \
|
|
|
|
ctr_drbg.c \
|
|
|
|
debug.c \
|
|
|
|
des.c \
|
|
|
|
dhm.c \
|
|
|
|
ecdh.c \
|
|
|
|
ecdsa.c \
|
|
|
|
ecjpake.c \
|
|
|
|
ecp.c \
|
|
|
|
ecp_curves.c \
|
|
|
|
entropy.c \
|
|
|
|
entropy_poll.c \
|
|
|
|
gcm.c \
|
|
|
|
havege.c \
|
|
|
|
hmac_drbg.c \
|
|
|
|
md2.c \
|
|
|
|
md4.c \
|
|
|
|
md5.c \
|
|
|
|
md.c \
|
|
|
|
oid.c \
|
|
|
|
padlock.c \
|
|
|
|
pem.c \
|
|
|
|
pk.c \
|
|
|
|
pkcs11.c \
|
|
|
|
pkcs12.c \
|
|
|
|
pkcs5.c \
|
|
|
|
pkparse.c \
|
|
|
|
pk_wrap.c \
|
|
|
|
pkwrite.c \
|
|
|
|
platform.c \
|
|
|
|
platform_util.c \
|
|
|
|
poly1305.c \
|
|
|
|
ripemd160.c \
|
|
|
|
rsa.c \
|
|
|
|
rsa_internal.c \
|
|
|
|
sha1.c \
|
|
|
|
sha256.c \
|
|
|
|
sha512.c \
|
|
|
|
ssl_cache.c \
|
|
|
|
ssl_ciphersuites.c \
|
|
|
|
ssl_cli.c \
|
|
|
|
ssl_cookie.c \
|
|
|
|
ssl_srv.c \
|
2023-04-28 04:14:36 +01:00
|
|
|
ssl_msg.c \
|
2019-06-05 06:22:21 +01:00
|
|
|
ssl_ticket.c \
|
|
|
|
ssl_tls.c \
|
|
|
|
timing.c \
|
2023-04-28 04:14:36 +01:00
|
|
|
constant_time.c \
|
2019-06-05 06:22:21 +01:00
|
|
|
x509.c \
|
|
|
|
x509_create.c \
|
|
|
|
x509_crl.c \
|
|
|
|
x509_crt.c \
|
|
|
|
x509_csr.c \
|
|
|
|
x509write_crt.c \
|
|
|
|
x509write_csr.c \
|
|
|
|
xtea.c \
|
|
|
|
)
|
2019-06-05 05:23:12 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# lwip
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_PY_LWIP),1)
|
2022-10-08 13:47:57 +01:00
|
|
|
GIT_SUBMODULES += lib/lwip
|
2019-06-05 05:23:12 +01:00
|
|
|
# A port should add an include path where lwipopts.h can be found (eg extmod/lwip-include)
|
|
|
|
LWIP_DIR = lib/lwip/src
|
|
|
|
INC += -I$(TOP)/$(LWIP_DIR)/include
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_LWIP=1
|
|
|
|
$(BUILD)/$(LWIP_DIR)/core/ipv4/dhcp.o: CFLAGS += -Wno-address
|
|
|
|
SRC_THIRDPARTY_C += shared/netutils/netutils.c
|
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(LWIP_DIR)/,\
|
2019-06-05 07:13:34 +01:00
|
|
|
apps/mdns/mdns.c \
|
2019-06-05 05:23:12 +01:00
|
|
|
core/def.c \
|
|
|
|
core/dns.c \
|
|
|
|
core/inet_chksum.c \
|
|
|
|
core/init.c \
|
|
|
|
core/ip.c \
|
|
|
|
core/mem.c \
|
|
|
|
core/memp.c \
|
|
|
|
core/netif.c \
|
|
|
|
core/pbuf.c \
|
|
|
|
core/raw.c \
|
|
|
|
core/stats.c \
|
|
|
|
core/sys.c \
|
|
|
|
core/tcp.c \
|
|
|
|
core/tcp_in.c \
|
|
|
|
core/tcp_out.c \
|
|
|
|
core/timeouts.c \
|
|
|
|
core/udp.c \
|
|
|
|
core/ipv4/autoip.c \
|
|
|
|
core/ipv4/dhcp.c \
|
|
|
|
core/ipv4/etharp.c \
|
|
|
|
core/ipv4/icmp.c \
|
|
|
|
core/ipv4/igmp.c \
|
|
|
|
core/ipv4/ip4_addr.c \
|
|
|
|
core/ipv4/ip4.c \
|
|
|
|
core/ipv4/ip4_frag.c \
|
|
|
|
core/ipv6/dhcp6.c \
|
|
|
|
core/ipv6/ethip6.c \
|
|
|
|
core/ipv6/icmp6.c \
|
|
|
|
core/ipv6/inet6.c \
|
|
|
|
core/ipv6/ip6_addr.c \
|
|
|
|
core/ipv6/ip6.c \
|
|
|
|
core/ipv6/ip6_frag.c \
|
|
|
|
core/ipv6/mld6.c \
|
|
|
|
core/ipv6/nd6.c \
|
|
|
|
netif/ethernet.c \
|
|
|
|
)
|
|
|
|
ifeq ($(MICROPY_PY_LWIP_SLIP),1)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_LWIP_SLIP=1
|
|
|
|
SRC_THIRDPARTY_C += $(LWIP_DIR)/netif/slipif.c
|
2019-06-05 05:23:12 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# btree
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_PY_BTREE),1)
|
|
|
|
BTREE_DIR = lib/berkeley-db-1.xx
|
|
|
|
BTREE_DEFS = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error=printf -Dabort=abort_ "-Dvirt_fd_t=void*" $(BTREE_DEFS_EXTRA)
|
|
|
|
INC += -I$(TOP)/$(BTREE_DIR)/PORT/include
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(BTREE_DIR)/,\
|
2019-06-05 05:23:12 +01:00
|
|
|
btree/bt_close.c \
|
|
|
|
btree/bt_conv.c \
|
|
|
|
btree/bt_debug.c \
|
|
|
|
btree/bt_delete.c \
|
|
|
|
btree/bt_get.c \
|
|
|
|
btree/bt_open.c \
|
|
|
|
btree/bt_overflow.c \
|
|
|
|
btree/bt_page.c \
|
|
|
|
btree/bt_put.c \
|
|
|
|
btree/bt_search.c \
|
|
|
|
btree/bt_seq.c \
|
|
|
|
btree/bt_split.c \
|
|
|
|
btree/bt_utils.c \
|
|
|
|
mpool/mpool.c \
|
|
|
|
)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_BTREE=1
|
2019-06-05 05:23:12 +01:00
|
|
|
# we need to suppress certain warnings to get berkeley-db to compile cleanly
|
|
|
|
# and we have separate BTREE_DEFS so the definitions don't interfere with other source code
|
2023-05-16 07:08:41 +01:00
|
|
|
$(BUILD)/$(BTREE_DIR)/%.o: CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-non-prototype -Wno-unknown-warning-option $(BTREE_DEFS)
|
2019-06-05 05:23:12 +01:00
|
|
|
$(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS)
|
|
|
|
endif
|
|
|
|
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
################################################################################
|
|
|
|
# networking
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_PY_NETWORK_CYW43),1)
|
2023-02-01 03:24:46 +00:00
|
|
|
CYW43_DIR = lib/cyw43-driver
|
|
|
|
GIT_SUBMODULES += $(CYW43_DIR)
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_NETWORK_CYW43=1
|
2023-02-01 03:24:46 +00:00
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(CYW43_DIR)/src/,\
|
|
|
|
cyw43_ctrl.c \
|
|
|
|
cyw43_lwip.c \
|
|
|
|
cyw43_ll.c \
|
|
|
|
cyw43_sdio.c \
|
|
|
|
cyw43_stats.c \
|
|
|
|
)
|
|
|
|
ifeq ($(MICROPY_PY_BLUETOOTH),1)
|
|
|
|
DRIVERS_SRC_C += drivers/cyw43/cywbt.c
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
endif
|
|
|
|
|
2023-02-01 03:24:46 +00:00
|
|
|
$(BUILD)/$(CYW43_DIR)/src/cyw43_%.o: CFLAGS += -std=c11
|
|
|
|
endif # MICROPY_PY_NETWORK_CYW43
|
|
|
|
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
ifneq ($(MICROPY_PY_NETWORK_WIZNET5K),)
|
|
|
|
ifneq ($(MICROPY_PY_NETWORK_WIZNET5K),0)
|
|
|
|
WIZNET5K_DIR=lib/wiznet5k
|
|
|
|
GIT_SUBMODULES += lib/wiznet5k
|
|
|
|
INC += -I$(TOP)/$(WIZNET5K_DIR) -I$(TOP)/$(WIZNET5K_DIR)/Ethernet
|
|
|
|
CFLAGS += -DMICROPY_PY_NETWORK_WIZNET5K=$(MICROPY_PY_NETWORK_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_NETWORK_WIZNET5K)
|
|
|
|
CFLAGS_THIRDPARTY += -DWIZCHIP_PREFIXED_EXPORTS=1
|
|
|
|
ifeq ($(MICROPY_PY_LWIP),1)
|
|
|
|
# When using MACRAW mode (with lwIP), maximum buffer space must be used for the raw socket
|
|
|
|
CFLAGS_THIRDPARTY += -DWIZCHIP_USE_MAX_BUFFER
|
|
|
|
endif
|
|
|
|
SRC_THIRDPARTY_C += $(addprefix $(WIZNET5K_DIR)/,\
|
|
|
|
Ethernet/W$(MICROPY_PY_NETWORK_WIZNET5K)/w$(MICROPY_PY_NETWORK_WIZNET5K).c \
|
|
|
|
Ethernet/wizchip_conf.c \
|
|
|
|
Ethernet/socket.c \
|
|
|
|
Internet/DNS/dns.c \
|
|
|
|
Internet/DHCP/dhcp.c \
|
|
|
|
)
|
|
|
|
endif
|
2023-06-21 16:13:09 +01:00
|
|
|
endif # MICROPY_PY_NETWORK_WIZNET5K
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_PY_NETWORK_ESP_HOSTED),1)
|
|
|
|
ESP_HOSTED_DIR = drivers/esp-hosted
|
|
|
|
PROTOBUF_C_DIR = lib/protobuf-c
|
|
|
|
PROTOC ?= protoc-c
|
|
|
|
GIT_SUBMODULES += $(PROTOBUF_C_DIR)
|
|
|
|
|
|
|
|
CFLAGS += -DMICROPY_PY_NETWORK_ESP_HOSTED=1
|
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_NETWORK_ESP_HOSTED=1
|
|
|
|
INC += -I$(TOP)/$(ESP_HOSTED_DIR)
|
|
|
|
|
|
|
|
ESP_HOSTED_SRC_C = $(addprefix $(ESP_HOSTED_DIR)/,\
|
|
|
|
esp_hosted_wifi.c \
|
|
|
|
esp_hosted_netif.c \
|
|
|
|
esp_hosted_hal.c \
|
|
|
|
)
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_PY_BLUETOOTH),1)
|
|
|
|
ESP_HOSTED_SRC_C += $(ESP_HOSTED_DIR)/esp_hosted_bthci.c
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
endif
|
|
|
|
|
2023-06-21 16:13:09 +01:00
|
|
|
# Include the protobuf-c support functions
|
|
|
|
ESP_HOSTED_SRC_C += $(addprefix $(PROTOBUF_C_DIR)/,\
|
|
|
|
protobuf-c/protobuf-c.c \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(BUILD)/$(PROTOBUF_C_DIR)/%.o: CFLAGS += -Wno-unused-but-set-variable
|
|
|
|
|
|
|
|
# Generate esp_hosted-pb-c.c|h from esp_hosted.proto
|
|
|
|
PROTO_GEN_SRC = $(BUILD)/extmod/esp_hosted.pb-c.c
|
|
|
|
ESP_HOSTED_SRC_C += $(PROTO_GEN_SRC)
|
|
|
|
|
|
|
|
$(PROTO_GEN_SRC): $(TOP)/$(ESP_HOSTED_DIR)/esp_hosted.proto
|
|
|
|
$(PROTOC) --proto_path=$(dir $<) --c_out=$(dir $@) $<
|
|
|
|
|
|
|
|
# Scope the protobuf include paths to the esp_hosted source files, only
|
|
|
|
ESP_HOSTED_OBJS = $(addprefix $(BUILD)/, $(ESP_HOSTED_SRC_C:.c=.o))
|
|
|
|
$(ESP_HOSTED_OBJS): $(PROTO_GEN_SRC)
|
|
|
|
$(ESP_HOSTED_OBJS): CFLAGS += -I$(dir $(PROTO_GEN_SRC)) -I$(TOP)/$(PROTOBUF_C_DIR)
|
|
|
|
|
|
|
|
DRIVERS_SRC_C += $(ESP_HOSTED_SRC_C)
|
|
|
|
|
|
|
|
endif # MICROPY_PY_NETWORK_ESP_HOSTED
|
|
|
|
|
extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.
Make all extmod variables (src, flags, etc) private to extmod.mk.
Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.
Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-08 13:59:08 +01:00
|
|
|
################################################################################
|
|
|
|
# bluetooth
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_PY_BLUETOOTH),1)
|
|
|
|
CFLAGS_EXTMOD += -DMICROPY_PY_BLUETOOTH=1
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_BLUETOOTH_NIMBLE),1)
|
|
|
|
ifeq ($(MICROPY_BLUETOOTH_BTSTACK),1)
|
|
|
|
$(error Cannot enable both NimBLE and BTstack at the same time)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(MICROPY_BLUETOOTH_NIMBLE),1)
|
|
|
|
ifneq ($(MICROPY_BLUETOOTH_BTSTACK),1)
|
|
|
|
$(error Must enable one of MICROPY_BLUETOOTH_NIMBLE or MICROPY_BLUETOOTH_BTSTACK)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_BLUETOOTH_NIMBLE),1)
|
|
|
|
include $(TOP)/extmod/nimble/nimble.mk
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_BLUETOOTH_BTSTACK),1)
|
|
|
|
include $(TOP)/extmod/btstack/btstack.mk
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|