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 2424the first 8 locations in sector 0 of the flash. If the result is 0, then execution control is
2525transferred to the user code.
2626"""
27- import pathlib
2827import os
2928import sys
3029from struct import unpack , pack
@@ -53,13 +52,10 @@ def is_patched(bin_path):
5352
5453
5554if __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 ):
6157 raise ArtefactsError (
62- f"Could not find binary file in { artefacts_location } "
58+ f"Could not find binary file { binary } "
6359 )
6460
6561 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)
1111
1212 set (post_build_command
1313 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
1515 )
1616
1717 mbed_set_post_build_operation()
You can’t perform that action at this time.
0 commit comments