Skip to content

Commit

Permalink
lib/cyw43-driver: Pass STATIC macro value for external library build.
Browse files Browse the repository at this point in the history
As noted in comments, this can be removed once the library is updated
to not use STATIC macro.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
  • Loading branch information
projectgus committed Mar 4, 2024
1 parent 2465c82 commit a61bc35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions extmod/extmod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ ifeq ($(MICROPY_PY_NETWORK_CYW43),1)
CYW43_DIR = lib/cyw43-driver
GIT_SUBMODULES += $(CYW43_DIR)
CFLAGS_EXTMOD += -DMICROPY_PY_NETWORK_CYW43=1
CFLAGS_THIRDPARTY += -DSTATIC=static # Remove once lib/cyw43-driver no longer uses STATIC macro
SRC_THIRDPARTY_C += $(addprefix $(CYW43_DIR)/src/,\
cyw43_ctrl.c \
cyw43_lwip.c \
Expand Down
6 changes: 6 additions & 0 deletions ports/rp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ if (MICROPY_PY_NETWORK_CYW43)
${MICROPY_DIR}/lib/cyw43-driver/
)

# Can be removed once lib/cyw43-driver submodule no longer uses STATIC
set_source_files_properties(
${PICO_CYW43_DRIVER_PATH}/src/cyw43_lwip.c
PROPERTIES
COMPILE_OPTIONS
-DSTATIC=static)
endif()

if (MICROPY_PY_NETWORK_NINAW10)
Expand Down

0 comments on commit a61bc35

Please sign in to comment.