summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/CMakeLists.txt
blob: d6261cba8a4caccfead961953393e81f4f65f8b9 (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
# cmd/sbc_harness/CMakeLists.txt - Build script for main sbc_harness.uf2 firmware file
#
# Copyright (C) 2024  Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-Licence-Identifier: AGPL-3.0-or-later

if (PICO_PLATFORM STREQUAL "rp2040")

add_executable(sbc_harness
	main.c
	usb_keyboard.c
	hw/rp2040_hwspi.c
	hw/w5500.c
)
target_include_directories(sbc_harness PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config)
target_include_directories(sbc_harness PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(sbc_harness
	pico_stdlib
	hardware_flash
	hardware_gpio
	hardware_spi

	libmisc
	libusb
	#libdhcp
)

pico_enable_stdio_usb(sbc_harness 0)
pico_enable_stdio_uart(sbc_harness 1)
pico_enable_stdio_semihosting(sbc_harness 0)
pico_enable_stdio_rtt(sbc_harness 0)

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()