generated from LailaTheElf/rp2040_c
30 lines
687 B
CMake
30 lines
687 B
CMake
cmake_minimum_required(VERSION 3.13)
|
|
|
|
set(PICO_EXTRAS_PATH ${CMAKE_CURRENT_LIST_DIR}/libs/pico-extra)
|
|
|
|
# initialize the SDK based on PICO_SDK_PATH
|
|
# note: this must happen before project()
|
|
include(libs/pico-sdk/pico_sdk_init.cmake)
|
|
include(pico_extras_import.cmake)
|
|
|
|
project(stofzuiger CXX C ASM)
|
|
|
|
set(PICO_CXX_ENABLE_EXCEPTIONS 1)
|
|
set(PICO_CXX_ENABLE_RTTI 1)
|
|
|
|
# initialize the Raspberry Pi Pico SDK
|
|
pico_sdk_init()
|
|
|
|
add_executable(stofzuiger src/main.c)
|
|
|
|
target_link_libraries(stofzuiger
|
|
pico_stdlib
|
|
hardware_sleep
|
|
)
|
|
|
|
pico_enable_stdio_uart(stofzuiger 0)
|
|
pico_enable_stdio_usb(stofzuiger 1)
|
|
|
|
# create map/bin/hex/uf2 file in addition to ELF.
|
|
pico_add_extra_outputs(stofzuiger)
|