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)
195
195
VERBATIM
196
196
)
197
197
198
- if (TARGET mbed-post-build-bin )
198
+ if (TARGET mbed-post-build-bin-${MBED_TARGET} )
199
199
add_custom_target (mbed-post-build
200
200
ALL
201
201
DEPENDS
202
- mbed-post-build-bin
202
+ mbed-post-build-bin-${MBED_TARGET}
203
203
)
204
204
endif ()
205
205
endfunction ()
Original file line number Diff line number Diff line change @@ -59,4 +59,4 @@ target_compile_definitions(mbed-cysbsyskit-01
59
59
"CY8C624AFNI_S2D43F"
60
60
)
61
61
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)
6
6
#
7
7
# Merge Cortex-M4 HEX and a Cortex-M0 HEX.
8
8
#
9
- function (mbed_post_build_psoc6_merge_hex )
9
+ function (mbed_post_build_psoc6_merge_hex mbed_target_name )
10
10
find_package (Python3 )
11
11
12
+ # Copy ${ARGN} to a variable first as it cannot be used directly with
13
+ # the list() command
12
14
set (extra_macro_args ${ARGN} )
13
15
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 )
15
18
16
19
if (${num_extra_args} GREATER 0 )
20
+ # Get extra argument as `cortex_m0_hex`
17
21
list (GET extra_macro_args 0 cortex_m0_hex )
18
22
set (post_build_command
19
23
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
16
16
)
17
17
18
18
target_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
12
12
13
13
target_link_libraries (mbed-arch-pro INTERFACE mbed-lpc176x )
14
14
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)
16
16
17
17
target_link_libraries (mbed-lpc1768 INTERFACE mbed-mbed-lpc1768 )
18
18
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
33
33
34
34
mbed_set_linker_script (mbed-lpc54114-m4 ${CMAKE_CURRENT_SOURCE_DIR} /${LINKER_FILE} )
35
35
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
94
94
mbed-lpc546xx-xpresso
95
95
)
96
96
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)
6
6
#
7
7
# Patch an LPC target vector table in the binary file.
8
8
#
9
- function (mbed_post_build_lpc_patch_vtable )
9
+ function (mbed_post_build_lpc_patch_vtable mbed_target_name )
10
10
find_package (Python3 )
11
11
12
12
set (post_build_command
Original file line number Diff line number Diff line change 5
5
# Sets the post build operation for Mbed targets.
6
6
#
7
7
macro (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
10
11
)
11
12
12
13
# 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} )
14
15
15
16
add_custom_command (
16
17
OUTPUT
17
- ${CMAKE_BINARY_DIR } /${APP_TARGET}.bin
18
+ ${CMAKE_CURRENT_BINARY_DIR } /${APP_TARGET}.bin
18
19
POST_BUILD
19
20
COMMAND
20
21
${post_build_command}
You can’t perform that action at this time.
0 commit comments