Skip to content

Commit

Permalink
rp2/CMakeLists: Simplify qstr sources when enabling extmod components.
Browse files Browse the repository at this point in the history
Also remove redundant modusocket.c and modnetwork.c sources, they are
already added by extmod/extmod.cmake.

Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Jun 7, 2022
1 parent a446a7b commit 66dfe17
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions ports/rp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ set(MICROPY_SOURCE_PORT
modrp2.c
modutime.c
mphalport.c
mpnetworkport.c
mpthreadport.c
rp2_flash.c
rp2_pio.c
Expand All @@ -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
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 66dfe17

Please sign in to comment.