forked from No0ne/ps2pico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (29 loc) · 1.25 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
cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(PICO_BOARD pico CACHE STRING "Board type")
# Pull in Raspberry Pi Pico SDK
include(pico_sdk_import.cmake)
if (PICO_SDK_VERSION_STRING VERSION_LESS "1.5.1")
message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.5.1 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
endif()
project(ps2pico C CXX ASM)
# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()
## add_compile_definitions(ATORXT=1)
## add_executable(ps2pico src/ps2pico.c src/atphy.c)
add_compile_definitions(ATORXT=0)
add_executable(ps2pico src/ps2pico.c src/xtphy.c)
add_compile_definitions(CLOCKIN=14)
add_compile_definitions(CLOCKOUT=15)
add_compile_definitions(DATAOUT=16)
add_compile_definitions(DATAIN=17)
pico_generate_pio_header(ps2pico ${CMAKE_CURRENT_LIST_DIR}/src/atphy.pio)
pico_generate_pio_header(ps2pico ${CMAKE_CURRENT_LIST_DIR}/src/xtphy.pio)
pico_set_program_name(ps2pico "ps2pico")
pico_set_program_version(ps2pico "2.0")
pico_enable_stdio_uart(ps2pico 1)
pico_enable_stdio_usb(ps2pico 0)
target_include_directories(ps2pico PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)
target_link_libraries(ps2pico pico_stdlib hardware_pio tinyusb_host tinyusb_board)
pico_add_extra_outputs(ps2pico)