From 8322b22391dfe0dfdf377eceee6e05bc32ec79ac Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Wed, 25 Jun 2025 19:19:06 +0700 Subject: [PATCH] CMakeList: Disable gapfill for RX target Ignore gapfill for RX target as some RX toolchains generate wrong output image when running gapfill for binary format. Signed-off-by: Duy Nguyen --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3157813d65c..8eb997ebcb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1701,8 +1701,12 @@ list(APPEND list(APPEND post_build_byproducts ${KERNEL_MAP_NAME}) # Use ';' as separator to get proper space in resulting command. -set(gap_fill_prop "$") -set(gap_fill "$<$:${gap_fill_prop}${CONFIG_BUILD_GAP_FILL_PATTERN}>") +# Ignore gapfill for RX target as some RX toolchains generate wrong output image when running +# gapfill for binary format. +if(NOT CONFIG_RX) + set(gap_fill_prop "$") + set(gap_fill "$<$:${gap_fill_prop}${CONFIG_BUILD_GAP_FILL_PATTERN}>") +endif() if(CONFIG_OUTPUT_PRINT_MEMORY_USAGE) target_link_libraries(${logical_target_for_zephyr_elf} $)