Skip to content

Commit 1ae2f0e

Browse files
Don't include the picobin end block when sealing (#2492)
* Don't include the picobin end block when signing, as picotool will add a new end block anyway * small whitespace fix --------- Co-authored-by: Graham Sanderson <[email protected]>
1 parent 6841d4d commit 1ae2f0e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tools/CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -664,21 +664,21 @@ function(picotool_postprocess_binary TARGET)
664664
VERBATIM)
665665
endif()
666666
# Signing/hashing/load maps for packaging
667-
if (
668-
picotool_sign_output OR
667+
if (picotool_sign_output OR
669668
picotool_hash_output OR
670669
uf2_package_addr OR
671-
extra_process_args
672-
)
673-
add_custom_command(TARGET ${TARGET} POST_BUILD
674-
COMMAND picotool
675-
ARGS seal
676-
--quiet
677-
$<TARGET_FILE:${TARGET}> $<TARGET_FILE:${TARGET}>
678-
${picotool_sigfile} ${otp_file}
679-
${picotool_args}
680-
COMMAND_EXPAND_LISTS
681-
VERBATIM)
670+
extra_process_args)
671+
# We don't need the extra end block, as picotool seal will add one
672+
target_compile_definitions(${TARGET} PRIVATE PICO_CRT0_INCLUDE_PICOBIN_END_BLOCK=0)
673+
add_custom_command(TARGET ${TARGET} POST_BUILD
674+
COMMAND picotool
675+
ARGS seal
676+
--quiet
677+
$<TARGET_FILE:${TARGET}> $<TARGET_FILE:${TARGET}>
678+
${picotool_sigfile} ${otp_file}
679+
${picotool_args}
680+
COMMAND_EXPAND_LISTS
681+
VERBATIM)
682682
endif()
683683
# Encryption
684684
if (picotool_aesfile AND picotool_ivfile)

0 commit comments

Comments
 (0)