Bring up a minimal cyw43 Soft-AP (powersave disabled) plus USB serial blink example, with Makefile flash/monitor helpers and build ignore. Co-authored-by: Cursor <cursoragent@cursor.com>
51 lines
1.1 KiB
CMake
51 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.13)
|
|
|
|
set(PICO_BOARD pico2_w CACHE STRING "Board type")
|
|
|
|
include(pico_sdk_import.cmake)
|
|
|
|
project(led_hoop C CXX ASM)
|
|
|
|
pico_sdk_init()
|
|
|
|
file(GLOB_RECURSE SRC_SOURCES CONFIGURE_DEPENDS
|
|
"${CMAKE_CURRENT_LIST_DIR}/src/*.c"
|
|
"${CMAKE_CURRENT_LIST_DIR}/src/*.cpp"
|
|
)
|
|
file(GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS
|
|
"${CMAKE_CURRENT_LIST_DIR}/lib/*.c"
|
|
"${CMAKE_CURRENT_LIST_DIR}/lib/*.cpp"
|
|
)
|
|
|
|
add_executable(led_hoop
|
|
${SRC_SOURCES}
|
|
${LIB_SOURCES}
|
|
)
|
|
|
|
target_include_directories(led_hoop PRIVATE
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
${CMAKE_CURRENT_LIST_DIR}/src
|
|
${CMAKE_CURRENT_LIST_DIR}/lib
|
|
)
|
|
|
|
target_link_libraries(led_hoop
|
|
pico_stdlib
|
|
pico_cyw43_arch_lwip_threadsafe_background
|
|
pico_bootsel_via_double_reset
|
|
)
|
|
|
|
# Ensure picotool can force the running app into BOOTSEL (no button)
|
|
target_compile_definitions(led_hoop PRIVATE
|
|
PICO_ENABLE_USB_RESET_VIA_VENDOR_INTERFACE=1
|
|
PICO_ENABLE_USB_RESET_VIA_BAUD_RATE=1
|
|
)
|
|
|
|
pico_configure_ip4_address(led_hoop PRIVATE
|
|
CYW43_DEFAULT_IP_AP_ADDRESS 192.168.4.1
|
|
)
|
|
|
|
pico_enable_stdio_usb(led_hoop 1)
|
|
pico_enable_stdio_uart(led_hoop 0)
|
|
|
|
pico_add_extra_outputs(led_hoop)
|