Lines Matching +full:revision +full:- +full:reg
1 # SPDX-License-Identifier: Apache-2.0
14 # 1. Zephyr-aware extensions
21 # 2. Kconfig-aware extensions
23 # 3. CMake-generic extensions
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
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()
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
359 # SHELL is used to avoid de-duplication, but when process flags
413 # methods have the signature: zephyr_library_<target-function>
416 # https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
428 # Constructor with a directory-inferred name
464 # Provides amend functionality to a Zephyr library for out-of-tree usage.
606 "-l" $<TARGET_FILE_NAME:${ZEPHYR_CURRENT_LIBRARY}> "${partition}")
637 # ensure that when a user KConfig-enables a library then the header
642 # functions out-of-the box.
681 --file ${source_file}
725 # - Board runners
726 # - Board revision
812 # board_runner_args(runner "--some-arg=val1" "--another-arg=val2")
816 # --some-arg=val1 --another-arg=val2
822 # board_runner_args(runner "--some-app-setting=value")
847 # board_runner_args(runner "--some-arg=default-value")
918 # Zephyr board revision:
920 # This section provides a function for revision checking.
925 # [DEFAULT_REVISION <revision>]
926 # [HIGHEST_REVISION <revision>]
931 # This function can be used in `boards/<board>/revision.cmake` to check a user
932 # requested revision against available board revisions.
934 # The function will check the revision from `-DBOARD=<board>@<revision>` that
937 # variable `ACTIVE_BOARD_REVISION` with the selected revision.
939 # FORMAT <LETTER | NUMBER | MAJOR.MINOR.PATCH>: Specify the revision format.
940 # LETTER: Revision format is a single letter from A - Z.
941 # NUMBER: Revision format is a single integer number.
942 # MAJOR.MINOR.PATCH: Revision format is three numbers, separated by `.`,
947 # OPTIONAL: Revision specifier is optional. If revision is not provided the base
949 # specifying the revision is optional, but if it is given then the
952 # EXACT: Revision is required to be an exact match. As example, available revisions are:
955 # If `EXACT` is not provided, then closest lower revision will be selected
956 # as the active revision, which in the example will be `0.1.0`.
958 # DEFAULT_REVISION: Provides a default revision to use when user has not selected
959 # a revision number. If no default revision is provided then
960 # user will be printed with an error if no revision is given
963 # HIGHEST_REVISION: Allows to specify highest valid revision for a board.
966 # revisions 0.x.0-0.99.99 and 1.0.0-1.99.99, and it is expected
968 # revision 2.0.0, then HIGHEST_REVISION can be set to 1.99.99,
975 # of the form ``<board>_<revision>.conf`` in the board folder
976 # will be used as a valid revision for the board.
997 message(FATAL_ERROR "No board revision specified, Board: `${BOARD}` \
998 requires a revision. Please use: `-DBOARD=${BOARD}@<revision>`")
1010 message(FATAL_ERROR "Board revision `${BOARD_REVISION}` greater than \
1011 highest supported revision `${BOARD_REV_HIGHEST_REVISION}`. \
1012 Please specify a valid board revision.")
1017 set(revision_regex "([A-Z])")
1019 set(revision_regex "([0-9]+)")
1021 set(revision_regex "((0|[1-9][0-9]*)(\.[0-9]+)(\.[0-9]+))")
1022 # We allow loose <board>@<revision> typing on command line.
1024 if(BOARD_REVISION MATCHES "((0|[1-9][0-9]*)(\.[0-9]+)?(\.[0-9]+)?)")
1040 message(FATAL_ERROR "Invalid revision format used for `${BOARD_REVISION}`. \
1041 Board `${BOARD}` uses revision format: ${BOARD_REV_FORMAT}.")
1085 message(FATAL_ERROR "Board revision `${BOARD_REVISION}` for board \
1086 `${BOARD}` not found. Please specify a valid board revision.")
1107 # again wraps the CMake-builtin's check_c_compiler_flag and
1131 # the file contents are the values in this key-value store.
1166 # Flags that start with -Wno-<warning> can not be tested by
1167 # check_compiler_flag, they will always pass, but -W<warning> can be
1168 # tested, so to test -Wno-<warning> flags we test -W<warning>
1170 if("${option}" MATCHES "-Wno-(.*)")
1171 string(REPLACE "-Wno-" "-W" possibly_translated_option "${option}")
1222 # the test. Exclude them by toolchain-specific blocklist.
1245 # currently only available on ARM Cortex-M, ARM Cortex-R,
1246 # x86, ARC, openisa_rv32m1, and RISC-V.
1263 # given, the key 'default' is used. Keys are case-sensitive.
1274 # _mysection_size = ABSOLUTE(_mysection_end - _mysection_start);
1284 # _mysection_size = _mysection_end - _mysection_start;
1296 set(sections_path "${snippet_base}/snippets-sections.ld")
1297 set(rom_sections_path "${snippet_base}/snippets-rom-sections.ld")
1298 set(ram_sections_path "${snippet_base}/snippets-ram-sections.ld")
1299 set(data_sections_path "${snippet_base}/snippets-data-sections.ld")
1300 set(rom_start_path "${snippet_base}/snippets-rom-start.ld")
1301 set(noinit_path "${snippet_base}/snippets-noinit.ld")
1302 set(rwdata_path "${snippet_base}/snippets-rwdata.ld")
1303 set(rodata_path "${snippet_base}/snippets-rodata.ld")
1304 set(ramfunc_path "${snippet_base}/snippets-ramfunc-section.ld")
1305 set(nocache_path "${snippet_base}/snippets-nocache-section.ld")
1306 set(itcm_path "${snippet_base}/snippets-itcm-section.ld")
1307 set(dtcm_path "${snippet_base}/snippets-dtcm-section.ld")
1309 set(pinned_ram_sections_path "${snippet_base}/snippets-pinned-ram-sections.ld")
1310 set(pinned_data_sections_path "${snippet_base}/snippets-pinned-data-sections.ld")
1311 set(pinned_rodata_path "${snippet_base}/snippets-pinned-rodata.ld")
1448 # - NOCOPY: this flag indicates that the file data does not need to be copied
1450 # - NOKEEP: suppress the generation of KEEP() statements in the linker script,
1452 # - PHDR [program_header]: add program header. Used on Xtensa platforms.
1484 set(src_list_abs "$<FILTER:${genex_src_list},INCLUDE,^[A-Za-z]\:>")
1485 set(src_list_rel "$<FILTER:${genex_src_list},EXCLUDE,^[A-Za-z]\:>")
1525 # using set_property(APPEND) to produce a ";"-separated CMake list. This way,
1536 # check_dtc_flag("-Wtest" DTC_WARN_TEST)
1545 ${DTC} ${flag} -v
1574 math(EXPR x "${${n}} & (${${n}} - 1)")
1600 # - Normalized board target build string, this includes qualifiers and revision
1601 # - Build string with board variants removed in addition
1602 # - Build string with cpuset removed in addition
1603 # - Build string with soc removed in addition
1607 # If REVISION is supplied or obtained as system wide setting a build string
1608 # with the sanitized revision string will be added in addition to the
1609 # non-revisioned entry for each entry.
1612 # zephyr_build_string(<out-variable>
1614 # [SHORT <out-variable>]
1616 # [BOARD_REVISION <revision>]
1620 # zephyr_build_string(<out-variable>
1626 # <out-variable>: Output variable where the build string will be returned.
1627 # SHORT <out-variable>: Output variable where the shortened build string will be returned.
1629 # BOARD_REVISION <revision>: Board revision to use when creating the build string.
1815 COMMAND ${WEST} blobs list ${BLOBS_VERIFY_MODULE} --format "{status} {abspath}"
1866 # 2. Kconfig-aware extensions
1894 ENCODING "UTF-8"
1958 # 3. CMake-generic extensions
1986 # "<function-name>_ifdef(CONDITION args)"
1990 # <function-name>(args)
1994 # ifdef functions are added on an as-need basis. See
1995 # https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
2293 # 3.3. *_option Compiler-compatibility checks
2297 # cc-option in
2309 # check_compiler_flag(C "-Wall" my_check)
2397 # 'gcc -M'.
2464 if(NOT "${var}" STREQUAL "var-NOTFOUND")
2520 # compiler-cpp targets.
2532 set(APPEND-CPP "APPEND")
2536 set_property(TARGET compiler-cpp ${APPEND} PROPERTY ${COMPILER_PROPERTY_PROPERTY})
2540 # flag and only set the compiler or compiler-cpp property if the check succeeds
2544 # before setting the property on compiler or compiler-cpp targets.
2546 # To test flags together, such as '-Wformat -Wformat-security', an option group
2547 # can be specified by using shell-like quoting along with a 'SHELL:' prefix.
2549 # '"SHELL:-Wformat -Wformat-security"' becomes '-Wformat -Wformat-security' for
2562 set(APPEND-CPP "APPEND")
2578 set_property(TARGET compiler-cpp ${APPEND-CPP} PROPERTY ${property} ${option})
2579 set(APPEND-CPP "APPEND")
2654 # those paths that are defined with `-D<path>=<val>`
2657 # by user with `-D<path>`
2658 # BASE_DIR <base-dir>: convert paths relative to <base-dir>
2665 # [BOARD <board> [BOARD_REVISION <revision>] | NAMES <name> ...]
2672 # - DTS: Overlay files (.overlay)
2673 # - Kconfig: Config fragments (.conf)
2674 # - defconfig: defconfig files (_defconfig)
2679 # BOARD_REVISION <revision>: Find configuration files for specified board
2680 # revision. Requires BOARD to be specified.
2730 # Note: user can do: `-D<var>=<relative-path>` and app can at same
2731 # time specify `list(APPEND <var> <abs-path>)`
2732 # Thus need to check and update only CACHED variables (-D<var>).
2735 # The cached variable is relative path, i.e. provided by `-D<var>` or
2756 Relative paths are only allowed with `-D${ARGV1}=<path>`")
2931 " you should switch to using -DFILE_SUFFIX instead")
3001 COMMAND ${CMAKE_COMMAND} -E ${copy_file_command} ${oldname} ${newname}
3057 # zephyr_string(<mode> <out-var> <input> ...)
3064 # characters. Special characters, such as -, +, =, $, etc. are
3068 # characters. Special characters, such as -, +, =, $, etc. are
3087 string(REGEX REPLACE "[^a-zA-Z0-9_]" "_" work_string ${work_string})
3107 # for storing current and future Zephyr-related extensions for list
3111 # converts the argument list <list> to a ;-list with
3114 # may be whitespace- or semicolon-separated.
3193 # - Sysbuild defined when sysbuild is used.
3196 # - BOARD is considered a global sysbuild cache variable
3197 # - blinky_BOARD is considered a local sysbuild cache variable only for the
3202 # - CMake cache, set by `-D<var>=<value>` or `set(<var> <val> CACHE ...)
3203 # - Environment
3204 # - Locally in CMakeLists.txt before 'find_package(Zephyr)'
3208 # using `-DZEPHYR_TOOLCHAIN_VARIANT=<val>`, then the value from the cache is
3411 # - BOARD
3412 # - SHIELD
3422 # - Using CMake argument, -D<variable>
3423 # - Using an environment variable
3424 # - In the project CMakeLists.txt before `find_package(Zephyr)`.
3434 # E.g. always specifies -D<variable>= on the command line,
3461 # If user uses -D<variable>=<new_value>, then cli_argument will hold the new
3502 message(FATAL_ERROR "${variable} is not being defined on the CMake command-line,"
3557 # Get build targets for a given directory and sub-directories.
3591 # This function allows samples that are multi-image samples by nature to ensure
3605 "For correct user-experiences, please build '${PROJECT_NAME}' "
3629 POST_BUILD COMMAND ${CMAKE_COMMAND} -E true
3638 # RESULT <out-variable>)
3717 # build_info(vendor-specific foo VALUE bar)
3721 # <tag>...: One of the pre-defined valid CMake keys supported by build info or vendor-specific.
3722 # See 'scripts/schemas/build-schema.yml' CMake section for valid tags.
3731 if(index EQUAL -1)
3736 if(index EQUAL -1)
3742 yaml_load(FILE ${ZEPHYR_BASE}/scripts/schemas/build-schema.yml NAME build_info_schema)
3752 list(SUBLIST arg_list ${index} -1 values)
3764 if(ARGV0 STREQUAL "vendor-specific")
3770 if(check MATCHES ".*-NOTFOUND")
3794 # - In CMake, we refer to the nodes using the node's path, therefore
3798 # - As another difference from the C API, you can generally use an
3813 # nvic: interrupt-controller@e000e100 { ... };
3819 # # Sets 'nvic_path' to "/soc/interrupt-controller@e000e100"
3827 # REQUIRED : Generate a fatal error if the node-label is not found
3846 if(${${var}} STREQUAL ${var}-NOTFOUND)
3867 # # alias "does-not-exist".
3868 # dt_alias(path PROPERTY "does-not-exist")
3894 if(${${var}} STREQUAL ${var}-NOTFOUND)
3911 # - absolute path to a node, like '/foo/bar'
3912 # - a node alias, like 'my-alias'
3913 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
3948 # - exists in the devicetree, and
3949 # - has a status property matching the <status> argument
3955 # - absolute path to a node, like '/foo/bar'
3956 # - a node alias, like 'my-alias'
3957 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4009 # - absolute path to a node, like '/foo/bar'
4010 # - a node alias, like 'my-alias'
4011 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4014 # devicetree binding types: string, int, boolean, array, uint8-array,
4015 # string-array, path.
4017 # For array valued properties (including uint8-array and
4018 # string-array), the entire array is returned as a CMake list unless
4029 # dt_prop(reserved_ranges PATH "/soc/gpio@deadbeef" PROPERTY "gpio-reserved-ranges")
4031 # # Node exists and has the "gpio-reserved-ranges" property.
4038 # dt_prop(reserved_ranges PATH "/soc/gpio@deadbeef" PROPERTY "gpio-reserved-ranges")
4040 # # Node "/soc/gpio@deadbeef" exists and has the "gpio-reserved-ranges" property
4153 # Get the number of register blocks in the node's reg property;
4160 # - absolute path to a node, like '/foo/bar'
4161 # - a node alias, like 'my-alias'
4162 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4199 # - absolute path to a node, like '/foo/bar'
4200 # - a node alias, like 'my-alias'
4201 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4204 # - The base address of the register block
4205 # - <var> will be undefined if node does not exists or does not have a register
4235 if(DT_REG_INDEX EQUAL "-1")
4264 # - absolute path to a node, like '/foo/bar'
4265 # - a node alias, like 'my-alias'
4266 # - a node alias followed by a path to a child node, like 'my-alias/child-node'
4295 if(DT_REG_INDEX EQUAL "-1")
4315 dt_prop(reg_names PATH "${path}" PROPERTY "reg-names")
4317 set(index "-1")
4367 if(${exists} STREQUAL exists-NOTFOUND)
4402 if(${${var}} STREQUAL ${var}-NOTFOUND)
4418 # my-label: bar {
4423 # my-alias = &my-label;
4430 # dt_path_internal(ret "my-alias") # sets ret to "/foo/bar"
4431 # dt_path_internal(ret "my-alias/baz") # sets ret to "/foo/bar/baz"
4453 if (NOT "${slash_index}" EQUAL -1)
4454 string(SUBSTRING "${path}" "${slash_index}" -1 rest)
4570 list(APPEND include_opts -isystem ${dir})
4575 list(APPEND source_opts -include ${file})
4580 list(APPEND deps_opts -MD -MF ${DT_PREPROCESS_DEPS_FILE})
4592 -x assembler-with-cpp
4593 -nostdinc
4597 -D__DTS__
4599 -E # Stop after preprocessing
4601 -o ${DT_PREPROCESS_OUT_FILE}
4698 # r: Read-only region
4699 # w: Read-write region
4784 dt_prop(name PATH ${DTS_SECTION_PATH} PROPERTY "zephyr,memory-region")
4787 "\"zephyr,memory-region\" property"
4853 dt_prop(name PATH ${DTS_MEMORY_PATH} PROPERTY "zephyr,memory-region")
4856 "\"zephyr,memory-region\" property"
4861 dt_prop(flags PATH ${DTS_MEMORY_PATH} PROPERTY "zephyr,memory-region-flags")
4924 # +-----------------+
4927 # | +-------------+ |
4929 # | +-------------+ |
4931 # | +-------------+ |
4933 # | +-------------+ |
4935 # +-----------------+
4944 # +---------------------+
4947 # | +-----------------+ |
4950 # | | +-------------+ | |
4952 # | | +-------------+ | |
4954 # | +-----------------+ |
4956 # +---------------------+
5085 - (${CONFIG_SRAM_BASE_ADDRESS} + ${CONFIG_SRAM_OFFSET})"
5147 # of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE.
5181 # ToDo - Should we use ROM, RAM, etc as arguments ?
5360 # `+, -, *` and similar. The expression will go directly into the
5389 # The macro will create a list of argument-value pairs for defined arguments
5591 # - lib_target Target name for the source compilation and/or link step.
5592 # - lib_output The binary file resulting from compilation and/or
5594 # - pkg_input The file to be used as input for the packaging step.
5595 # - pkg_output The final .llext file.
5646 # a "-shared" flag to the linker command line which does firmly
5647 # conflict with "-r".
5705 # they will take care of this and the default copy is replaced by a no-op.
5707 set(noop_cmd ${CMAKE_COMMAND} -E true)
5708 set(copy_cmd ${CMAKE_COMMAND} -E copy ${llext_lib_output} ${llext_pkg_input})
5726 --elf-file ${llext_pkg_output}
5729 set(slid_inject_cmd ${CMAKE_COMMAND} -E true)
5732 # Type-specific packaging of the built binary file into an .llext file
5738 COMMAND ${CMAKE_COMMAND} -E copy ${llext_pkg_input} ${llext_pkg_output}
5776 # Add user-visible target and dependency, and fill in properties
5799 # can refer to <target>'s properties for build-specific details.
5802 # - PRE_BUILD: Before the llext code is linked, if the architecture uses
5805 # - POST_BUILD: After the llext code is built, but before packaging
5808 # - POST_PKG: After the .llext file has been created. This can operate on
5811 # Anything else after COMMAND will be passed to add_custom_command() as-is
5816 # COMMAND and other options are passed to add_custom_command() as-is
5839 # - execute user command(s) before the lib target's link step.
5844 # - stop default file copy to prevent user files from being clobbered;
5845 # - execute user command(s) after the (now empty) `llext_proc_target`.
5851 # - execute user command(s) after the main target is done.
5919 # are: package_helper.cmake, verify-toolchain.cmake