add family_support_configure_common()

This commit is contained in:
hathach
2023-05-25 17:27:05 +07:00
parent 26d05d7fc9
commit 5fea010406
6 changed files with 42 additions and 71 deletions

View File

@@ -65,14 +65,8 @@ endif () # BOARD_TARGET
#------------------------------------
# Functions
#------------------------------------
function(family_configure_target TARGET)
# set output name to .elf
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME ${TARGET}.elf)
# run size after build
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${TOOLCHAIN_SIZE} $<TARGET_FILE:${TARGET}>
)
function(family_configure_example TARGET)
family_support_configure_common(${TARGET})
#---------- Port Specific ----------
# These files are built for each example since it depends on example's tusb_config.h
@@ -143,13 +137,13 @@ function(family_add_freertos TARGET)
endfunction()
function(family_configure_device_example TARGET)
family_configure_target(${TARGET})
family_configure_example(${TARGET})
endfunction()
function(family_configure_host_example TARGET)
family_configure_target(${TARGET})
family_configure_example(${TARGET})
endfunction()
function(family_configure_dual_usb_example TARGET)
family_configure_target(${TARGET})
family_configure_example(${TARGET})
endfunction()