-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (26 loc) · 748 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (26 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.13)
# Include the Pico SDK
include($ENV{PICO_SDK_PATH}/../external/pico_sdk_import.cmake)
project(stepper C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Initialize the Pico SDK
pico_sdk_init()
# Add executable
add_executable(stepper_example
stepper_example.c
stepgen.cpp
)
# Generate PIO header
pico_generate_pio_header(stepper_example ${CMAKE_CURRENT_LIST_DIR}/stepper.pio)
# Link libraries
target_link_libraries(stepper_example
pico_stdlib
hardware_pio
hardware_clocks
)
# Enable USB output, disable UART output
pico_enable_stdio_usb(stepper_example 0)
pico_enable_stdio_uart(stepper_example 1)
# Create map/bin/hex/uf2 files
pico_add_extra_outputs(stepper_example)