# cmd/sbc_harness/CMakeLists.txt - Build script for main sbc_harness.uf2 firmware file # # Copyright (C) 2024 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later if (PICO_PLATFORM STREQUAL "rp2040") # Compile ###################################################################### add_library(sbc_harness_objs main.c usb_keyboard.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_stdlib hardware_flash libmisc libusb #libdhcp libhw ) pico_enable_stdio_usb(sbc_harness_objs 0) pico_enable_stdio_uart(sbc_harness_objs 1) pico_enable_stdio_semihosting(sbc_harness_objs 0) pico_enable_stdio_rtt(sbc_harness_objs 0) # Analyze the stack ############################################################ add_stack_analysis(sbc_harness_stack.c sbc_harness_objs) # Link ######################################################################### add_executable(sbc_harness) target_link_libraries(sbc_harness sbc_harness_objs) target_sources(sbc_harness PRIVATE sbc_harness_stack.c) 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()