Like QEMU_CPU_TYPE_${ARCH}, this was indexed by an architecture that is
fixed for any one build, so the suffix distinguished nothing. The name
also said nothing about who owns the variable, even though its whole
purpose is to hold what the board contributes: the machine, the CPU, the
memory size, and whatever board specific devices come with them.
Rename it to QEMU_BOARD_FLAGS, which reads as the counterpart of the
existing QEMU_EXTRA_FLAGS, and reject the old name at configure time. An
out-of-tree board left on the old spelling would otherwise lose its
-machine argument silently.
Update the icount guard added earlier to match, and verify it still
rejects a board that appends -icount to the renamed variable.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
QEMU_CPU_TYPE_${ARCH} was indexed by architecture, but a build has
exactly one board and therefore exactly one ARCH, so the suffix
distinguished nothing. It only forced every board and the run target's
progress message to spell the same interpolation.
Rename it to QEMU_CPU_TYPE, and reject the old name at configure time so
an out-of-tree board does not silently end up with an empty progress
message.
Also record what the variable is for. Seven boards (cortex_a72,
cortex_a9, cortex_r5, leon3, malta, or1k, riscv32_xip) set it and never
pass -cpu, because their -machine already implies the CPU. It is not a
QEMU argument: the emulator code only reports it. Boards that do want a
-cpu argument reference it when composing QEMU_FLAGS_${ARCH}. That is
worth stating, since the name suggests it is what gets passed.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Raise the minimum required CMake version from 3.20.0 (documented as
3.20.5) to 3.28.0, which is satisfied by the CMake 3.28.3 package
shipped in the Ubuntu 24.04 LTS repositories. Ubuntu 24.04 is the
current Ubuntu LTS release targeted by the Zephyr getting started
guide, and by the time of the next Zephyr release, Ubuntu 22.04 will be
within months of its end of standard support. Users of distributions
shipping an older CMake can use the Kitware APT repository or a
pip-installed CMake, as the documentation already suggests.
Raising the floor to 3.28 unlocks a range of modern CMake features for
the build system, among which the cmake_file_api() command (3.27),
file(COPY_FILE) (3.21), block()/endblock() (3.25), and allows removal
of several version-conditional workarounds.
The tree-wide cmake_minimum_required() occurrences in samples, tests
and boards are updated accordingly, together with the documentation
and the sysbuild CMake presets. The IAR C-STAT integration keeps its
own higher requirement (4.1.0).
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Rename the test metadata file(s) in this area from testcase.yaml to
tests.yaml so sample and test metadata share one consistent filename
across the tree. Pure rename, no content change.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove Kconfig settings in tests/ .conf files that have no effect:
- Driver/subsystem enables that are already `default y` and gated by a
`DT_HAS_<compat>_ENABLED` dependency.
- Board/SoC overlay (boards/<board>.conf, socs/<soc>.conf) lines that
duplicate, with the same value, an option already set in the test's
prj.conf.
Assisted-by: Claude:opus-4.8
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a CMake-only test that drives section_to_string() with a
NOINPUT=TRUE section and checks the generated scatter block.
The test supports both Twister build_only mode and standalone
'cmake -P' invocation via a CMAKE_SCRIPT_MODE_FILE guard.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The DTS file `mps2_an521_cputest.dts` includes `arm/armv8-m.dtsi` which in
turn includes `skeleton.dtsi` - as such, `#address-cells` and `#size-cells`
properties of the root node are already set to 1 and it's useless to set
these properties again.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
gen_offset.h is an architecture-specific header, not a kernel one.
Move it under the arch tree where it belongs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add support for providing multiple .conf and .overlay files for a given
snippet. This uses the standard syntax of a space or semi-colon
separated list in the snippets.yml file for EXTRA_CONF_FILE,
EXTRA_DTC_OVERLAY_FILE, and SB_EXTRA_CONF_FILE. In other areas of the
build system these variables already take such a list, so this provides
a more consistent syntax in the snippets case.
Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
This commit adds EXTRAVERSION to code through version.h.
This aligns the symbols available in code with those available
in the VERSION file.
Signed-off-by: Adrian Bieri <adrian.bieri@loepfe.com>
The driver implements the QEMU ramfb as a framebuffer-based display.
It only implements the basic capabilities necessary (ARGB8888) with
resolution configurable via DTS. For initialization it uses the fwcfg
driver.
Signed-off-by: Maximilian Zimmermann <gitmz@posteo.de>
Add an optional DEPENDS parameter to zephyr_constants_library() that
lists other constants libraries whose generated headers must be
produced before this library is compiled. This creates proper build
ordering through add_dependencies() on the header-generation targets.
A build test with four constants libraries exercising various
dependency patterns (fan-in, fan-out, diamond) validates this.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Apply chnages from dts-linter 0.3.9.
Improve compliance with DTS Coding Style which says that:
4) Hex values in properties, e.g. “reg”, shall use lowercase hex.
The address part can be padded with leading zeros.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Zephyr `<type>_ROOT`s, such as `BOARD_ROOT`, `DTS_ROOT`, `SCA_ROOT`,
are initialed by ROOT settings provided through CMake variable
`<type>_ROOT`, Zephyr base, and root settings specified in Zephyr
module's `zephyr/module.yml` file.
`SNIPPET_ROOT` didn't follow the same pattern as it also included
application source dir.
This commit aligns `SNIPPET_ROOT` to follow same principle for
constructing other Zephyr `<type>_ROOT` lists.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes the Kconfig name of this so that it matches the value from
soc.yml, this has not been deprecated because this SoC is a virtual
SoC used only with the boards in zephyr meaning it should not cause
any breakage of out-of-tree boards
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a check that snippets are correctly applied to named boards
with the correct board revision
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
With the new LV_Z_POINTER_FROM_CHOSEN_TOUCH most boards do not need to
specify a dedicated pseudo device anymore.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Trivial fix to the Kconfig descriptions in the cmake snippet tests so
that they match the actual snippet names.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Switching the intermediate file format from JSON to YAML has a very
significant benefit: the file is now loaded via yaml_load(), which
internally calls Python to parse the file into the JSON format that
CMake expects. This means that the file contents are now automatically
escaped properly for JSON; it is a huge improvement over the previous
implementation, which was escaping everything given as input to
to_yaml().
With the removal of the now-redundant call in to_yaml(), escaping is
applied exactly once per value or list, when it is passed to yaml_set().
This allows to convert the logic in zephyr_string(ESCAPE ...) to a more
robust "escape everything" approach.
These changes fix the handling of strings with backslashes and different
types of quotes passed either directly or via generator expression. The
existing tests are updated to cover these cases.
Two other small changes are made in this commit:
- a small check in internal_yaml_list_append() is removed, as the same
issue is already detected by the caller yaml_set() logic.
- the to_yaml() function is modified to initialize the YAML output
variable at the top level, which is the expected behavior. This
resulted in genex temp files sometimes having duplicate lines.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Store strings in YAML as single-quoted entries to avoid issues with
special characters. This also fixes a quirk with the current test
suite where the quotes in the expected value are filtered out by the
YAML import.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Migrates mps2 targets away from the pinmux driver to
the new pinctrl driver.
Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.
And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.
Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
terminal to PTY instead of PTTY.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Including renaming the DTS binding and kconfig options
deprecating the old one.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Rename the driver files, binding and kconfig options, while deprecating
the old binding and kconfig options.
Uses in tree are replaced.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The current implementation requires SoCs/Boards to manualy instantiate
the preripherals and initilize them.
The change lets Zephyr rely on the device tree setup to instantiate &
initialize the relevant gpio peripheral.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
This commit introduce support for maps in a yaml list.
The yaml_set() function has been extended with the following signature:
> yaml_set(NAME <name> KEY <key>...
> [APPEND] LIST MAP <map1> MAP <map2> MAP ...
> )
where a `MAP <map>` has the form:
`MAP "<key1>: <value1>, <key2>: <value2>, ...`
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add tests to the YAML suite for generator expressions. The test checks
that generator expressions are handled as expected at different stages:
- immediately after yaml_save(), the file must contain only non-genex
entries;
- at a later time, after the target has been built, the file must
contain all the expanded genex values.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
To verify proper functionality, the YAML module test suite is now run
twice: once in the regular CMake project mode and once in the CMake
script mode.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This introductory commit removes the ignored 'actual' variable from the
'yaml_set()' calls in the tests to make the code cleaner. Also, a badly
indented block is fixed in the 'message()' macro.
No functional change is introduced by this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This reverts commit f24f5288f3.
as it's part of a series of commits causing issues on Windows
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit introduce support for maps in a yaml list.
The yaml_set() function has been extended with the following signature:
> yaml_set(NAME <name> KEY <key>...
> [APPEND] LIST MAP <map1> MAP <map2> MAP ...
> )
where a `MAP <map>` has the form:
`MAP "<key1>: <value1>, <key2>: <value2>, ...`
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Prevents sysbuild from being used as this adds a local snippet root
which should only be used (and tested) by application
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Re-run the zephyr_get() testsuite in script mode after the project
mode testsuite has been executed. This is to ensure that the
zephyr_get() function works correctly in script mode as well.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Targets are not available in script mode.
To support the Zephyr scoping feature used by snippets and yaml module
then this commit moves from using custom targets to use GLOBAL
properties for scopes.
A scope property is prefixed with `<scope>:<property>` to avoid naming
collisions.
A `scope:<scope-name>` global property is used to track created scopes.
Tracking valid scopes ensure that properties are only set on known
scopes and thus catches typos / naming errors.
Add zephyr_scope_exists() and zephyr_get_scoped() to abstract the
implementation details of the scoped property retrieval and refactor
current code to use them.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>