2021-01-25 16:43:52 +08:00
|
|
|
# Copyright (c) 2021 Nordic Semiconductor ASA
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2021-01-11 19:53:21 +08:00
|
|
|
|
2021-03-11 20:30:18 +08:00
|
|
|
if (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION)
|
2021-01-25 16:43:52 +08:00
|
|
|
add_subdirectory(nrf_802154)
|
2021-03-11 20:30:18 +08:00
|
|
|
endif (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION)
|
2021-01-11 19:53:21 +08:00
|
|
|
|
2021-03-11 20:30:18 +08:00
|
|
|
add_subdirectory_ifdef(CONFIG_HAS_NRFX nrfx)
|
modules: hal_nordic: Integrate nrf-regtool
nrf-regtool is a Python utility from Nordic Semiconductor, which is used
for generating binary files with register values for given peripherals.
It sources the descriptions of peripheral registers from CMSIS-SVD files
(typically ones bundled with nRF MDK).
For some peripherals, such as UICR, nrf-regtool supports parsing values
from devicetree as well, based on the bindings already found in Zephyr.
Currently, this tool is not submitted as a script to Zephyr, but it can
be installed from PyPI.
Having nrf-regtool installed is recommended when working with nRF54H20.
Booting the Application or Radiocore CPU requires flashing not only its
firmware, but also its respective UICR instance. On this SoC, the UICR
is used to assign ownership of global hardware resources, including
memory and peripherals, to individual cores. The Zephyr build system can
call nrf-regtool to generate the UICR based on devicetree, to reflect
the boot-time hardware configuration required for a given application.
The generated `uicr.hex` is then merged with `zephyr.hex`, so that they
can be flashed together using west.
The build system integration takes the form of a CMake package, which
includes a version check and reusable components; over time, some of
these components can be reused by sysbuild. This package is located in
the `hal_nordic` module, because it depends on the `SOC_SVD_FILE` CMake
variable, which is defined there as well.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-01-30 21:30:20 +08:00
|
|
|
|
|
|
|
if(CONFIG_NRF_REGTOOL_GENERATE_UICR)
|
|
|
|
list(APPEND nrf_regtool_components GENERATE:UICR)
|
|
|
|
endif()
|
|
|
|
if(DEFINED nrf_regtool_components)
|
2024-02-27 21:03:42 +08:00
|
|
|
find_package(nrf-regtool 5.1.0
|
modules: hal_nordic: Integrate nrf-regtool
nrf-regtool is a Python utility from Nordic Semiconductor, which is used
for generating binary files with register values for given peripherals.
It sources the descriptions of peripheral registers from CMSIS-SVD files
(typically ones bundled with nRF MDK).
For some peripherals, such as UICR, nrf-regtool supports parsing values
from devicetree as well, based on the bindings already found in Zephyr.
Currently, this tool is not submitted as a script to Zephyr, but it can
be installed from PyPI.
Having nrf-regtool installed is recommended when working with nRF54H20.
Booting the Application or Radiocore CPU requires flashing not only its
firmware, but also its respective UICR instance. On this SoC, the UICR
is used to assign ownership of global hardware resources, including
memory and peripherals, to individual cores. The Zephyr build system can
call nrf-regtool to generate the UICR based on devicetree, to reflect
the boot-time hardware configuration required for a given application.
The generated `uicr.hex` is then merged with `zephyr.hex`, so that they
can be flashed together using west.
The build system integration takes the form of a CMake package, which
includes a version check and reusable components; over time, some of
these components can be reused by sysbuild. This package is located in
the `hal_nordic` module, because it depends on the `SOC_SVD_FILE` CMake
variable, which is defined there as well.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-01-30 21:30:20 +08:00
|
|
|
COMPONENTS ${nrf_regtool_components}
|
|
|
|
PATHS ${CMAKE_CURRENT_LIST_DIR}/nrf-regtool
|
|
|
|
NO_CMAKE_PATH
|
|
|
|
NO_CMAKE_ENVIRONMENT_PATH
|
|
|
|
NO_SYSTEM_ENVIRONMENT_PATH
|
|
|
|
NO_CMAKE_PACKAGE_REGISTRY
|
|
|
|
NO_CMAKE_SYSTEM_PATH
|
|
|
|
NO_CMAKE_SYSTEM_PACKAGE_REGISTRY
|
|
|
|
)
|
|
|
|
endif()
|