File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
targets/TARGET_NXP/scripts Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 24
24
the first 8 locations in sector 0 of the flash. If the result is 0, then execution control is
25
25
transferred to the user code.
26
26
"""
27
- import pathlib
28
27
import os
29
28
import sys
30
29
from struct import unpack , pack
@@ -53,13 +52,10 @@ def is_patched(bin_path):
53
52
54
53
55
54
if __name__ == "__main__" :
56
- artefacts_location = sys .argv [1 ]
57
-
58
- try :
59
- binary = list (pathlib .Path (artefacts_location ).glob ("*.bin" ))[0 ]
60
- except IndexError :
55
+ binary = sys .argv [1 ]
56
+ if not os .path .isfile (binary ):
61
57
raise ArtefactsError (
62
- f"Could not find binary file in { artefacts_location } "
58
+ f"Could not find binary file { binary } "
63
59
)
64
60
65
61
print ("LPC Patch: %s" % os .path .split (binary )[1 ])
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function(mbed_post_build_lpc_patch_vtable mbed_target_name)
11
11
12
12
set (post_build_command
13
13
COMMAND ${Python3_EXECUTABLE} ${MBED_PATH} /targets/TARGET_NXP/scripts/LPC.py
14
- ${CMAKE_BINARY_DIR}
14
+ ${CMAKE_BINARY_DIR} /$<TARGET_PROPERTY:mbed-post-build-bin-${mbed_target_name},application>.bin
15
15
)
16
16
17
17
mbed_set_post_build_operation ()
You can’t perform that action at this time.
0 commit comments