Skip to content

Commit 8321943

Browse files
authored
Merge pull request #14235 from hugueskamba/hk_post_build_op
CMake: Add post build operation support
2 parents 9d6a60c + deeaa79 commit 8321943

File tree

15 files changed

+618
-0
lines changed

15 files changed

+618
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ function(mbed_generate_bin_hex target)
194194
"executable:"
195195
VERBATIM
196196
)
197+
198+
if(TARGET mbed-post-build-bin)
199+
add_custom_target(mbed-post-build
200+
ALL
201+
DEPENDS
202+
mbed-post-build-bin
203+
)
204+
endif()
197205
endfunction()
198206

199207
#

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
include(${MBED_PATH}/targets/TARGET_Cypress/scripts/mbed_set_post_build_cypress.cmake)
5+
46
if("BSP_DESIGN_MODUS" IN_LIST MBED_TARGET_LABELS)
57
target_include_directories(mbed-core
68
INTERFACE
@@ -58,3 +60,13 @@ target_sources(mbed-core
5860
${SYSTEM_SOURCE}
5961
${STARTUP_FILE}
6062
)
63+
64+
mbed_post_build_psoc6_sign_image(
65+
"psoc6_02_cm0p_secure.hex"
66+
"CY8CKIT064B0S2_4343W"
67+
"policy_single_CM0_CM4.json"
68+
"single_image"
69+
"1"
70+
"16"
71+
"${MBED_PATH}/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT064B0S2_4343W/device/COMPONENT_CM4/hex/psoc6_02_cm0p_secure.hex"
72+
)

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYSBSYSKIT_01/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
include(${MBED_PATH}/targets/TARGET_Cypress/scripts/mbed_set_post_build_cypress.cmake)
5+
46
if("BSP_DESIGN_MODUS" IN_LIST MBED_TARGET_LABELS)
57
target_include_directories(mbed-core
68
INTERFACE
@@ -47,3 +49,5 @@ target_sources(mbed-core
4749
${SYSTEM_SOURCE}
4850
${STARTUP_FILE}
4951
)
52+
53+
mbed_post_build_psoc6_merge_hex()

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYTFM_064B0S2_4343W/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
include(${MBED_PATH}/targets/TARGET_Cypress/scripts/mbed_set_post_build_cypress.cmake)
5+
46
if("BSP_DESIGN_MODUS" IN_LIST MBED_TARGET_LABELS)
57
target_include_directories(mbed-core
68
INTERFACE
@@ -62,3 +64,13 @@ target_sources(mbed-core
6264
${SYSTEM_SOURCE}
6365
${STARTUP_FILE}
6466
)
67+
68+
mbed_post_build_psoc6_sign_image(
69+
"tfm_s.hex"
70+
"CYTFM_064B0S2_4343W"
71+
"policy_multi_CM0_CM4_tfm.json"
72+
"multi_image"
73+
"1"
74+
"16"
75+
${MBED_PATH}/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYTFM_064B0S2_4343W/COMPONENT_TFM_S_FW/tfm_s.hex
76+
)

0 commit comments

Comments
 (0)