blob: f1b1be20e7b9e9db38d2ff581bc0998d82a58310 (
plain)
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
|
# cmd/sbc_harness/CMakeLists.txt - Build script for main sbc_harness.uf2 firmware file
#
# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
if (PICO_PLATFORM STREQUAL "rp2040")
# Compile ######################################################################
add_library(sbc_harness_objs OBJECT
main.c
usb_keyboard.c
tusb_log.c
)
target_include_directories(sbc_harness_objs PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config)
target_include_directories(sbc_harness_objs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(sbc_harness_objs
pico_runtime
pico_stdio_uart
hardware_flash
libmisc
libusb
libdhcp
libhw
lib9p
)
pico_minimize_runtime(sbc_harness_objs
INCLUDE PRINTF PRINTF_MINIMAL PRINTF_LONG_LONG PRINTF_PTRDIFF_T
)
suppress_tinyusb_warnings()
# Analyze the stack ############################################################
add_stack_analysis(sbc_harness_stack.c sbc_harness_objs)
# Link #########################################################################
add_executable(sbc_harness)
target_sources(sbc_harness PRIVATE
sbc_harness_stack.c
"$<TARGET_OBJECTS:sbc_harness_objs>"
)
target_link_libraries(sbc_harness
pico_standard_link
)
pico_add_extra_outputs(sbc_harness) # create .map/.bin/.hex/.uf2 files in addition to .elf
pico_set_program_url(sbc_harness "https://git.lukeshu.com/sbc-harness")
endif()
|