mirror of https://github.com/ARMmbed/mbed-os.git
Force regenerate application binaries on rebuild
If a target has a post binary hook, we should force regenerate the application binaries every time so that the hook is run on a raw binary rather than a previous build that already went through the post-build process once.pull/14378/head
parent
76b2902f48
commit
3579bb65da
|
@ -171,6 +171,12 @@ function(mbed_generate_bin_hex target)
|
|||
)
|
||||
|
||||
if(TARGET mbed-post-build-bin-${MBED_TARGET})
|
||||
# Remove the .elf file to force regenerate the application binaries
|
||||
# (including .bin and .hex). This ensures that the post-build script runs
|
||||
# on a raw application instead of a previous build that already went
|
||||
# through the post-build process once.
|
||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${target}.elf)
|
||||
|
||||
# The artefacts must be created before they can be further manipulated
|
||||
add_dependencies(mbed-post-build-bin-${MBED_TARGET} ${target})
|
||||
|
||||
|
|
Loading…
Reference in New Issue