forked from stacksmashing/tamarin-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (31 loc) · 1.36 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
cmake_minimum_required(VERSION 3.13)
# initialize the SDK based on PICO_SDK_PATH
# note: this must happen before project()
include(pico_sdk_import.cmake)
project(tamarin_firmware)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb")
pico_sdk_init()
add_executable(tamarin_firmware)
# target_compile_definitions(tamarin_firmware
# PUBLIC PICO_UART_ENABLE_CRLF_SUPPORT=0
# PUBLIC PICO_STDIO_ENABLE_CRLF_SUPPORT=0
# PUBLIC PICO_STDIO_DEFAULT_CRLF=0
# )
target_compile_options(tamarin_firmware INTERFACE -DPICO_ENTER_USB_BOOT_ON_EXIT=1)
pico_generate_pio_header(tamarin_firmware ${CMAKE_CURRENT_LIST_DIR}/lightning_tx.pio)
pico_generate_pio_header(tamarin_firmware ${CMAKE_CURRENT_LIST_DIR}/lightning_rx.pio)
pico_generate_pio_header(tamarin_firmware ${CMAKE_CURRENT_LIST_DIR}/probe.pio)
# Required so the build finds tusb_config.h
target_include_directories(tamarin_firmware PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_sources(tamarin_firmware PRIVATE
tamarin_probe.c
main.c
usb_descriptors.c
util.c
crc.c
)
target_link_libraries(tamarin_firmware PRIVATE pico_stdlib tinyusb_device tinyusb_board pico_stdio hardware_i2c pico_multicore pico_time pico_sync hardware_pio)
pico_add_extra_outputs(tamarin_firmware)
# enable usb output, disable uart output
#pico_enable_stdio_usb(tamarin_firmware 1)
#pico_enable_stdio_uart(tamarin_firmware 0)