# Copyright (c) 2024 Nordic Semiconductor
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_ARM)
  zephyr_library_sources(soc.c)
  zephyr_library_sources(soc_power.c)
  zephyr_code_relocate(
    FILES soc_power.c
    FILTER ".*\\.cache_retain_and_sleep"
    LOCATION PMLocalRamfunc_TEXT
  )
  zephyr_library_sources_ifdef(CONFIG_PM_S2RAM soc_pm_s2ram.c)
endif()

zephyr_include_directories(.)

# Ensure that image size aligns with 16 bytes so that MRAMC finalizes all writes
# for the image correctly
zephyr_linker_sources(SECTIONS SORT_KEY zzz_place_align_at_end align.ld)
