Commit graph

7 commits

Author SHA1 Message Date
Marcin Szymczyk d2b3e3a389 sysbuild: add SoC-specific sysbuild configuration
Sysbuild now supports SoC configuration,
in addition to application and board.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-10 17:53:24 +02:00
Jamie McCrae 9f71b8023b sysbuild: Add support for COMPILER_WARNINGS_AS_ERRORS
Adds support for the Kconfig option to enable compiler warnings
being treated as errors in all images that are build. This is a
sticky-set option which means enabling it in sysbuild will
enable it in all images, if it is then disabled in sysbuild it
will not be disabled in any of the images as a result and would
need to be manually unselected.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-18 15:41:53 +01:00
Torsten Rasmussen e2ff2a88ba sysbuild: include HWMv2 Kconfig in sysbuild
Including HWMv2 Kconfig in sysbuild allows sysbuild to introduce
configuration options or defaults based on selected board and SoC.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-03-04 15:27:09 +00:00
Grzegorz Swiderski 4cfea45c44 sysbuild: Make the image processing order well-defined
Adjust the order in which image-specific `sysbuild.cmake` files are
iteratively included by sysbuild.

This is motivated by the introduction of `sysbuild_add_dependencies()`.
In the following example:

  sysbuild_add_dependencies(CONFIGURE my_sample sample_a sample_b)

the `my_sample` image is expected to be added before this function is
called. Success depends not only on the placement of the call, but on
the order in which new images are added, which itself is influenced by
the order in which `sysbuild.cmake` files are included. This last order
can be tweaked to make the "dependencies" feature more user-friendly.

This is done by rewriting the internal `sysbuild.cmake` processing loop
into a new, general purpose function - `sysbuild_add_subdirectory()` -
which is a wrapper for `add_subdirectory(<source_dir>)` that recursively
includes `sysbuild.cmake` files for all images found in `<source_dir>`.

With the new function, all images that are expected to be found in a
given `<source_dir>` are guaranteed to be added around the same time.
This wasn't the case with the old processing loop, because the image-
specific `sysbuild.cmake` files (where "sub-images" could be defined)
were left to be processed at the very end.

Below is the initial order in which sysbuild will add all images.
Note: the order of Zephyr modules (from 1 to n) is well-defined.

  1. Main application (aka DEFAULT_IMAGE)
  2. MCUboot (optional)
  3. All images added via these directories:
     3.1. <module-1>.sysbuild-cmake
     3.2. <module-2>.sysbuild-cmake
     ...
     3.n. <module-n>.sysbuild-cmake

  4. All images added via these files:
     4.1. ${BOARD_DIR}/sysbuild.cmake
     4.2. ${APP_DIR}/sysbuild.cmake (aka sub-images of DEFAULT_IMAGE)

These images are intended to be sorted for the users' convenience, from
most to least important in the build system, or least to most dependent
on other images for configuration (potentially).

Finally, the use of `sysbuild_add_subdirectory()` requires updating the
directory structure in sysbuild:

  ./images
    - All images should belong here. The `DEFAULT_IMAGE` should be the
      first and only image at the top level, so that it gets added first
      and its sub-images get added last.

  ./images/bootloader
    - Moved from ./bootloader.

  ./images/boards
    - Adds images from the board-specific `sysbuild.cmake` file.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Jamie McCrae df9027a64a sysbuild: support Zephyr modules
This commit extends the Zephyr module yaml scheme with additional
entries for sysbuild in the build section.

This allows for Zephyr modules to extend the sysbuild infrastructure
by providing additional CMake and Kconfig files to be included in
sysbuild.

The new settings are:
build:
  sysbuild-cmake: <path>
  sysbuild-kconfig: <path>/<file>
  sysbuild-ext: <true>|<false>
  sysbuild-kconfig-ext:  <true>|<false>

those settings follow the same pattern as the equivalent Zephyr build
settings but are processed by sysbuild.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-03-09 09:25:00 +01:00
Torsten Rasmussen 3d520dde2b cmake: support MCUBoot bootloader natively with SYSBuild
This commit adds CMake and Kconfig files needed to build MCUboot as
an extra image using SYSBuild.

Building an application with MCUBoot using SYSBuild allows users to
build both images using a single build.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 9d6cc39d6f cmake: initial sysbuild / multi image support
This is the initial commit with system build, sysbuild.

Using CMake as infrastructure together with the Zephyr sysbuild allows
us to support a convenient way of building a sample and allow for extra
images to be built as part of a larger system.

It uses Kconfig for configuration of image builds.
This allows for future extension with additional build images.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00