Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zephyr Build info file #79118

Merged
merged 6 commits into from
Oct 8, 2024
Merged

Commits on Oct 7, 2024

  1. cmake: define ZEPHYR_TOOLCHAIN_PATH

    Other toolchains uses <toolchain>_TOOLCHAIN_PATH, align Zephyr SDK
    by setting ZEPHYR_TOOLCHAIN_PATH to be identical to the
    ZEPHYR_SDK_INSTALL_DIR.
    
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    tejlmand committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    2204dca View commit details
    Browse the repository at this point in the history
  2. cmake: move script mode handling from package helper to extensions.cmake

    Move Zephyr CMake script mode handling from package_helper.cmake into
    extensions.cmake.
    
    This ensures that all Zephyr CMake script which includes
    extensions.cmake will have the same functions stubbed or mocked and thus
    does not need to replicate this behavior.
    
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    tejlmand committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    ffa017e View commit details
    Browse the repository at this point in the history
  3. cmake: introduce build_info function

    The build_info function provides a generic and stable way of dumping
    build information to the <build>/build_info.yml file.
    
    The build info file is in YAML format and the keys in the file are
    intended to be stable, as to allow external tools to retrieve
    information regarding the build.
    
    The main differences to the CMakeCache.txt are:
    - Settings in the CMakeCache.txt are user controlled, whereas the
      information in the build info file is intended to be those values
      which are used by the build system regardless if those are specified
      by the developer or picked up automatically.
    - Internal build system variables are not present in the CMake cache
      and should not be, because their values are calculated when CMake
      runs.
    
    This also has the benefits of decoupling CMake variable names from
    build info keys. Several CMake variables has internal build system
    names, and the build system is free to rename those at its own
    discretion.
    
    Having dedicated key names ensures a stable API that external tools can
    rely upon.
    
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    tejlmand committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    3510046 View commit details
    Browse the repository at this point in the history
  4. west: support build info file for west build

    For pristine builds 'west build' will now create a build_info.yml file
    containing the west build command including arguments.
    
    This is done to help users and external tools to recreate builds.
    
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    tejlmand committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    9fc81f9 View commit details
    Browse the repository at this point in the history
  5. cmake: support build info in Zephyr

    Store informations regarding the current Zephyr build.
    The following informations are stored during CMake configure:
    - Board information
    - Application source directory
    - Application configuration directory
    - Toolchain information
    - Devicetree files
    - Kconfig config files
    - Zephyr version
    
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    tejlmand committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    47c5b7f View commit details
    Browse the repository at this point in the history
  6. cmake: nordic: save build information regarding SVD file used.

    Save information regarding SVD file in use in vendor-specific section
    of the build info file.
    
    Information is stored under Nordic section.
    
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    tejlmand committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    93866cb View commit details
    Browse the repository at this point in the history