summaryrefslogtreecommitdiff
path: root/hw/bsp/nrf
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-05-25 17:27:05 +0700
committerhathach <[email protected]>2023-05-25 17:27:05 +0700
commit5fea010406747a94f3a65a89e65e7956ff811b3c (patch)
treee35e339aced41fce07fa425d865951215d611a3b /hw/bsp/nrf
parent26d05d7fc922f3715799f6049556232d5ed5c8e3 (diff)
add family_support_configure_common()
Diffstat (limited to 'hw/bsp/nrf')
-rw-r--r--hw/bsp/nrf/family.cmake23
1 files changed, 5 insertions, 18 deletions
diff --git a/hw/bsp/nrf/family.cmake b/hw/bsp/nrf/family.cmake
index 1156a171b..9d958fee2 100644
--- a/hw/bsp/nrf/family.cmake
+++ b/hw/bsp/nrf/family.cmake
@@ -65,8 +65,6 @@ if (NOT TARGET ${BOARD_TARGET})
# linker file
"LINKER:--script=${LD_FILE_gcc}"
-L${NRFX_DIR}/mdk
- # link map
- "LINKER:-Map=$<IF:$<BOOL:$<TARGET_PROPERTY:OUTPUT_NAME>>,$<TARGET_PROPERTY:OUTPUT_NAME>,$<TARGET_PROPERTY:NAME>>${CMAKE_EXECUTABLE_SUFFIX}.map"
# nanolib
--specs=nosys.specs
--specs=nano.specs
@@ -79,19 +77,8 @@ endif () # BOARD_TARGET
#------------------------------------
# Functions
#------------------------------------
-function(family_configure_target TARGET)
- #family_add_default_example_warnings(${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}>
- )
-
- # TOP is path to root directory
- set(TOP "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../..")
+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
@@ -161,13 +148,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()