30 lines
879 B
CMake
30 lines
879 B
CMake
cmake_minimum_required(VERSION 3.13)
|
|
# initialize the SDK based on PICO_SDK_PATH
|
|
# note: this must happen before project()
|
|
include(pico_sdk_import.cmake)
|
|
set(PROJECT nmigen)
|
|
project(${PROJECT})
|
|
|
|
pico_sdk_init()
|
|
|
|
add_executable(${PROJECT})
|
|
|
|
pico_generate_pio_header(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}/trigctl.pio)
|
|
pico_generate_pio_header(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}/uart_rx.pio)
|
|
|
|
|
|
target_sources(${PROJECT} PRIVATE
|
|
main.c
|
|
)
|
|
|
|
target_link_libraries(${PROJECT} PRIVATE pico_stdlib hardware_pwm hardware_pio
|
|
hardware_dma pico_multicore cmsis_core
|
|
pico_fix_rp2040_usb_device_enumeration)
|
|
pico_add_extra_outputs(${PROJECT})
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror=implicit-function-declaration -Werror=return-type")
|
|
|
|
# enable usb output, disable uart output
|
|
pico_enable_stdio_usb(${PROJECT} 1)
|
|
pico_enable_stdio_uart(${PROJECT} 0)
|