@@ -54,11 +54,10 @@ if (NOT TARGET ${BOARD_TARGET})
5454 target_sources (${BOARD_TARGET} PUBLIC
5555 ${SDK_DIR} /devices/${MCU_VARIANT} /gcc/startup_${MCU_CORE} .S
5656 )
57+ cmake_print_variables(CMAKE_CURRENT_BINARY_DIR )
5758 target_link_options (${BOARD_TARGET} PUBLIC
5859 # linker file
5960 "LINKER:--script=${SDK_DIR} /devices/${MCU_VARIANT} /gcc/${MCU_CORE} _flash.ld"
60- # link map
61- "LINKER:-Map=$<IF:$<BOOL:$<TARGET_PROPERTY:OUTPUT_NAME>>,$<TARGET_PROPERTY:OUTPUT_NAME>,$<TARGET_PROPERTY:NAME>>${CMAKE_EXECUTABLE_SUFFIX} .map"
6261 # nanolib
6362 --specs=nosys.specs
6463 --specs=nano.specs
@@ -71,17 +70,8 @@ endif () # BOARD_TARGET
7170#------------------------------------
7271# Functions
7372#------------------------------------
74- function (family_configure_target TARGET )
75- # set output name to .elf
76- set_target_properties (${TARGET} PROPERTIES OUTPUT_NAME ${TARGET} .elf)
77-
78- # run size after build
79- add_custom_command (TARGET ${TARGET} POST_BUILD
80- COMMAND ${TOOLCHAIN_SIZE} $<TARGET_FILE:${TARGET} >
81- )
82-
83- # TOP is path to root directory
84- set (TOP "${CMAKE_CURRENT_FUNCTION_LIST_DIR} /../../.." )
73+ function (family_configure_example TARGET )
74+ family_support_configure_common(${TARGET} )
8575
8676 #---------- Port Specific ----------
8777 # These files are built for each example since it depends on example's tusb_config.h
@@ -167,13 +157,13 @@ function(family_add_freertos TARGET)
167157endfunction ()
168158
169159function (family_configure_device_example TARGET )
170- family_configure_target (${TARGET} )
160+ family_configure_example (${TARGET} )
171161endfunction ()
172162
173163function (family_configure_host_example TARGET )
174- family_configure_target (${TARGET} )
164+ family_configure_example (${TARGET} )
175165endfunction ()
176166
177167function (family_configure_dual_usb_example TARGET )
178- family_configure_target (${TARGET} )
168+ family_configure_example (${TARGET} )
179169endfunction ()
0 commit comments