Commit b791138c authored by Carles Cufi's avatar Carles Cufi Committed by Fabio Utzig
Browse files

samples: zephyr: Use BOOTLOADER_MCUBOOT

Instead of manually setting the text section offset and the overlay
file, use the now readily available BOOTLOADER_MCUBOOT Kconfig option to
provide that automatically.

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent 58b321a8
Loading
Loading
Loading
Loading
−13
Changes for samples/zephyr/hello-world/CMakeLists.txt: 0 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -19,23 +19,10 @@ macro(set_conf_file)
  endif()
endmacro()

# Zephyr uses Device Tree (DT) to describe some board hardware
# configuration.
#
# For this simple example, all we need to tell DT is where on the chip
# flash to link this application image so mcuboot can find it. We do
# this with a device tree overlay file.
#
# See the Zephyr documentation for more information on DT:
# http://docs.zephyrproject.org/devices/dts/device_tree.html
set(DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/dts.overlay")

# Standard Zephyr application boilerplate.
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)

assert_exists(DTC_OVERLAY_FILE)

# This string ends up getting printed in the device console
if (NOT DEFINED FROM_WHO)
  set(FROM_WHO Zephyr)
−10

File deleted.

+2 −7
Changes for samples/zephyr/hello-world/prj.conf: 2 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -6,10 +6,5 @@ CONFIG_BUILD_TIMESTAMP=y
CONFIG_PRINTK=y
CONFIG_STDOUT_CONSOLE=y

# TEXT_SECTION_OFFSET is used to leave space in the binary for the
# mcuboot header.
#
# This is a conservative value which should work for most boards, at
# the cost of unnecessarily reducing the amount of usable flash a bit
# on some boards.
CONFIG_TEXT_SECTION_OFFSET=0x200
# Enable Zephyr application to be booted by MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y