27 lines
830 B
CMake
27 lines
830 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|||
|
|
|
||
|
|
find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE})
|
||
|
|
|
||
|
|
# The SDK adds -save-temps/-fstack-usage to every object. They only produce
|
||
|
|
# extra files and make Windows builds (antivirus scanning) many times slower.
|
||
|
|
get_target_property(_sdk_opts sdk_intf_lib INTERFACE_COMPILE_OPTIONS)
|
||
|
|
list(REMOVE_ITEM _sdk_opts "-save-temps=obj" "-fstack-usage")
|
||
|
|
set_target_properties(sdk_intf_lib PROPERTIES INTERFACE_COMPILE_OPTIONS "${_sdk_opts}")
|
||
|
|
|
||
|
|
# src/ holds board_overlay.h, which replaces the SDK bl616dk board.c/board.h
|
||
|
|
sdk_add_include_directories(src)
|
||
|
|
sdk_add_compile_definitions(-DCONFIG_USB_HS)
|
||
|
|
|
||
|
|
target_sources(app PRIVATE
|
||
|
|
src/board_tang25k.c
|
||
|
|
src/usb_desc.c
|
||
|
|
src/djtag.c
|
||
|
|
src/jtag_io.c
|
||
|
|
src/uart_bridge.c
|
||
|
|
src/sys.c
|
||
|
|
)
|
||
|
|
|
||
|
|
sdk_set_main_file(src/main.c)
|
||
|
|
|
||
|
|
project(tang25k_debugger)
|