summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-06-07 14:33:09 +1000
committerDamien George <damien@micropython.org>2022-06-07 16:55:18 +1000
commit66dfe17b181101bbee9ff22ebd30b7f05787b439 (patch)
tree7f4130a8ec891b1db102123449ab7a9a9924e1e5
parenta446a7bdef86c2e4fef673e0d1f07e5a35672831 (diff)
rp2/CMakeLists: Simplify qstr sources when enabling extmod components.
Also remove redundant modusocket.c and modnetwork.c sources, they are already added by extmod/extmod.cmake. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/rp2/CMakeLists.txt28
1 files changed, 8 insertions, 20 deletions
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index 31284c840..7749d95ca 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -104,6 +104,7 @@ set(MICROPY_SOURCE_PORT
modrp2.c
modutime.c
mphalport.c
+ mpnetworkport.c
mpthreadport.c
rp2_flash.c
rp2_pio.c
@@ -115,8 +116,6 @@ set(MICROPY_SOURCE_PORT
set(MICROPY_SOURCE_QSTR
${MICROPY_SOURCE_PY}
- ${MICROPY_SOURCE_EXTMOD}
- ${MICROPY_SOURCE_USERMOD}
${MICROPY_DIR}/shared/runtime/mpirq.c
${MICROPY_DIR}/shared/runtime/sys_stdio_mphal.c
${PROJECT_SOURCE_DIR}/machine_adc.c
@@ -180,12 +179,7 @@ if (MICROPY_PY_LWIP)
MICROPY_PY_LWIP=1
)
- list(APPEND MICROPY_SOURCE_PORT
- ${MICROPY_EXTMOD_DIR}/modlwip.c
- mpnetworkport.c
- )
-
- list(APPEND MICROPY_SOURCE_QSTR
+ list(APPEND MICROPY_SOURCE_EXTMOD
${MICROPY_EXTMOD_DIR}/modlwip.c
)
@@ -238,10 +232,6 @@ if (MICROPY_PY_NETWORK_NINAW10)
list(APPEND MICROPY_SOURCE_EXTMOD
${MICROPY_DIR}/extmod/network_ninaw10.c
)
-
- list(APPEND MICROPY_SOURCE_QSTR
- ${MICROPY_DIR}/extmod/network_ninaw10.c
- )
endif()
if (MICROPY_PY_WIZNET5K)
@@ -277,20 +267,18 @@ if (MICROPY_PY_WIZNET5K)
)
list(APPEND MICROPY_SOURCE_EXTMOD
- ${MICROPY_DIR}/extmod/modnetwork.c
- ${MICROPY_DIR}/extmod/modusocket.c
- ${MICROPY_DIR}/extmod/network_wiznet5k.c
- )
-
- list(APPEND MICROPY_SOURCE_QSTR
- ${MICROPY_DIR}/extmod/modnetwork.c
- ${MICROPY_DIR}/extmod/modusocket.c
${MICROPY_DIR}/extmod/network_wiznet5k.c
)
string(CONCAT GIT_SUBMODULES "${GIT_SUBMODULES} " lib/wiznet5k)
endif()
+# Add qstr sources for extmod and usermod, in case they are modified by components above.
+list(APPEND MICROPY_SOURCE_QSTR
+ ${MICROPY_SOURCE_EXTMOD}
+ ${MICROPY_SOURCE_USERMOD}
+)
+
# Define mpy-cross flags
set(MICROPY_CROSS_FLAGS -march=armv7m)