raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.26k stars 838 forks source link

Pico Blink vs Pico Blink W #1607

Closed mischievous closed 5 months ago

mischievous commented 5 months ago

Am I really doing this correctly, the pico blink is 20K, and the pico w blink is 260K? Is there anything that I can reduce from the pico w image?

Here is the important parts of the CMakeLists.txt. Blink.c is either the standard blink.c or the wifi example for blink.c. Then I turn on/off the pico_cyw43_arch_none as needed.

pico_sdk_init()

# add_executable(${TARGET} blink.c )

target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR} )

target_link_libraries(${TARGET} pico_stdlib # for core functionality pico_cyw43_arch_none # we need Wifi to access the GPIO, but we don't need anything else )

pico_add_extra_outputs(${TARGET})

peterharperuk commented 5 months ago

It's the WiFi firmware

mischievous commented 5 months ago

So, the wifi firmware in pico_cyw43_arch_none (which should exclude) the wifi part is using an additional 240k to just blink a led. Ouch!

Might have to re-think what I am trying to do here... Maybe use a pico as the main part and a pico-w as the network I/F connected via a pseudo usb thing.

peterharperuk commented 5 months ago

There are lots of gpios available if you want to connect a led. The none in pico_cyw43_arch_none refers to their being no lwip IP stack

mischievous commented 5 months ago

Thanks for your help

lurch commented 5 months ago

See also https://github.com/raspberrypi/pico-examples/issues/421 and https://github.com/raspberrypi/pico-feedback/issues/364

aallan commented 5 months ago

Am I really doing this correctly, the pico blink is 20K, and the pico w blink is 260K?

The onboard LED on Pico W is connected to the 43439 WiFi chip rather than the RP2040. You're loading the WiFi firmware to talk to the 43439.