forked from aappleby/picorvd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (43 loc) · 1.26 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
cmake_minimum_required(VERSION 3.13)
set(PICO_SDK_FETCH_FROM_GIT on)
include(pico_sdk_import.cmake)
project(PicoRVD C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
option(INCLUDE_BLINKY_BINARY "Include Blinky binary in PicoRVD" ON)
pico_sdk_init()
add_executable(
picorvd
src/main.cpp
src/PicoSWIO.cpp
src/RVDebug.cpp
src/WCHFlash.cpp
src/SoftBreak.cpp
src/Packet.cpp
src/Console.cpp
src/GDBServer.cpp
src/utils.cpp
src/usb_config.cpp
test/picorvd_tests.cpp
bin/singlewire.pio.h
)
pico_generate_pio_header(picorvd ${CMAKE_CURRENT_SOURCE_DIR}/src/singlewire.pio)
#target_compile_definitions(picorvd PRIVATE PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS=100) # wait for USB connect
target_compile_definitions(picorvd PRIVATE PARAM_ASSERTIONS_ENABLE_ALL=1)
if(INCLUDE_BLINKY_BINARY)
add_definitions(-DINCLUDE_BLINKY_BINARY)
endif(INCLUDE_BLINKY_BINARY)
target_include_directories(picorvd PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
# This directory is required so that TinyUSB can find src/tusb_config.h
${CMAKE_CURRENT_SOURCE_DIR}/src
)
pico_enable_stdio_usb(picorvd 0)
pico_enable_stdio_uart(picorvd 1)
pico_add_extra_outputs(picorvd)
target_link_libraries(picorvd
pico_stdlib
pico_bootsel_via_double_reset
hardware_pio
tinyusb_device
)