Commit 64dde5b8 authored by Marti Bolivar's avatar Marti Bolivar Committed by Fabio Utzig
Browse files

zephyr: move flash sectors configuration option to mcuboot_config.h

This allows us to delete all the remaining compiler command line
configuration from CMakeLists.txt.

Signed-off-by: default avatarMarti Bolivar <marti@opensourcefoundries.com>
parent 53e2c260
Loading
Loading
Loading
Loading
−14
Changes for boot/zephyr/CMakeLists.txt: 0 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@ cmake_minimum_required(VERSION 3.8.2)

set(KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/Kconfig)

set(MCUBOOT_EXTRA_CFLAGS)

# Board-specific CONF_FILES should get merged into the build as well.
#
# Do this by defining the set_conf_file macro:
@@ -22,18 +20,6 @@ macro(set_conf_file)
  endif()
endmacro()

# Enabling this option uses newer flash map APIs. This saves RAM and
# avoids deprecated API usage.
#
# (This can be deleted when flash_area_to_sectors() is removed instead
# of simply deprecated.)
list(APPEND MCUBOOT_EXTRA_CFLAGS "-DMCUBOOT_USE_FLASH_AREA_GET_SECTORS")

# Add values in MCUBOOT_EXTRA_CFLAGS_STR to the Zephyr build's
# EXTRA_CFLAGS variable.
string(REPLACE ";" " " MCUBOOT_EXTRA_CFLAGS_STR "${MCUBOOT_EXTRA_CFLAGS}")
set(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${MCUBOOT_EXTRA_CFLAGS_STR}")

# The board should be set to a supported target.
if (NOT DEFINED BOARD)
  set(BOARD qemu_x86)
+9
Changes for boot/zephyr/include/mcuboot_config/mcuboot_config.h: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -39,6 +39,15 @@
#define MCUBOOT_OVERWRITE_ONLY_FAST
#endif

/*
 * Enabling this option uses newer flash map APIs. This saves RAM and
 * avoids deprecated API usage.
 *
 * (This can be deleted when flash_area_to_sectors() is removed instead
 * of simply deprecated.)
 */
#define MCUBOOT_USE_FLASH_AREA_GET_SECTORS

#endif /* !__BOOTSIM__ */

#endif /* __MCUBOOT_CONFIG_H__ */