File tree Expand file tree Collapse file tree 10 files changed +20
-16
lines changed
TARGET_PSOC6/TARGET_CYSBSYSKIT_01
TARGET_LPC11XX_11CXX/TARGET_LPC11XX
TARGET_LPC54114/device/TARGET_LPC54114_M4 Expand file tree Collapse file tree 10 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -195,11 +195,11 @@ function(mbed_generate_bin_hex target)
195195 VERBATIM
196196 )
197197
198- if (TARGET mbed-post-build -bin)
198+ if (TARGET mbed-post-build -bin- ${MBED_TARGET} )
199199 add_custom_target (mbed-post-build
200200 ALL
201201 DEPENDS
202- mbed-post-build -bin
202+ mbed-post-build -bin- ${MBED_TARGET}
203203 )
204204 endif ()
205205endfunction ()
Original file line number Diff line number Diff line change @@ -59,4 +59,4 @@ target_compile_definitions(mbed-cysbsyskit-01
5959 "CY8C624AFNI_S2D43F"
6060)
6161
62- mbed_post_build_psoc6_merge_hex()
62+ mbed_post_build_psoc6_merge_hex("CYSBSYSKIT_01" )
Original file line number Diff line number Diff line change @@ -6,14 +6,18 @@ include(${MBED_PATH}/tools/cmake/mbed_set_post_build.cmake)
66#
77# Merge Cortex-M4 HEX and a Cortex-M0 HEX.
88#
9- function (mbed_post_build_psoc6_merge_hex)
9+ function (mbed_post_build_psoc6_merge_hex mbed_target_name )
1010 find_package (Python3)
1111
12+ # Copy ${ARGN} to a variable first as it cannot be used directly with
13+ # the list() command
1214 set (extra_macro_args ${ARGN} )
1315
14- list (LENGTH cortex_m0_hex num_extra_args)
16+ # Get the number of arguments past the last expected argument
17+ list (LENGTH extra_macro_args num_extra_args)
1518
1619 if (${num_extra_args} GREATER 0)
20+ # Get extra argument as `cortex_m0_hex`
1721 list (GET extra_macro_args 0 cortex_m0_hex)
1822 set (post_build_command
1923 COMMAND ${Python3_EXECUTABLE} ${MBED_PATH} /targets/TARGET_Cypress/scripts/PSOC6.py
Original file line number Diff line number Diff line change @@ -16,5 +16,3 @@ target_sources(mbed-lpc11xx
1616)
1717
1818target_link_libraries (mbed-lpc11xx INTERFACE mbed-lpc11xx-11cxx)
19-
20- mbed_post_build_lpc_patch_vtable()
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ target_include_directories(mbed-arch-pro
1212
1313target_link_libraries (mbed-arch-pro INTERFACE mbed-lpc176x)
1414
15- mbed_post_build_lpc_patch_vtable()
15+ mbed_post_build_lpc_patch_vtable("ARCH_PRO" )
Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ add_library(mbed-lpc1768 INTERFACE)
1616
1717target_link_libraries (mbed-lpc1768 INTERFACE mbed-mbed-lpc1768)
1818
19- mbed_post_build_lpc_patch_vtable()
19+ mbed_post_build_lpc_patch_vtable("LPC1768" )
Original file line number Diff line number Diff line change @@ -33,4 +33,4 @@ target_sources(mbed-lpc54114-m4
3333
3434mbed_set_linker_script(mbed-lpc54114-m4 ${CMAKE_CURRENT_SOURCE_DIR} /${LINKER_FILE} )
3535
36- mbed_post_build_lpc_patch_vtable()
36+ mbed_post_build_lpc_patch_vtable("LPC54114" )
Original file line number Diff line number Diff line change @@ -94,4 +94,5 @@ target_link_libraries(mbed-lpc546xx
9494 mbed-lpc546xx-xpresso
9595)
9696
97- mbed_post_build_lpc_patch_vtable()
97+ mbed_post_build_lpc_patch_vtable("LPC546XX" )
98+ mbed_post_build_lpc_patch_vtable("FF_LPC546XX" )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ include(${MBED_PATH}/tools/cmake/mbed_set_post_build.cmake)
66#
77# Patch an LPC target vector table in the binary file.
88#
9- function (mbed_post_build_lpc_patch_vtable)
9+ function (mbed_post_build_lpc_patch_vtable mbed_target_name )
1010 find_package (Python3)
1111
1212 set (post_build_command
Original file line number Diff line number Diff line change 55# Sets the post build operation for Mbed targets.
66#
77macro (mbed_set_post_build_operation)
8- add_custom_target (mbed-post-build -bin
9- DEPENDS ${CMAKE_BINARY_DIR} /${APP_TARGET} .bin
8+
9+ add_custom_target (mbed-post-build -bin-${mbed_target_name}
10+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /${APP_TARGET} .bin
1011 )
1112
1213 # Ensures the application artefacts are created before manipulating them.
13- add_dependencies (mbed-post-build -bin ${APP_TARGET} )
14+ add_dependencies (mbed-post-build -bin- ${mbed_target_name} ${APP_TARGET} )
1415
1516 add_custom_command (
1617 OUTPUT
17- ${CMAKE_BINARY_DIR } /${APP_TARGET} .bin
18+ ${CMAKE_CURRENT_BINARY_DIR } /${APP_TARGET} .bin
1819 POST_BUILD
1920 COMMAND
2021 ${post_build_command}
You can’t perform that action at this time.
0 commit comments