-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (29 loc) · 768 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
38 lines (29 loc) · 768 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
36
37
38
set(PICO_BOARD pico CACHE STRING "Board type")
set(CMAKE_C_STANDARD 11)
cmake_minimum_required(VERSION 3.12)
include(pico_sdk_import.cmake)
project(test)
pico_sdk_init()
# generate executable file
add_executable(test
main.c
)
# enable usb output, disable uart output
pico_enable_stdio_usb(test 1)
pico_enable_stdio_uart(test 0)
# create map/bin/hex/uf2 file etc.
pico_add_extra_outputs(test)
include(pico_sdk_import.cmake)
include(FetchContent)
# Add the standard library to the build
target_link_libraries(test PRIVATE
pico_stdlib
pico_aon_timer
hardware_timer
hardware_adc
hardware_spi
)
# Add the standard include files to the build
target_include_directories(test PRIVATE
${CMAKE_CURRENT_LIST_DIR}
)