cmake_minimum_required(VERSION 3.12) set(PICO_BOARD "pico_w" CACHE STRING "must be set to pico_w for wifi projects") # initialize the SDK based on PICO_SDK_PATH # note: this must happen before project() include( $ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake ) project( serial C CXX ASM ) set( CMAKE_C_STANDARD 11 ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror" ) pico_sdk_init() include_directories( . ) add_executable(serial serial.c ) option( CONFIG_FILE "configuration file" ) if(CONFIG_FILE) add_definitions( -DCONFIG_FILE=${CONFIG_FILE} ) endif(CONFIG_FILE) # Add pico_stdlib library which aggregates commonly used features target_link_libraries( serial pico_stdlib ) # enable usb output, disable uart output pico_enable_stdio_usb( serial 1 ) pico_enable_stdio_uart( serial 0 ) # create map/bin/hex/uf2 file in addition to ELF. pico_add_extra_outputs( serial )