forked from raspberrypi/debugprobe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (56 loc) · 1.73 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 3.12)
include(pico_sdk_import.cmake)
set(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/freertos)
include(FreeRTOS_Kernel_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/get_serial.c
src/sw_dp_pio.c
src/tusb_edpt_handler.c
)
target_sources(picoprobe PRIVATE
CMSIS_5/CMSIS/DAP/Firmware/Source/DAP.c
CMSIS_5/CMSIS/DAP/Firmware/Source/JTAG_DP.c
CMSIS_5/CMSIS/DAP/Firmware/Source/DAP_vendor.c
CMSIS_5/CMSIS/DAP/Firmware/Source/SWO.c
#CMSIS_5/CMSIS/DAP/Firmware/Source/SW_DP.c
)
target_include_directories(picoprobe PRIVATE
CMSIS_5/CMSIS/DAP/Firmware/Include/
CMSIS_5/CMSIS/Core/Include/
include/
)
target_compile_options(picoprobe PRIVATE -Wall)
pico_generate_pio_header(picoprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe.pio)
pico_generate_pio_header(picoprobe ${CMAKE_CURRENT_LIST_DIR}/src/probe_oen.pio)
target_include_directories(picoprobe PRIVATE src)
target_compile_definitions (picoprobe PRIVATE
PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1
)
option (DEBUGPROBE "compile for the debugprobe" OFF)
if (DEBUGPROBE)
target_compile_definitions (picoprobe PRIVATE
DEBUGPROBE=1
)
set_target_properties(picoprobe PROPERTIES
OUTPUT_NAME "debugprobe"
)
endif ()
target_link_libraries(picoprobe PRIVATE
pico_multicore
pico_stdlib
pico_unique_id
tinyusb_device
tinyusb_board
hardware_pio
FreeRTOS-Kernel
FreeRTOS-Kernel-Heap1
)
pico_set_binary_type(picoprobe copy_to_ram)
pico_add_extra_outputs(picoprobe)