2024-02-06 15:50:50 +01:00
|
|
|
# Generated Cmake Pico project file
|
|
|
|
|
2024-02-13 12:56:39 +01:00
|
|
|
cmake_minimum_required(VERSION 3.26)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
2024-02-13 12:53:25 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
|
|
|
# Initialise pico_sdk from installed location
|
|
|
|
# (note this can come from environment, CMake cache etc)
|
2024-02-13 09:11:28 +01:00
|
|
|
#set(PICO_SDK_PATH "/home/myuser/pico/pico-sdk")
|
2024-02-06 15:50:50 +01:00
|
|
|
|
|
|
|
set(PICO_BOARD pico CACHE STRING "Board type")
|
|
|
|
|
|
|
|
# Pull in Raspberry Pi Pico SDK (must be before project)
|
|
|
|
include(pico_sdk_import.cmake)
|
|
|
|
|
2024-02-06 20:51:02 +01:00
|
|
|
if (PICO_SDK_VERSION_STRING VERSION_LESS "1.5.0")
|
|
|
|
message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.5.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
|
2024-02-06 15:50:50 +01:00
|
|
|
endif()
|
|
|
|
|
2024-02-28 12:24:08 +01:00
|
|
|
project(raspikeyer VERSION "0.0.1" LANGUAGES C CXX ASM)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
|
|
|
# Initialise the Raspberry Pi Pico SDK
|
|
|
|
pico_sdk_init()
|
|
|
|
|
2024-02-13 09:11:28 +01:00
|
|
|
# Add executable. Default name is the project name
|
2024-02-28 12:24:08 +01:00
|
|
|
add_executable(raspikeyer)
|
2024-02-09 11:10:06 +01:00
|
|
|
|
|
|
|
add_subdirectory(src)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
2024-02-28 12:24:08 +01:00
|
|
|
pico_set_program_name(raspikeyer "raspikeyer")
|
|
|
|
pico_set_program_version(raspikeyer ${PROJECT_VERSION})
|
2024-02-06 15:50:50 +01:00
|
|
|
|
2024-02-28 12:24:08 +01:00
|
|
|
pico_enable_stdio_uart(raspikeyer 1)
|
|
|
|
pico_enable_stdio_usb(raspikeyer 0)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
2024-02-28 12:24:08 +01:00
|
|
|
target_compile_options(raspikeyer PRIVATE -Wall -Wextra -Werror)
|
2024-02-13 09:11:28 +01:00
|
|
|
|
2024-02-06 15:50:50 +01:00
|
|
|
# Add the standard library to the build
|
2024-02-28 12:24:08 +01:00
|
|
|
target_link_libraries(raspikeyer
|
2024-02-06 20:51:02 +01:00
|
|
|
pico_stdlib)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
|
|
|
# Add the standard include files to the build
|
2024-02-28 12:24:08 +01:00
|
|
|
target_include_directories(raspikeyer PRIVATE
|
2024-02-06 15:50:50 +01:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required
|
|
|
|
)
|
|
|
|
|
|
|
|
# Add any user requested libraries
|
2024-02-28 12:24:08 +01:00
|
|
|
target_link_libraries(raspikeyer
|
2024-02-06 22:11:58 +01:00
|
|
|
hardware_flash
|
|
|
|
hardware_exception
|
2024-02-12 15:57:50 +01:00
|
|
|
hardware_pwm
|
2024-02-06 22:11:58 +01:00
|
|
|
pico_flash
|
2024-02-14 10:13:50 +01:00
|
|
|
pico_multicore
|
2024-02-21 10:45:46 +01:00
|
|
|
hardware_adc
|
2024-02-19 13:34:38 +01:00
|
|
|
tinyusb_device
|
2024-02-19 14:23:33 +01:00
|
|
|
tinyusb_board
|
2024-02-06 22:11:58 +01:00
|
|
|
)
|
2024-02-06 15:50:50 +01:00
|
|
|
|
2024-02-28 12:24:08 +01:00
|
|
|
pico_add_extra_outputs(raspikeyer)
|
2024-02-06 15:50:50 +01:00
|
|
|
|