Lines Matching +full:- +full:- +full:short +full:- +full:build +full:- +full:path

1 # SPDX-License-Identifier: Apache-2.0
14 # 1. Zephyr-aware extensions
21 # 2. Kconfig-aware extensions
23 # 3. CMake-generic extensions
39 # 7.2 add_llext_* build control functions
44 # 1. Zephyr-aware extensions
49 # "zephyr". zephyr is a catch-all CMake library for source files that
52 # [0] https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html
60 # Is short for:
66 # As a very high-level introduction here are two call graphs that are
72 # zephyr_library_compile_options() --> target_compile_options()
75 # zephyr_cc_option() ---> target_cc_option()
78 # zephyr_cc_option_fallback() ---> target_cc_option_fallback()
81 # zephyr_compile_options() ---> target_compile_options()
167 # Getter functions for extracting build information from
169 # requesting specific categories of build information (defines,
178 # - include_directories # -I directories
179 # - system_include_directories # -isystem directories
180 # - compile_definitions # -D'efines
181 # - compile_options # misc. compiler flags
184 # - the empty string '', signifying that it should be returned as a list
185 # - _as_string signifying that it should be returned as a string
188 # - C
189 # - CXX
190 # - ASM
195 # to a compiler, e.g. prefixed with -D, or -I, but it is possible to
201 # writes "-Isome_dir;-Isome/other/dir" to x
243 set(result_output_list "-I$<JOIN:${genexp_output_list},$<SEMICOLON>-I>")
248 set(result_output_list "-I$<JOIN:${genexp_output_list},${args_DELIMITER}-I>")
261 …ult_output_list "$<$<BOOL:${genexp_output_list}>:-isystem$<JOIN:${genexp_output_list},${args_DELIM…
274 set(result_output_list "-D$<JOIN:${genexp_output_list},${args_DELIMITER}-D>")
318 # $<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
325 # https://cmake.org/cmake/help/v3.3/manual/cmake-generator-expressions.7.html
339 # SHELL is used to avoid de-duplication, but when process flags
414 # methods have the signature: zephyr_library_<target-function>
417 # https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
429 # Constructor with a directory-inferred name
465 # Provides amend functionality to a Zephyr library for out-of-tree usage.
485 # include path then the following is possible:
607 "-l" $<TARGET_FILE_NAME:${ZEPHYR_CURRENT_LIBRARY}> "${partition}")
638 # ensure that when a user KConfig-enables a library then the header
643 # functions out-of-the box.
646 # build information (include directories, defines, compiler flags,
651 # zephyr_library_link_libraries(<interface_library>) to use this build
667 # that can be included into the application at build time. The file
680 ${ZEPHYR_BASE}/scripts/build/file2hex.py
682 --file ${source_file}
726 # - Board runners
727 # - Board revision
731 # from the build system. The Zephyr build system has targets for
813 # board_runner_args(runner "--some-arg=val1" "--another-arg=val2")
815 # The build system will then ensure the command line used to
817 # --some-arg=val1 --another-arg=val2
823 # board_runner_args(runner "--some-app-setting=value")
826 # The build system tests for the existence of the macro and will
830 # defaults provided by the build system.
843 # This ensures the build system captures all arguments added in any
848 # board_runner_args(runner "--some-arg=default-value")
935 # The function will check the revision from `-DBOARD=<board>@<revision>` that
937 # When `EXACT` is not specified, this function will set the Zephyr build system
941 # LETTER: Revision format is a single letter from A - Z.
967 # revisions 0.x.0-0.99.99 and 1.0.0-1.99.99, and it is expected
999 requires a revision. Please use: `-DBOARD=${BOARD}@<revision>`")
1018 set(revision_regex "([A-Z])")
1020 set(revision_regex "([0-9]+)")
1022 set(revision_regex "((0|[1-9][0-9]*)(\.[0-9]+)(\.[0-9]+))")
1025 if(BOARD_REVISION MATCHES "((0|[1-9][0-9]*)(\.[0-9]+)?(\.[0-9]+)?)")
1108 # again wraps the CMake-builtin's check_c_compiler_flag and
1114 # build folder's CMakeCache.txt)
1132 # the file contents are the values in this key-value store.
1167 # Flags that start with -Wno-<warning> can not be tested by
1168 # check_compiler_flag, they will always pass, but -W<warning> can be
1169 # tested, so to test -Wno-<warning> flags we test -W<warning>
1171 if("${option}" MATCHES "-Wno-(.*)")
1172 string(REPLACE "-Wno-" "-W" possibly_translated_option "${option}")
1223 # the test. Exclude them by toolchain-specific blocklist.
1246 # currently only available on ARM Cortex-M, ARM Cortex-R,
1247 # x86, ARC, openisa_rv32m1, and RISC-V.
1264 # given, the key 'default' is used. Keys are case-sensitive.
1275 # _mysection_size = ABSOLUTE(_mysection_end - _mysection_start);
1285 # _mysection_size = _mysection_end - _mysection_start;
1297 set(sections_path "${snippet_base}/snippets-sections.ld")
1298 set(rom_sections_path "${snippet_base}/snippets-rom-sections.ld")
1299 set(ram_sections_path "${snippet_base}/snippets-ram-sections.ld")
1300 set(data_sections_path "${snippet_base}/snippets-data-sections.ld")
1301 set(rom_start_path "${snippet_base}/snippets-rom-start.ld")
1302 set(noinit_path "${snippet_base}/snippets-noinit.ld")
1303 set(rwdata_path "${snippet_base}/snippets-rwdata.ld")
1304 set(rodata_path "${snippet_base}/snippets-rodata.ld")
1305 set(ramfunc_path "${snippet_base}/snippets-ramfunc-section.ld")
1306 set(nocache_path "${snippet_base}/snippets-nocache-section.ld")
1307 set(itcm_path "${snippet_base}/snippets-itcm-section.ld")
1308 set(dtcm_path "${snippet_base}/snippets-dtcm-section.ld")
1310 set(pinned_ram_sections_path "${snippet_base}/snippets-pinned-ram-sections.ld")
1311 set(pinned_data_sections_path "${snippet_base}/snippets-pinned-data-sections.ld")
1312 set(pinned_rodata_path "${snippet_base}/snippets-pinned-rodata.ld")
1389 # Resolve path.
1391 set(path ${file}) variable
1393 set(path ${CMAKE_CURRENT_SOURCE_DIR}/${file}) variable
1396 if(IS_DIRECTORY ${path})
1400 # Find the relative path to the linker file from the include folder.
1401 file(RELATIVE_PATH relpath ${ZEPHYR_BASE}/include ${path})
1449 # - NOCOPY: this flag indicates that the file data does not need to be copied
1451 # - NOKEEP: suppress the generation of KEEP() statements in the linker script,
1453 # - PHDR [program_header]: add program header. Used on Xtensa platforms.
1485 set(src_list_abs "$<FILTER:${genex_src_list},INCLUDE,^[A-Za-z]\:>")
1486 set(src_list_rel "$<FILTER:${genex_src_list},EXCLUDE,^[A-Za-z]\:>")
1526 # using set_property(APPEND) to produce a ";"-separated CMake list. This way,
1537 # check_dtc_flag("-Wtest" DTC_WARN_TEST)
1546 ${DTC} ${flag} -v
1575 math(EXPR x "${${n}} & (${${n}} - 1)")
1590 # Function to create a build string based on BOARD, BOARD_REVISION, and
1593 # This is a common function to ensure that build strings are always created
1595 # A single string is returned containing the full build string constructed from
1598 # When MERGE is supplied a list of build strings will be returned with the full
1599 # build string as first item in the list.
1600 # The full order of build strings returned in the list will be:
1601 # - Normalized board target build string, this includes qualifiers and revision
1602 # - Build string with board variants removed in addition
1603 # - Build string with cpuset removed in addition
1604 # - Build string with soc removed in addition
1606 # If REVISION is supplied or obtained as system wide setting a build string
1608 # non-revisioned entry for each entry.
1611 # zephyr_build_string(<out-variable>
1613 # [SHORT <out-variable>]
1618 # zephyr_build_string(<out-variable>
1623 # <out-variable>: Output variable where the build string will be returned.
1624 # SHORT <out-variable>: Output variable where the shortened build string will be returned.
1625 # BOARD <board>: Board name to use when creating the build string.
1626 # BOARD_REVISION <revision>: Board revision to use when creating the build string.
1627 # MERGE: Return a list of build strings instead of a single build string.
1649 # zephyr_build_string(build_string SHORT short_build_string BOARD alpha BOARD_REVISION 1.0.0 BOAR…
1660 set(single_args BOARD BOARD_QUALIFIERS BOARD_REVISION SHORT)
1686 "zephyr_build_string(${ARGV0} <list> SHORT ${BUILD_STR_SHORT} ...)"
1811 COMMAND ${WEST} blobs list ${BLOBS_VERIFY_MODULE} --format "{status} {abspath}"
1827 # Resolve path.
1833 file(TO_NATIVE_PATH ${real_path} path)
1835 message(VERBOSE "Verifying blob \"${path}\"")
1837 if(NOT EXISTS "${path}")
1838 message(${msg_lvl} "Blob for path \"${path}\" missing. Update with: west blobs fetch")
1839 elseif(NOT "A ${path}" IN_LIST BLOBS_LIST)
1840 # Each path that has a correct sha256 is prefixed with an A
1841 message(${msg_lvl} "Blob for path \"${path}\" isn't valid. Update with: west blobs fetch")
1848 list(GET blob 1 path)
1850 message(VERBOSE "Verifying blob \"${path}\"")
1852 if(NOT EXISTS "${path}")
1853 …message(${msg_lvl} "Blob for path \"${path}\" missing. Update with: west blobs fetch ${BLOBS_VERIF…
1855 …message(${msg_lvl} "Blob for path \"${path}\" isn't valid. Update with: west blobs fetch ${BLOBS_V…
1862 # 2. Kconfig-aware extensions
1879 # <kconfig_fragment>: absolute path to the config fragment file.
1890 ENCODING "UTF-8"
1954 # 3. CMake-generic extensions
1959 # language to allow cleaner build scripts.
1982 # "<function-name>_ifdef(CONDITION args)"
1986 # <function-name>(args)
1990 # ifdef functions are added on an as-need basis. See
1991 # https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
2289 # 3.3. *_option Compiler-compatibility checks
2293 # cc-option in
2305 # check_compiler_flag(C "-Wall" my_check)
2393 # 'gcc -M'.
2395 # The argument 'input_file' is in input parameter with the path to the
2414 # the file paths are short, split these up into multiple elements using regex
2420 # Remove whitespace before and after filename and convert to CMake path.
2460 if(NOT "${var}" STREQUAL "var-NOTFOUND")
2516 # compiler-cpp targets.
2528 set(APPEND-CPP "APPEND")
2532 set_property(TARGET compiler-cpp ${APPEND} PROPERTY ${COMPILER_PROPERTY_PROPERTY})
2536 # flag and only set the compiler or compiler-cpp property if the check succeeds
2540 # before setting the property on compiler or compiler-cpp targets.
2542 # To test flags together, such as '-Wformat -Wformat-security', an option group
2543 # can be specified by using shell-like quoting along with a 'SHELL:' prefix.
2545 # '"SHELL:-Wformat -Wformat-security"' becomes '-Wformat -Wformat-security' for
2558 set(APPEND-CPP "APPEND")
2574 set_property(TARGET compiler-cpp ${APPEND-CPP} PROPERTY ${property} ${option})
2575 set(APPEND-CPP "APPEND")
2649 # APPLICATION_ROOT <path>: Check all paths in provided variable, and convert
2650 # those paths that are defined with `-D<path>=<val>`
2651 # to absolute path, relative from `APPLICATION_SOURCE_DIR`
2652 # Issue an error for any relative path not specified
2653 # by user with `-D<path>`
2654 # BASE_DIR <base-dir>: convert paths relative to <base-dir>
2668 # - DTS: Overlay files (.overlay)
2669 # - Kconfig: Config fragments (.conf)
2670 # - defconfig: defconfig files (_defconfig)
2686 # DTS <list>: List to append DTS overlay files in <path> to
2687 # KCONF <list>: List to append Kconfig fragment files in <path> to
2688 # DEFCONF <list>: List to append _defconfig files in <path> to
2722 # Note: user can do: `-D<var>=<relative-path>` and app can at same
2723 # time specify `list(APPEND <var> <abs-path>)`
2724 # Thus need to check and update only CACHED variables (-D<var>).
2726 foreach(path ${CACHED_PATH})
2727 # The cached variable is relative path, i.e. provided by `-D<var>` or
2729 # path from `APPLICATION_SOURCE_DIR`.
2730 if(NOT IS_ABSOLUTE ${path})
2731 list(FIND ${ZFILE_APPLICATION_ROOT} ${path} index)
2732 cmake_path(ABSOLUTE_PATH path BASE_DIRECTORY ${ZFILE_BASE_DIR} NORMALIZE)
2735 list(INSERT ${ZFILE_APPLICATION_ROOT} ${index} ${path})
2741 # Let's check if anyone uses relative path as scoped variable, and fail
2742 foreach(path ${${ZFILE_APPLICATION_ROOT}})
2743 if(NOT IS_ABSOLUTE ${path})
2745 "Relative path encountered in scoped variable: ${ZFILE_APPLICATION_ROOT}, value=${path}\n \
2746 …ase adjust any `set(${ZFILE_APPLICATION_ROOT} ${path})` or `list(APPEND ${ZFILE_APPLICATION_ROOT} …
2747 to absolute path using `\${CMAKE_CURRENT_SOURCE_DIR}/${path}` or similar. \n \
2748 Relative paths are only allowed with `-D${ARGV1}=<path>`")
2760 "zephyr_file(${ARGV0} <path> BOARD_REVISION ${ZFILE_BOARD_REVISION} ...)"
2783 SHORT shortened_filename_list
2808 foreach(path ${ZFILE_CONF_FILES})
2812 set(test_file_${i} ${path}/${filename_${i}})
2855 foreach(path ${ZFILE_CONF_FILES})
2859 set(test_file_${i} ${path}/${filename_${i}})
2913 foreach(path ${ZFILE_CONF_FILES})
2916 set(test_file_${i} ${path}/${filename_${i}}_defconfig)
2978 COMMAND ${CMAKE_COMMAND} -E ${copy_file_command} ${oldname} ${newname}
2989 # path/paths.
2991 # <filename>: Variable (singlular or list) of absolute path filename(s) which should be checked
2995 # Returns an updated variable of absolute path(s)
3034 # zephyr_string(<mode> <out-var> <input> ...)
3045 # This is useful for handling of windows path separator in strings or
3051 # characters. Special characters, such as -, +, =, $, etc. are
3055 # characters. Special characters, such as -, +, =, $, etc. are
3076 string(REGEX REPLACE "[^a-zA-Z0-9_]" "_" work_string ${work_string})
3085 # \\1 and \\2 are keeping the match patterns, the \\\\ --> \\ meaning an escaped '\',
3103 # for storing current and future Zephyr-related extensions for list
3107 # converts the argument list <list> to a ;-list with
3108 # CMake path names, after passing its contents through
3110 # may be whitespace- or semicolon-separated.
3185 # build settings that can be set from sysbuild, CMakeLists.txt, CMake cache, or
3189 # - Sysbuild defined when sysbuild is used.
3192 # - BOARD is considered a global sysbuild cache variable
3193 # - blinky_BOARD is considered a local sysbuild cache variable only for the
3198 # - CMake cache, set by `-D<var>=<value>` or `set(<var> <val> CACHE ...)
3199 # - Environment
3200 # - Locally in CMakeLists.txt before 'find_package(Zephyr)'
3204 # using `-DZEPHYR_TOOLCHAIN_VARIANT=<val>`, then the value from the cache is
3272 # Set the environment variable in CMake cache, so that a build
3406 # Zephyr build variables, such as:
3407 # - BOARD
3408 # - SHIELD
3418 # - Using CMake argument, -D<variable>
3419 # - Using an environment variable
3420 # - In the project CMakeLists.txt before `find_package(Zephyr)`.
3426 # cache as CACHED_<variable>. This allows the Zephyr build system to detect
3430 # E.g. always specifies -D<variable>= on the command line,
3442 # <variable> the build directory must be cleaned.
3451 # If the build has already been configured in an earlier CMake invocation,
3455 # that a pristine build is needed.
3457 # If user uses -D<variable>=<new_value>, then cli_argument will hold the new
3467 # The app build scripts did not set a default, The variable we are
3477 message(WARNING "The build directory must be cleaned pristinely when "
3498 message(FATAL_ERROR "${variable} is not being defined on the CMake command-line,"
3520 # Inform the build system that SOME_BOILERPLATE_VAR, a variable
3553 # Get build targets for a given directory and sub-directories.
3555 # This functions will traverse the build tree, starting from <directory>.
3556 # It will read the `BUILDSYSTEM_TARGETS` for each directory in the build tree
3557 # and return the build types matching the <types> list.
3587 # This function allows samples that are multi-image samples by nature to ensure
3601 "For correct user-experiences, please build '${PROJECT_NAME}' "
3612 # This function allows the build system to specify additional byproducts to
3615 # build system. This function makes it possible to describe such additional
3625 POST_BUILD COMMAND ${CMAKE_COMMAND} -E true
3634 # RESULT <out-variable>)
3703 # build_info(<tag>... PATH <path>...)
3705 # This function populates the build_info.yml info file with exchangable build
3706 # information related to the current build.
3710 # Will update the 'devicetree files' key in the build info yaml with the list
3713 # build_info(vendor-specific foo VALUE bar)
3715 # of the build info file.
3717 # <tag>...: One of the pre-defined valid CMake keys supported by build info or vendor-specific.
3718 # See 'scripts/schemas/build-schema.yml' CMake section for valid tags.
3720 # PATH <path>... : path(s) to place in the build_info.yml file. All paths are converted to CMake
3727 if(index EQUAL -1)
3728 list(FIND arg_list PATH index)
3732 if(index EQUAL -1)
3733 message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}(...) missing a required argument: VALUE or PATH")
3739 message(FATAL_ERROR "build_info: generator expressions unsupported on PATH entries")
3746 yaml_load(FILE ${ZEPHYR_BASE}/scripts/schemas/build-schema.yml NAME build_info_schema)
3756 list(SUBLIST arg_list ${index} -1 values)
3768 if(ARGV0 STREQUAL "vendor-specific")
3774 if(check MATCHES ".*-NOTFOUND")
3798 # - In CMake, we refer to the nodes using the node's path, therefore
3802 # - As another difference from the C API, you can generally use an
3803 # alias at the beginning of a path interchangeably with the full
3804 # path to the aliased node in these functions. The usage comments
3810 # Function for retrieving the node path for the node having nodelabel
3817 # nvic: interrupt-controller@e000e100 { ... };
3823 # # Sets 'nvic_path' to "/soc/interrupt-controller@e000e100"
3826 # The node's path will be returned in the <var> parameter.
3829 # <var> : Return variable where the node path will be stored
3831 # REQUIRED : Generate a fatal error if the node-label is not found
3850 if(${${var}} STREQUAL ${var}-NOTFOUND)
3863 # Get a node path for an /aliases node property.
3867 # # The full path to the 'led0' alias is returned in 'path'.
3868 # dt_alias(path PROPERTY "led0")
3870 # # The variable 'path' will be left undefined for a nonexistent
3871 # # alias "does-not-exist".
3872 # dt_alias(path PROPERTY "does-not-exist")
3874 # The node's path will be returned in the <var> parameter. The
3877 # <var> : Return variable where the node path will be stored
3898 if(${${var}} STREQUAL ${var}-NOTFOUND)
3909 # dt_node_exists(<var> PATH <path>)
3911 # Tests whether a node with path <path> exists in the devicetree.
3913 # The <path> value may be any of these:
3915 # - absolute path to a node, like '/foo/bar'
3916 # - a node alias, like 'my-alias'
3917 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
3923 # PATH <path> : Node path
3925 set(req_single_args "PATH")
3949 # dt_node_has_status(<var> PATH <path> STATUS <status>)
3951 # Tests whether <path> refers to a node which:
3952 # - exists in the devicetree, and
3953 # - has a status property matching the <status> argument
3957 # The <path> value may be any of these:
3959 # - absolute path to a node, like '/foo/bar'
3960 # - a node alias, like 'my-alias'
3961 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
3967 # PATH <path> : Node path
3970 set(req_single_args "PATH;STATUS")
3991 dt_prop(status PATH ${canonical} PROPERTY status)
4006 # dt_prop(<var> PATH <path> PROPERTY <prop> [INDEX <idx>])
4011 # The <path> value may be any of these:
4013 # - absolute path to a node, like '/foo/bar'
4014 # - a node alias, like 'my-alias'
4015 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4018 # devicetree binding types: string, int, boolean, array, uint8-array,
4019 # string-array, path.
4021 # For array valued properties (including uint8-array and
4022 # string-array), the entire array is returned as a CMake list unless
4033 # dt_prop(reserved_ranges PATH "/soc/gpio@deadbeef" PROPERTY "gpio-reserved-ranges")
4035 # # Node exists and has the "gpio-reserved-ranges" property.
4041 # dt_node_exists(node_exists PATH "/soc/gpio@deadbeef")
4042 # dt_prop(reserved_ranges PATH "/soc/gpio@deadbeef" PROPERTY "gpio-reserved-ranges")
4044 # # Node "/soc/gpio@deadbeef" exists and has the "gpio-reserved-ranges" property
4050 # PATH <path> : Node path
4057 set(req_single_args "PATH;PROPERTY")
4107 # For details and considerations about the format of <path> and the returned
4155 # dt_num_regs(<var> PATH <path>)
4162 # The <path> value may be any of these:
4164 # - absolute path to a node, like '/foo/bar'
4165 # - a node alias, like 'my-alias'
4166 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4169 # PATH <path> : Node path
4171 set(req_single_args "PATH")
4193 # dt_reg_addr(<var> PATH <path> [INDEX <idx>] [NAME <name>])
4201 # The <path> value may be any of these:
4203 # - absolute path to a node, like '/foo/bar'
4204 # - a node alias, like 'my-alias'
4205 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4208 # - The base address of the register block
4209 # - <var> will be undefined if node does not exists or does not have a register
4213 # PATH <path> : Node path
4217 set(req_single_args "PATH")
4239 if(DT_REG_INDEX EQUAL "-1")
4258 # dt_reg_size(<var> PATH <path> [INDEX <idx>] [NAME <name>])
4266 # The <path> value may be any of these:
4268 # - absolute path to a node, like '/foo/bar'
4269 # - a node alias, like 'my-alias'
4270 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4273 # PATH <path> : Node path
4277 set(req_single_args "PATH")
4299 if(DT_REG_INDEX EQUAL "-1")
4318 function(dt_reg_index_private var path name)
4319 dt_prop(reg_names PATH "${path}" PROPERTY "reg-names")
4321 set(index "-1")
4332 # <prop> which contains the path to a node.
4371 if(${exists} STREQUAL exists-NOTFOUND)
4381 # Get a node path for a /chosen node property.
4383 # The node's path will be returned in the <var> parameter. The
4386 # <var> : Return variable where the node path will be stored
4406 if(${${var}} STREQUAL ${var}-NOTFOUND)
4413 # Internal helper. Canonicalizes a path 'path' into the output
4415 # accessed via alias as well. 'var' is left undefined if the path does
4422 # my-label: bar {
4427 # my-alias = &my-label;
4434 # dt_path_internal(ret "my-alias") # sets ret to "/foo/bar"
4435 # dt_path_internal(ret "my-alias/baz") # sets ret to "/foo/bar/baz"
4437 function(dt_path_internal var path)
4438 string(FIND "${path}" "/" slash_index)
4442 # canonical path.
4443 dt_path_internal_exists(check "${path}")
4445 set(${var} "${path}" PARENT_SCOPE)
4450 string(SUBSTRING "${path}" 0 "${slash_index}" alias_name)
4457 if (NOT "${slash_index}" EQUAL -1)
4458 string(SUBSTRING "${path}" "${slash_index}" -1 rest)
4472 # Internal helper. Set 'var' to TRUE if a canonical path 'path' refers
4475 function(dt_path_internal_exists var path)
4476 get_target_property(path_prop devicetree_target "DT_NODE|${path}")
4499 # # If the devicetree path "/soc/serial@4000" is a node, this
4503 # <path> : Path to devicetree node to check
4504 # <target> : Build system target whose sources to add to
4507 function(target_sources_if_dt_node path target scope item)
4508 dt_node_exists(check PATH "${path}")
4527 # zephyr_dt_preprocess(CPP <path> [<argument...>]
4541 # CPP <path> [<argument...>]: path to C preprocessor, followed by any
4574 list(APPEND include_opts -isystem ${dir})
4579 list(APPEND source_opts -include ${file})
4584 list(APPEND deps_opts -MD -MF ${DT_PREPROCESS_DEPS_FILE})
4596 -x assembler-with-cpp
4597 -nostdinc
4601 -D__DTS__
4603 -E # Stop after preprocessing
4605 -o ${DT_PREPROCESS_OUT_FILE}
4702 # r: Read-only region
4703 # w: Read-write region
4756 # zephyr_linker_dts_section(PATH <path>)
4758 # Zephyr linker devicetree memory section from path.
4765 # PATH <path> : Devicetree node path.
4768 set(single_args "PATH")
4779 "required argument: PATH"
4783 dt_node_has_status(okay PATH ${DTS_SECTION_PATH} STATUS okay)
4788 dt_prop(name PATH ${DTS_SECTION_PATH} PROPERTY "zephyr,memory-region")
4791 "\"zephyr,memory-region\" property"
4796 dt_reg_addr(addr PATH ${DTS_SECTION_PATH})
4803 # zephyr_linker_dts_memory(PATH <path>)
4814 # Only one of PATH, NODELABEL, and CHOSEN parameters may be given.
4816 # PATH <path> : Devicetree node identifier.
4822 set(single_args "CHOSEN;PATH;NODELABEL")
4834 "PATH, NODELABEL, and CHOSEN is allowed."
4850 dt_node_has_status(okay PATH ${DTS_MEMORY_PATH} STATUS okay)
4855 dt_reg_addr(addr PATH ${DTS_MEMORY_PATH})
4856 dt_reg_size(size PATH ${DTS_MEMORY_PATH})
4857 dt_prop(name PATH ${DTS_MEMORY_PATH} PROPERTY "zephyr,memory-region")
4860 "\"zephyr,memory-region\" property"
4865 dt_prop(flags PATH ${DTS_MEMORY_PATH} PROPERTY "zephyr,memory-region-flags")
4928 # +-----------------+
4931 # | +-------------+ |
4933 # | +-------------+ |
4935 # | +-------------+ |
4937 # | +-------------+ |
4939 # +-----------------+
4948 # +---------------------+
4951 # | +-----------------+ |
4954 # | | +-------------+ | |
4956 # | | +-------------+ | |
4958 # | +-----------------+ |
4960 # +---------------------+
5089 - (${CONFIG_SRAM_BASE_ADDRESS} + ${CONFIG_SRAM_OFFSET})"
5151 # of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE.
5185 # ToDo - Should we use ROM, RAM, etc as arguments ?
5368 # `+, -, *` and similar. The expression will go directly into the
5397 # The macro will create a list of argument-value pairs for defined arguments
5573 # 7.2 Build control functions
5575 # The following functions add targets and subcommands to the build system
5592 # in the Zephyr build, but with some important modifications. The list of
5599 # - lib_target Target name for the source compilation and/or link step.
5600 # - lib_output The binary file resulting from compilation and/or
5602 # - pkg_input The file to be used as input for the packaging step.
5603 # - pkg_output The final .llext file.
5618 # Check that the llext subsystem is enabled for this build
5654 # a "-shared" flag to the linker command line which does firmly
5655 # conflict with "-r".
5720 # they will take care of this and the default copy is replaced by a no-op.
5722 set(noop_cmd ${CMAKE_COMMAND} -E true)
5723 set(copy_cmd ${CMAKE_COMMAND} -E copy ${llext_lib_output} ${llext_pkg_input})
5740 ${ZEPHYR_BASE}/scripts/build/llext_inject_slids.py
5741 --elf-file ${llext_pkg_output}
5744 set(slid_inject_cmd ${CMAKE_COMMAND} -E true)
5761 # Add user-visible target and dependency, and fill in properties
5783 # the build. The command will be executed at the specified build step and
5784 # can refer to <target>'s properties for build-specific details.
5786 # The different build steps are:
5787 # - PRE_BUILD: Before the llext code is linked, if the architecture uses
5790 # - POST_BUILD: After the llext code is built, but before packaging
5793 # - POST_PKG: After the .llext file has been created. This can operate on
5796 # Anything else after COMMAND will be passed to add_custom_command() as-is
5801 # COMMAND and other options are passed to add_custom_command() as-is
5820 # Determine the build step and the target to attach the command to
5824 # - execute user command(s) before the lib target's link step.
5829 # - stop default file copy to prevent user files from being clobbered;
5830 # - execute user command(s) after the (now empty) `llext_proc_target`.
5836 # - execute user command(s) after the main target is done.
5840 message(FATAL_ERROR "add_llext_command: build step must be provided")
5904 # are: package_helper.cmake, verify-toolchain.cmake, llext-edk.cmake
5919 # Build info creates a custom target for handling of build info.