cmake_minimum_required(VERSION 3.22) set(PICO_BOARD pico_w CACHE STRING "Board type") set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -Wl,--gc-sections") include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake) set(PROJECT_NAME picow_budik) project(${PROJECT_NAME} C CXX ASM) pico_sdk_init() add_executable(${PROJECT_NAME} main.c sh1106_spi.c utf8.c font_spleen_8x16.c font_spleen_12x24.c font_spleen_16x32.c font_tahoma_10.c font_tahoma_12.c font_10x20.c ds3231.c ) # nastaveni vyhrazeneho mista ve XIP flash pro konfiguracni data pico_set_linker_script(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/memmap_custom.ld) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}) # Add the standard library to the build target_link_libraries(${PROJECT_NAME} pico_stdlib pico_cyw43_arch_lwip_threadsafe_background hardware_gpio hardware_spi hardware_pwm hardware_rtc hardware_flash hardware_i2c hardware_sync ) target_link_options(${PROJECT_NAME} PRIVATE -Xlinker --print-memory-usage) pico_enable_stdio_uart(${PROJECT_NAME} 0) pico_enable_stdio_usb(${PROJECT_NAME} 1) pico_add_extra_outputs(${PROJECT_NAME})