File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ if(MICROPY_SSL_MBEDTLS)
114114 )
115115
116116 target_sources (micropy_lib_mbedtls INTERFACE
117+ ${MICROPY_DIR} /lib/mbedtls_errors/mp_mbedtls_errors.c
117118 ${MICROPY_LIB_MBEDTLS_DIR} /library/aes.c
118119 ${MICROPY_LIB_MBEDTLS_DIR} /library/aesni.c
119120 ${MICROPY_LIB_MBEDTLS_DIR} /library/arc4.c
@@ -141,7 +142,6 @@ if(MICROPY_SSL_MBEDTLS)
141142 ${MICROPY_LIB_MBEDTLS_DIR} /library/ecp_curves.c
142143 ${MICROPY_LIB_MBEDTLS_DIR} /library/entropy.c
143144 ${MICROPY_LIB_MBEDTLS_DIR} /library/entropy_poll.c
144- ${MICROPY_LIB_MBEDTLS_DIR} /library/error.c
145145 ${MICROPY_LIB_MBEDTLS_DIR} /library/gcm.c
146146 ${MICROPY_LIB_MBEDTLS_DIR} /library/havege.c
147147 ${MICROPY_LIB_MBEDTLS_DIR} /library/hmac_drbg.c
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ SRC_MOD += $(addprefix $(AXTLS_DIR)/,\
119119else ifeq ($(MICROPY_SSL_MBEDTLS),1)
120120MBEDTLS_DIR = lib/mbedtls
121121CFLAGS_MOD += -DMICROPY_SSL_MBEDTLS=1 -I$(TOP ) /$(MBEDTLS_DIR ) /include
122+ SRC_MOD += lib/mbedtls_errors/mp_mbedtls_errors.c
122123SRC_MOD += $(addprefix $(MBEDTLS_DIR ) /library/,\
123124 aes.c \
124125 aesni.c \
@@ -147,7 +148,6 @@ SRC_MOD += $(addprefix $(MBEDTLS_DIR)/library/,\
147148 ecp_curves.c \
148149 entropy.c \
149150 entropy_poll.c \
150- error.c \
151151 gcm.c \
152152 havege.c \
153153 hmac_drbg.c \
Original file line number Diff line number Diff line change @@ -96,15 +96,13 @@ SRC_TINYUSB_C += \
9696
9797# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
9898ifeq ($(MICROPY_PY_LWIP ) ,1)
99- SRC_MOD := $(filter-out % /mbedtls/library/error.c, $(SRC_MOD ) )
10099SRC_ETH_C += \
101100 $(MCU_DIR ) /drivers/fsl_enet.c \
102101 hal/phy/device/phydp83825/fsl_phydp83825.c \
103102 hal/phy/device/phydp83848/fsl_phydp83848.c \
104103 hal/phy/device/phyksz8081/fsl_phyksz8081.c \
105104 hal/phy/device/phylan8720/fsl_phylan8720.c \
106- hal/phy/mdio/enet/fsl_enet_mdio.c \
107- lib/mbedtls_errors/mp_mbedtls_errors.c
105+ hal/phy/mdio/enet/fsl_enet_mdio.c
108106endif
109107
110108# NXP SDK sources
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ set(MICROPY_SOURCE_LIB
7777 ${MICROPY_DIR} /lib/littlefs/lfs1_util.c
7878 ${MICROPY_DIR} /lib/littlefs/lfs2.c
7979 ${MICROPY_DIR} /lib/littlefs/lfs2_util.c
80- ${MICROPY_DIR} /lib/mbedtls_errors/mp_mbedtls_errors.c
8180 ${MICROPY_DIR} /lib/oofatfs/ff.c
8281 ${MICROPY_DIR} /lib/oofatfs/ffunicode.c
8382 ${MICROPY_DIR} /shared/netutils/dhcpserver.c
@@ -343,12 +342,6 @@ target_sources(${MICROPY_TARGET} PRIVATE
343342
344343target_link_libraries (${MICROPY_TARGET} micropy_lib_mbedtls )
345344
346- # Filter out library/error.c as we're using mp_mbedtls_errors.c instead.
347- set_source_files_properties (${MICROPY_LIB_MBEDTLS_DIR} /library/error.c
348- TARGET_DIRECTORY micropy_lib_mbedtls
349- PROPERTIES HEADER_FILE_ONLY ON
350- )
351-
352345target_link_libraries (${MICROPY_TARGET} usermod )
353346
354347target_include_directories (${MICROPY_TARGET} PRIVATE
Original file line number Diff line number Diff line change @@ -499,9 +499,6 @@ endif
499499ifeq ($(MICROPY_SSL_MBEDTLS ) ,1)
500500CFLAGS_MOD += -DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"'
501501SRC_MOD += mbedtls/mbedtls_port.c
502- # replace mbedtls' error.c by ours
503- SRC_MOD := $(filter-out % /mbedtls/library/error.c, $(SRC_MOD ) )
504- LIB_SRC_C += lib/mbedtls_errors/mp_mbedtls_errors.c
505502endif
506503
507504ifeq ($(MICROPY_PY_BLUETOOTH ) ,1)
Original file line number Diff line number Diff line change @@ -140,9 +140,6 @@ endif
140140ifeq ($(MICROPY_SSL_MBEDTLS ) ,1)
141141GIT_SUBMODULES += lib/mbedtls
142142CFLAGS_MOD += -DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"'
143- # replace mbedtls' error.c by ours
144- SRC_MOD := $(filter-out % /mbedtls/library/error.c, $(SRC_MOD ) )
145- LIB_SRC_C += lib/mbedtls_errors/mp_mbedtls_errors.c
146143endif
147144endif
148145
You can’t perform that action at this time.
0 commit comments