# Utilize version text file to set MCUBOOT image version used for rollback prevention
# KCONFIGs must be set before importing the zephyr package.
SET(SB_CONFIG_BOOTLOADER_MCUBOOT y)

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

project(hello_world)

target_sources(app PRIVATE ../src/main.c)

zephyr_library_compile_options(-Wall -Wextra -Werror)
zephyr_library_compile_options(-fno-common)
zephyr_library_compile_options(-Wwrite-strings)

# Use only relative file names instead of the full path
# This saves some space for file name storage in flash and removes the need to
# parse file names from file paths
zephyr_library_compile_options(-Wno-builtin-macro-redefined)
zephyr_library_compile_options(-D__FILE__=__FILE_NAME__)

#Special Configurations
zephyr_linker_sources(SECTIONS ${CMAKE_CURRENT_LIST_DIR}/fixed_non_init_ram.ld) # Add a special non-init section that is always in the same place

zephyr_include_directories(.)
zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth)
