/Zephyr-latest/doc/develop/toolchains/ |
D | custom_cmake.rst | 3 Custom CMake Toolchains 6 To use a custom toolchain defined in an external CMake file, :ref:`set these 11 toolchain's CMake configuration files. 13 Zephyr will then include the toolchain cmake files located in the 16 - :file:`cmake/toolchain/<toolchain name>/generic.cmake`: configures the 20 - :file:`cmake/toolchain/<toolchain name>/target.cmake`: configures the 26 See the zephyr files :zephyr_file:`cmake/modules/FindHostTools.cmake` and 27 :zephyr_file:`cmake/modules/FindTargetTools.cmake` for more details on what your 28 :file:`generic.cmake` and :file:`target.cmake` files should contain. 30 You can also set ``ZEPHYR_TOOLCHAIN_VARIANT`` and ``TOOLCHAIN_ROOT`` as CMake [all …]
|
/Zephyr-latest/doc/build/ |
D | zephyr_cmake_package.rst | 3 Zephyr CMake Package 6 The Zephyr `CMake package`_ is a convenient way to create a Zephyr-based application. 12 The Zephyr CMake package ensures that CMake can automatically select a Zephyr installation to use f… 20 To use the Zephyr CMake package it must first be exported to the `CMake user package registry`_. 22 CMake user package registry. 29 In Linux, the CMake user package registry is found in: 31 ``~/.cmake/packages/Zephyr`` 35 In macOS, the CMake user package registry is found in: 37 ``~/.cmake/packages/Zephyr`` 41 In Windows, the CMake user package registry is found in: [all …]
|
/Zephyr-latest/tests/cmake/zephyr_get/ |
D | CMakeLists.txt | 8 list(APPEND CMAKE_MODULE_PATH "${ZEPHYR_BASE}/cmake/modules") 11 # Project mode initialization (main CMake invocation) 27 # at the end, either here or in sysbuild.cmake. 100 set(VARIABLE "cmake cache" CACHE INTERNAL "") 103 # CMake cache value has the highest precedence. 105 assert_equal(VARIABLE "cmake cache") 135 set(TESTCASE_VARIABLE "cmake cache" CACHE INTERNAL "") 140 IMAGE no_sysbuild "cmake cache" 189 set(VARIABLE "cmake cache" CACHE INTERNAL "") 193 assert_equal(VARIABLE "cmake cache;environment;local") [all …]
|
/Zephyr-latest/cmake/modules/ |
D | FindTargetTools.cmake | 30 # Prevent CMake from testing the toolchain 34 # https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html: 35 # The name of the operating system for which CMake is to build. 37 # https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling: 39 # system, i.e. the same as CMAKE_SYSTEM_NAME would have if CMake would run 42 # like Linux.cmake or Windows-gcc.cmake. If your target is an embedded 46 # https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html: 47 # The name of the CPU CMake is building for. 49 # https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling: 53 # CMAKE_SYSTEM_NAME-compiler-CMAKE_SYSTEM_PROCESSOR.cmake file, [all …]
|
D | zephyr_default.cmake | 5 # This CMake module will load all Zephyr CMake modules in correct order for 9 # See individual CMake module descriptions 13 # The code line below defines the real minimum supported CMake version. 15 # Unfortunately CMake requires the toplevel CMakeLists.txt file to define the 16 # required version, not even invoking it from a CMake module is sufficient. 22 # Different CMake versions can have very subtle differences, for 23 # instance CMake 3.21 links object files in a different order compared 24 # to CMake 3.20; this produces different binaries. 25 message(STATUS "CMake version: ${CMAKE_VERSION}") 53 # Test and error-out if we are affected by the PyPI CMake 3.22.1 / 3.22.2 bug [all …]
|
/Zephyr-latest/scripts/west_commands/ |
D | export.py | 13 This command registers the current Zephyr installation as a CMake 14 config package in the CMake user package registry. 16 In Windows, the CMake user package registry is found in: 17 HKEY_CURRENT_USER\\Software\\Kitware\\CMake\\Packages\\ 19 In Linux and MacOS, the CMake user package registry is found in: 20 ~/.cmake/packages/''' 29 'export Zephyr installation as a CMake config package', 45 self.run_cmake_export(share / 'zephyr-package' / 'cmake') 46 self.run_cmake_export(share / 'zephyrunittest-package' / 'cmake') 52 # CMake status messages and instead only prints the important [all …]
|
D | zcmake.py | 4 '''Common definitions for building Zephyr applications with CMake. 27 '''Name of the default CMake generator.''' 31 '''Run cmake to (re)generate a build system, a script, etc. 33 :param args: arguments to pass to CMake 34 :param cwd: directory to run CMake in, cwd is default 40 :param env: used adjusted environment when running CMake 44 cmake = shutil.which('cmake') 45 if cmake is None and not dry_run: 46 log.die('CMake is not installed or cannot be found; cannot build.') 47 _ensure_min_version(cmake, dry_run) [all …]
|
/Zephyr-latest/cmake/compiler/gcc/ |
D | target.cmake | 5 # Configures CMake for using GCC, this script is re-used by several 22 # with C++ support just set it to something so CMake doesn't 63 include(${ZEPHYR_BASE}/cmake/gcc-m-cpu.cmake) 64 include(${ZEPHYR_BASE}/cmake/gcc-m-fpu.cmake) 67 include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_arm.cmake) 69 include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_arm64.cmake) 71 include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_arc.cmake) 73 include(${CMAKE_CURRENT_LIST_DIR}/target_riscv.cmake) 75 include(${CMAKE_CURRENT_LIST_DIR}/target_x86.cmake) 77 include(${CMAKE_CURRENT_LIST_DIR}/target_sparc.cmake) [all …]
|
/Zephyr-latest/cmake/ |
D | target_toolchain_flags.cmake | 12 # * CMAKE_C_COMPILER_ID is taking the CMake compiler id for extra signature. 30 include(${CMAKE_CURRENT_LIST_DIR}/compiler/compiler_features.cmake) 36 include(${CMAKE_CURRENT_LIST_DIR}/compiler/compiler_flags_template.cmake) 37 include(${CMAKE_CURRENT_LIST_DIR}/linker/linker_flags_template.cmake) 38 include(${CMAKE_CURRENT_LIST_DIR}/linker/linker_libraries_template.cmake) 42 include(${TOOLCHAIN_ROOT}/cmake/compiler/${COMPILER}/compiler_flags.cmake OPTIONAL) 43 include(${TOOLCHAIN_ROOT}/cmake/linker/${LINKER}/linker_flags.cmake OPTIONAL) 46 include(${TOOLCHAIN_ROOT}/cmake/linker/linker_libraries_native.cmake) 48 include(${TOOLCHAIN_ROOT}/cmake/linker/${LINKER}/linker_libraries.cmake OPTIONAL)
|
D | package_helper.cmake | 6 # to the Zephyr CMake package and module structure. 9 # build tool that is executed during CMake configure time without creating a 12 # It does so by loading the Zephyr CMake modules specified with the 'MODULES' 15 # This script executes the given module identical to Zephyr CMake configure time. 22 # For example, if you were invoking CMake for 'hello_world' sample as: 23 # $ cmake -DBOARD=<board> -B build -S samples/hello_world 26 # $ cmake -DBOARD=<board> -B build -S samples/hello_world \ 27 # -DMODULES=dts -P <ZEPHYR_BASE>/cmake/package_helper.cmake 30 # If you invoke CMake for 'hello_world' as: 32 # $ cmake -DBOARD=<board> -B build -S samples/hello_world -DEXTRA_CONF_FILE=foo.conf [all …]
|
/Zephyr-latest/doc/contribute/style/ |
D | cmake.rst | 5 CMake Style Guidelines 15 within a CMake file. 20 .. code-block:: cmake 35 - **Lowercase Commands**: Always use **lowercase** CMake commands (e.g., 39 .. code-block:: cmake 50 .. code-block:: cmake 64 - **Use Uppercase for Cache Variables or variables shared across CMake files**: 68 .. code-block:: cmake 73 - **Use Lowercase for Local Variables**: For local variables within CMake 76 .. code-block:: cmake [all …]
|
/Zephyr-latest/doc/develop/sca/ |
D | index.rst | 6 Support for static code analysis tools in Zephyr is possible through CMake. 20 Support for an SCA tool is implemented in a :file:`sca.cmake` file. 21 The :file:`sca.cmake` must be placed under :file:`{SCA_ROOT}/cmake/sca/{tool}/sca.cmake`. 31 └── cmake/ 34 └── sca.cmake # CMake code that configures the tool to be used with Zephyr 36 To add ``foo`` under ``/path/to/my_tools/cmake/sca`` create the following structure: 41 └── cmake/ 44 └── sca.cmake 50 :makevar:`SCA_TOOL` can be set as a regular CMake setting using
|
/Zephyr-latest/share/zephyr-package/cmake/ |
D | zephyr_export.cmake | 3 # Purpose of this CMake file is to install a ZephyrConfig package reference in: 4 # Unix/Linux/MacOS: ~/.cmake/packages/Zephyr 9 # Create the reference by running `cmake -P zephyr_export.cmake` in this directory. 15 …"HKEY_CURRENT_USER\\Software\\Kitware\\CMake\\Packages\\Zephyr\;${MD5_SUM}" "${CMAKE_CURRENT_LIST_… 18 file(WRITE $ENV{HOME}/.cmake/packages/Zephyr/${MD5_SUM} ${CMAKE_CURRENT_LIST_DIR}) 24 message("HKEY_CURRENT_USER\\Software\\Kitware\\CMake\\Packages\\Zephyr\n") 26 message("~/.cmake/packages/Zephyr\n")
|
/Zephyr-latest/share/zephyrunittest-package/cmake/ |
D | zephyr_export.cmake | 3 # Purpose of this CMake file is to install a ZephyrUnittestConfig package reference in: 4 # Unix/Linux/MacOS: ~/.cmake/packages/ZephyrUnittest 9 # Create the reference by running `cmake -P zephyr_export.cmake` in this directory. 15 …"HKEY_CURRENT_USER\\Software\\Kitware\\CMake\\Packages\\ZephyrUnittest\;${MD5_SUM}" "${CMAKE_CURRE… 18 file(WRITE $ENV{HOME}/.cmake/packages/ZephyrUnittest/${MD5_SUM} ${CMAKE_CURRENT_LIST_DIR}) 24 message("HKEY_CURRENT_USER\\Software\\Kitware\\CMake\\Packages\\ZephyrUnittest\n") 26 message("~/.cmake/packages/ZephyrUnittest\n")
|
/Zephyr-latest/boards/seeed/xiao_ble/ |
D | board.cmake | 7 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 8 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 9 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 10 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) 11 include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) 12 include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) 13 include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
/Zephyr-latest/tests/cmake/yaml/ |
D | CMakeLists.txt | 6 # Project mode initialization (main CMake invocation) 10 message(STATUS "Run 1 -------------\n CMake PROJECT mode\n----------------------") 14 list(APPEND CMAKE_MODULE_PATH "${ZEPHYR_BASE}/cmake/modules") 16 message(STATUS "Run 2 ------------\n CMake SCRIPT mode\n---------------------") 53 yaml_get(actual NAME yaml-test KEY cmake test key-string) 62 yaml_length(actual NAME yaml-test KEY cmake test key-list-string) 68 yaml_get(actual NAME yaml-test KEY cmake test key-list-string) 79 yaml_get(actual NAME yaml-test KEY cmake test key-int) 88 yaml_length(actual NAME yaml-test KEY cmake test key-list-int) 94 yaml_get(actual NAME yaml-test KEY cmake test key-list-int) [all …]
|
/Zephyr-latest/boards/nordic/nrf9160dk/ |
D | board.cmake | 13 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 14 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 15 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 18 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 19 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 20 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 21 include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
/Zephyr-latest/boards/croxel/croxel_cx1825/ |
D | board.cmake | 5 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 6 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 7 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 8 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 9 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) 10 include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
/Zephyr-latest/boards/adafruit/itsybitsy/ |
D | board.cmake | 3 include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake) 6 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 7 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 8 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 9 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) 10 include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
/Zephyr-latest/boards/rakwireless/rak5010/ |
D | board.cmake | 6 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 7 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 8 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 9 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) 10 include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake) 11 include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
/Zephyr-latest/doc/develop/getting_started/ |
D | installation_linux.rst | 79 sudo apt-get install --no-install-recommends git cmake ninja-build gperf \ 89 sudo dnf install cmake ninja-build gperf dfu-util dtc wget which \ 102 flags. Zephyr's CMake build system will either warn or fail because of 121 sudo pacman -S git cmake ninja gperf ccache dfu-util dtc wget \ 124 CMake subsection 127 A :ref:`recent CMake version <install-required-tools>` is required. Check what 128 version you have by using ``cmake --version``. If you have an older version, 133 to get an updated version of cmake using apt. 135 * Download and install a packaged cmake from the CMake project site. 136 (Note this won't uninstall the previous version of cmake.) [all …]
|
/Zephyr-latest/doc/build/sysbuild/ |
D | images.rst | 18 Applications can add sysbuild images using the ``sysbuild.cmake`` file in the application 25 Boards can add sysbuild images by using the ``sysbuild.cmake`` file in the board directory, the 31 SoCs can add sysbuild images by using the ``sysbuild.cmake`` file in the soc directory. 36 :ref:`modules` can add sysbuild images with the ``sysbuild-cmake`` and ``sysbuild-kconfig`` 77 .. group-tab:: ``sysbuild.cmake`` 79 .. code-block:: cmake 163 .. group-tab:: ``sysbuild.cmake`` 165 .. code-block:: cmake 217 As can be seen, no additional CMake changes are needed to add an alternative image as the base 218 CMake code will add the replacement image instead of the original image, if selected. [all …]
|
/Zephyr-latest/boards/ct/ctcc/ |
D | board.cmake | 6 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 7 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 8 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) 18 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 19 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 20 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
/Zephyr-latest/tests/cmake/overlays/soc_folder_kconfig/ |
D | testcase.yaml | 3 - cmake 11 buildsystem.cmake.overlays.soc_folder_kconfig.default: 14 buildsystem.cmake.overlays.soc_folder_kconfig.suffix: 18 buildsystem.cmake.overlays.soc_folder_kconfig.conf: 22 buildsystem.cmake.overlays.soc_folder_kconfig.suffix.conf:
|
/Zephyr-latest/boards/sparkfun/micromod/ |
D | board.cmake | 6 include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake) 7 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) 8 include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake) 9 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) 10 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|