cmake_minimum_required( VERSION 3.18 ) # include( /home/mf/electronics/projects/pico/pico-sdk/external/pico_sdk_import.cmake ) include( $ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake ) # include( $ENV{PICO_EXTRAS_PATH}/external/pico_extras_import.cmake ) # include( $ENV{PICO_ENC28J60_PATH}/external/pico_enc28j60_import.cmake ) project( picoping C CXX ASM ) set( CMAKE_C_STANDARD 11 ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror" ) pico_sdk_init() include_directories( . ) #add_custom_command( # OUTPUT "macropad-version.h" # COMMAND "${CMAKE_SOURCE_DIR}/macropad-version.py" # WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" #) add_custom_command( OUTPUT "ws2811pio.c" COMMAND "${PICO_SDK_PATH}/../pico-sdk-bin/pioasm" ws2811pio.pio ws2811pio.c WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ) add_executable( macropad macropad.c sh1106.c ws2811pio.c ) target_link_libraries( macropad pico_stdlib pico_multicore pico_mem_ops hardware_dma hardware_pio hardware_spi ) # enable usb output, disable uart output pico_enable_stdio_usb( macropad 1 ) pico_enable_stdio_uart( macropad 0 ) pico_add_extra_outputs( macropad )