a0267d2f48
This adds supports for flashing images with sysbuild where there are multiple images per board to prevent using the same command per image flash which might cause issues if they are not ran just once per flash per unique board name. A deferred reset feature is also introduced that prevents a board (or multiple) from being reset if multiple images are to be flashed until the final one has been flashed which prevents issues with e.g. security bits being enabled that then prevent flashing further images. These options can be set at a board level (in board.yml) or a SoC level (in soc.yml), if both are present then the board configuration will be used instead of the SoC, and regex can be used for matching of partial names which allows for matching specific SoCs or CPU cores regardless of the board being used Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
33 lines
1.1 KiB
CMake
33 lines
1.1 KiB
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Copyright (c) 2021, Nordic Semiconductor ASA
|
|
|
|
# Configure SoC settings based on Kconfig settings.
|
|
#
|
|
# This CMake module will set the following variables in the build system based
|
|
# on Kconfig settings for the selected SoC.
|
|
#
|
|
# Outcome:
|
|
# The following variables will be defined when this CMake module completes:
|
|
#
|
|
# - SOC_NAME: Name of the SoC in use, identical to CONFIG_SOC
|
|
# - SOC_SERIES: Name of the SoC series in use, identical to CONFIG_SOC_SERIES
|
|
# - SOC_FAMILY: Name of the SoC family, identical to CONFIG_SOC_FAMILY
|
|
#
|
|
# Variables set by this module and not mentioned above are considered internal
|
|
# use only and may be removed, renamed, or re-purposed without prior notice.
|
|
|
|
include_guard(GLOBAL)
|
|
|
|
include(kconfig)
|
|
|
|
if(HWMv2)
|
|
set(SOC_NAME ${CONFIG_SOC})
|
|
set(SOC_SERIES ${CONFIG_SOC_SERIES})
|
|
set(SOC_TOOLCHAIN_NAME ${CONFIG_SOC_TOOLCHAIN_NAME})
|
|
set(SOC_FAMILY ${CONFIG_SOC_FAMILY})
|
|
set(SOC_V2_DIR ${SOC_${SOC_NAME}_DIR})
|
|
set(SOC_FULL_DIR ${SOC_V2_DIR} CACHE PATH "Path to the SoC directory." FORCE)
|
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${SOC_V2_DIR}/soc.yml)
|
|
endif()
|