Is it possible to compile in multiple network drivers, and switch at runtime? #9459
-
I'm wanting a particular board to be able to switch between wifi and ethernet. I've tried this on both a Pico W and ESP32 board, both connected to wiznet5k ethernet chips, but after flashing, when I import
Any pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Are you sure the the first two items of the bullet list are right? The make commands are identical. |
Beta Was this translation helpful? Give feedback.
-
To get this working, you should modify
Or equivalently add
to We should probably add a |
Beta Was this translation helpful? Give feedback.
make BOARD=PICO_W MICROPY_PY_NETWORK_WIZNET5K=W5100S
(and your second command to do the reverse configuration) doesn't do what you expect on the rp2 port because these variables are not understood by make. Rather you need to set them for CMake.To get this working, you should modify
ports/rp2/boards/PICO_W/mpconfigboard.cmake
to addOr equivalently add
to
ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake
.We should probably add a
CMAKE_ARGS_EXTRA
option toports/rp2/Makefile