cmake: Add "gap-fill 0xFF" option for CMAKE_OBJCOPY command.
Add "gap-fill 0xFF" option for the CMAKE_OBJCOPY command,
in order to reduce the flash programming time for some boards,
such as cc2650.
Signed-off-by: Walter Xie <41377148@qq.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77819f4..7c69c6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1140,19 +1140,19 @@
list_append_ifdef(
CONFIG_BUILD_OUTPUT_HEX
post_build_commands
- COMMAND ${CMAKE_OBJCOPY} -S -Oihex -R .comment -R COMMON -R .eh_frame ${KERNEL_ELF_NAME} ${KERNEL_HEX_NAME}
+ COMMAND ${CMAKE_OBJCOPY} -S -Oihex --gap-fill 0xFF -R .comment -R COMMON -R .eh_frame ${KERNEL_ELF_NAME} ${KERNEL_HEX_NAME}
)
list_append_ifdef(
CONFIG_BUILD_OUTPUT_BIN
post_build_commands
- COMMAND ${CMAKE_OBJCOPY} -S -Obinary -R .comment -R COMMON -R .eh_frame ${KERNEL_ELF_NAME} ${KERNEL_BIN_NAME}
+ COMMAND ${CMAKE_OBJCOPY} -S -Obinary --gap-fill 0xFF -R .comment -R COMMON -R .eh_frame ${KERNEL_ELF_NAME} ${KERNEL_BIN_NAME}
)
list_append_ifdef(
CONFIG_BUILD_OUTPUT_S19
post_build_commands
- COMMAND ${CMAKE_OBJCOPY} --srec-len 1 --output-target=srec ${KERNEL_ELF_NAME} ${KERNEL_S19_NAME}
+ COMMAND ${CMAKE_OBJCOPY} --gap-fill 0xFF --srec-len 1 --output-target=srec ${KERNEL_ELF_NAME} ${KERNEL_S19_NAME}
)
list_append_ifdef(