forked from raspberrypi/debugprobe
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
39 lines (28 loc) · 1019 Bytes
/
CMakeLists.txt
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
39
cmake_minimum_required(VERSION 3.12)
include(pico_sdk_import.cmake)
project(picoprobe)
pico_sdk_init()
add_executable(picoprobe
src/led.c
src/main.c
src/usb_descriptors.c
src/probe.c
src/cdc_uart.c
src/cdc_sump.c
src/get_serial.c
)
if (DEFINED ENV{PICOPROBE_LED})
message("PICOPROBE_LED is defined as " $ENV{PICOPROBE_LED})
target_compile_definitions(picoprobe PRIVATE PICOPROBE_LED=$ENV{PICOPROBE_LED})
endif()
if (DEFINED ENV{TURBO_200MHZ})
message("TURBO_200MHZ is defined as " $ENV{TURBO_200MHZ})
target_compile_definitions(picoprobe PRIVATE TURBO_200MHZ=$ENV{TURBO_200MHZ})
endif()
set(DBG_PIN_COUNT=4)
pico_generate_pio_header(picoprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe.pio)
target_include_directories(picoprobe PRIVATE src)
target_link_libraries(picoprobe PRIVATE pico_stdlib pico_unique_id
tinyusb_device tinyusb_board
hardware_pio hardware_dma hardware_pwm)
pico_add_extra_outputs(picoprobe)