Commit Graph

621 Commits

Author SHA1 Message Date
Carles Cufi 9643ca20e9 nordic: Remove the nRF54H20 Engineering B
The production version of the nRF54H20 SoC is now available, so remove
the initial Engineering B (EngB) preview version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-16 15:09:14 -05:00
Grzegorz Swiderski 8fc161f820 west: runners: nrf: Check for missing UICR
On nRF54H and nRF92, booting certain cores requires programming a UICR,
which is normally generated using nrf-regtool. This should be considered
an optional dependency, because we do not wish to force non-Nordic users
to install it just to work with Zephyr, or just for build-only tests.

When nrf-regtool is not installed, a CMake warning will be displayed,
but people ignore warnings all the time. As the last line of defense,
check for missing UICR in the nrfutil flash runner, to prevent our users
from unintentionally programming unbootable firmware. Show a fatal error
specifically if CONFIG_NRF_REGTOOL_GENERATE_UICR=y, yet no UICR exists.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-06 16:39:09 -06:00
Luca Burelli ba58b066d4 west build: fix a leftover "log" reference in build.py
A recent commit changed all references to the global 'west.log' instance
(now deprecated) to the new WestCommand logging API, but another PR
merged in the same period added an extra instance that is now causing CI
to fail. Convert this last reference to the new API.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:07:13 -08:00
Luca Burelli 6c2bc2ff37 west build: warn about conditional flags in 'extra_configs'
The 'west build' command does not know about conditional flags (in the
format 'type:value:CONFIG_FOO=bar') in the 'extra_configs' argument of
Twister testcase.yaml files, and currently converts them to malformed
arguments that are silently ignored by cmake.

This change adds a check to 'west build' to clearly warn the user if the
'extra_configs' list contains conditional flags and provide a hint on
how to add them to the CMake command line.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:07:13 -08:00
Lukasz Mrugala 4bb945300b scripts: twister: Python Version Guard
Twister shall now verify that the user does not
use an obsolete Python version. If user's Python
is deemed too old, it will raise a relevant error.
This check will also happen when running Twister
via west.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-11-04 17:24:24 -05:00
Reto Schneider 743761d7d1 scripts: Fix CMake spelling
As per its creators, CMake is written with a capital "M".

The initial reason for this change is that I want Twister to print
"ERROR : CMake build failure" instead of "ERROR : Cmake build failure".

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-30 16:32:24 -05:00
Grzegorz Swiderski 276c1fc4a0 scripts: Undo Board.{dir -> directories[0]} renames
`Board.dir` can be used in place of `Board.directories[0]` for brevity.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Jamie McCrae a04dfc4ece scripts: west_commands: run: Add priority to run once config
Adds an optional priority parameter to the flash runner run once
configuration which allows for deciding upon which file should
ultimately be used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Torsten Rasmussen 536d34fa7a cmake: scripts: support board extension
Fixes: #69548

Support extending an existing board with new board variants.

This commit introduces the following changes to allow a board to be
extended out-of-tree.

The board yaml schema is extended to support an extend field which
will be used to identify the board to be extended.

A board 'plank' can be extended like this:
> board:
>   extend: plank
>   variants:
>     - name: ext
>       qualifier: soc1

For the rest of the build system this means that there is no longer a
single board directory.
The existing CMake variable BOARD_DIR is kept and reference the
directory which defines the board.
A new CMake variable BOARD_DIRECTORIES provides a list of all
directories which defines board targets for the board.
This means the directory which defines the board as well as all
directories that extends the board.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Pieter De Gendt c2b6bcc660 scripts: west_commands: build: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-26 11:30:59 +02:00
Pieter De Gendt 8b0edb2b22 scripts: west_commands: sign: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-26 11:30:49 +02:00
Pieter De Gendt 46cc7a054d scripts: west_commands: spdx: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-26 11:30:29 +02:00
Carles Cufi 0705a6301c west: runners: nrf: Add support for the suit manifest starter
With the recent introduction of the SUIT manifest starter binary blob,
it is now possible to use it with the nRF54H20 during the flashing
procedure in order to provide a valid SUIT manifest to the system.

This PR introduces the code that handles programming the SUIT manifest
starter, as well as a new --suit-manifest-starter command-line option.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-25 22:43:19 +01:00
Pieter De Gendt 1759967597 scripts: west_commands: runners: Fix jlink is_ip
Commit f987e8c6f0 introduced a regression
where the is_ip check fails if no --id is passed as an argument.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-24 14:04:44 +02:00
Michael Arnold 3b6555a992 runners: jlink: Make port selectable for J-Link IP
If multiple J-Links with IP support are used,
they can be selected with different ports.
The actual implementation is just using the default port.
Make the port selectable with <ip>:<port>.

Signed-off-by: Michael Arnold <marnold@baumer.com>
2024-10-23 15:34:25 -05:00
Appana Durga Kedareswara rao 99a998a161 scripts: west_commands: tests: add pytest for xsdb runner
Add pytest case for xsdb runner.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2024-10-23 11:34:24 +02:00
Appana Durga Kedareswara rao 1708837e7b runners: add support for xsdb (Xilinx System Debugger)
Add support for xsdb(Xilinx System Debugger) used with AMD's FPGA
and SOC platforms, it is a user-friendly, interactive, and scriptable
command line interface, by design choice it's expected that platforms
to have xsdb scripts present inside their platform code.

xsdb runner has bitstream and fsbl optional arguments, bitstream is
needed for fpga targets and fsbl is needed for SOC targets, added
support for both options.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2024-10-23 11:34:24 +02:00
Pieter De Gendt 73d04a4959 scripts: west_commands: tests: Keep runners list sorted
Sort list and add CI tags.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-21 18:36:10 -05:00
Pieter De Gendt c22323fd51 scripts: west_commands: Keep runners list sorted
Sort the list and add check tags for CI.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-21 18:36:10 -05:00
Phi Bang Nguyen 829c03bcdc runners: jlink: Fix NoneType object error
The commit 221199e15b presents a bug that
makes west flash failed with error.

AttributeError: 'NoneType' object has no attribute 'startswith'

In function is_tunnel(), tunnel may contain None and has no attribute
"startswith". Fix it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-16 20:53:31 +01:00
Adam Dunkels 221199e15b runners: jlink: add support for J-Link tunnels
This adds support for J-Link tunnels, which run on top of an IP network
and therefore uses the -IP option. J-Link tunnels are identified by a
tunnel: prefix instead of a bare IP address. This change checks for the
presence of such a prefix, and choses the -IP transport option if the
tunnel prefix is found.

This has been tested with J-Link Remote Server v7.98g and the SEGGER
tunnel option.

Signed-off-by: Adam Dunkels <adam@dunkels.com>
2024-10-15 04:10:18 -04:00
Marc Herbert 8b859cea2d west: promote config_get*() functions from sign.py to the base class
These two functions have stood the test of the time and they have
absolutely nothing specific to sign.py

This has the benefit of transitioning away from west's global and
deprecated logging interface
(https://github.com/zephyrproject-rtos/west/issues/149) and this
deprecation is what prompted this commit: see #79240.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-10-15 04:06:42 -04:00
Yonatan Schachter 5da7ba55aa west: bindesc: Added get_offset command
Add `west bindesc get_offset` command to print the offset of
the descriptors inside the given image.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Moritz Geier da87952948 west: runners: stm32cubeprogrammer: Fixed behaivor if programmer is in path
Enabled west commands to use CubeProgrammer installed in custom directory.

Signed-off-by: Moritz Geier <moritz.geier@proton.me>
2024-10-11 13:20:29 -04:00
Jordan Yates 97db13dc09 scripts: west_commands: runners: propagate arguments
Provide a mechanism to propagate useful arguments from one runner to the
next. The primary use case for this is to propagate a JLink serial
number, so that if it is queried from the terminal the user only needs
to make the choice once.

Implements #76077.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 20:24:35 -04:00
Benjamin Cabé acbda31707 west: boards: add full_name support in format string
The recently introduced board.full_name property can now be used as part
of the format string in the `west boards -f ...` command.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 10:06:31 +02:00
Jamie McCrae dd7ce12d68 scripts: west_commands: sign: Deprecate imgtool signing
Deprecates signing for imgtool using west sign

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Torsten Rasmussen 24ee391231 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>
2024-10-08 17:00:30 +02:00
Gerard Marull-Paretas 091e38b3f2 scripts: west_commands: runners: nrf: add support for nRF54H20 EngB
Make sure cpuapp/cpurad cores are detected correctly when using nRF54H20
EngB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Laurentiu Mihalcea 155f3f3ba6 west_commands: sign: add imx95 to target list
Add imx95 to target list to allow signing images for
imx95.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-02 13:46:06 -05:00
Helmut Lord aac15846fa west_commands: build: add extra file arguments
Adds an argument to include additional .conf or .overlay files

Example use:

```
west build -b nrf52840dk/nrf52840 -p --extra-conf foo.conf
```

```
west build -b nrf52840dk/nrf52840 -p --extra-dtc-overlay foo.overlay
```

Or:

```
west build -b nrf52840dk/nrf52840 -p --extra-conf foo.conf
--extra-conf bar.conf
```

```
west build -b nrf52840dk/nrf52840 -p --extra-dtc-overlay foo.overlay
--extra-dtc-overlay bar.overlay
```

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-09-30 16:55:26 -05:00
Peter van der Perk dd15aff5fe west: linkserver: Fix version detect for ihex support
version detect never occured correctly and always yielded true

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-09-26 03:34:53 -04:00
Henrik Brix Andersen 16b39e8a03 scripts: west: commands: completion: add twister --log-level completion
Add bash tab-completion for for the newly introduced "west twister
--log-level" arguments.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-09-24 14:27:03 -05:00
Fabian Blatz 11c83c80fc west: commands: runners: canopen: add download-buffer-size option
Adds a --download-buffer-size option to the canopen runner to allow
specifying the buffer size of the SDO download.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-23 13:21:52 -05:00
Guennadi Liakhovetski dc5f1bfb3f west: fix for Python prior to 3.10
"type | None" syntax is only available with Python from version 3.10,
fix building with earlier 3.x Python versions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 14:51:03 +02:00
Tobias Pisani 73c8235881 west: runners: Implement the west rtt command for jlink
Moves the telnet client into runners/core.py as well, as this is now shared
between openocd and jlink.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-09-10 12:39:42 -04:00
Tobias Pisani 18f45b5f06 west: runners: Implement the west rtt command for openocd
This was non-trivial, as openocd is a bit weird to work with. Using only
commands passed with '-c' arguments, I couldn't get it to reliably resume
(or just not halt) the target when started. I tried using the 'sleep'
command, and various 'configure -event XX { resume }' events, but nothing
panned out, as it seems to always halt after all `-c` commands have been
run.

To avoid that, this waits for the TCL RPC port to be up, and sends a
resume command there. This works reliably.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-09-10 12:39:42 -04:00
Tobias Pisani b3b8360f39 west: runners: Add `west rtt` command with pyocd implementation
This command runs separately from a debug server, instead of attaching
to a running server. This is both the easiest out of the box experience,
and also should be possible to implement consistently for most runners.

This commit includes an initial implementation for pyocd.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-09-10 12:39:42 -04:00
Attie Grande e6dc930322 bindesc: Add support for the build version values
This patch adds bindesc support for the build version values for the
kernel and application - BUILD_VERSION and APP_BUILD_VERSION.

The kernel's BUILD_VERSION can be overridden at build time.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-09-04 07:03:47 -04:00
Andrej Butok 3f5fc42fba runners: linkserver: Add .elf support to the linkserver flash command
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the linkserver runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-29 11:37:54 +02:00
Andrej Butok c1fe3150e9 runners: pyocd: Add support for .elf files to the pyocd flash command
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the pyocd runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-27 12:44:55 +02:00
Emanuele Di Santo b511704dd8 scripts: west: runners: add initial nRF92 support
Add initial support flashing and erasing the application and
radio cores of the nRF9280.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
TOKITA Hiroshi eb675eb281 scripts: west_commands: completion: zsh: Add minimum support for `sdk`
Add minimum support for the `west sdk` command.
This only provides completion for the `sdk` command itself.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi 85ffd1e031 scripts: west_commands: completion: fash: Add support for `west sdk`
Add a feature for completion of the `west sdk` command.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi af5850d44a scripts: west_commands: completion: bash: Add support for `west sdk`
Add a feature for completion of the `west sdk` command.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi b68071dc71 commands: add the 'sdk' command to manage SDK.
This command can list and install SDK.

Run 'west sdk install' to install the SDK.
Run without any parameter, installing
specified by SDK_VERSION in the source tree.
'west sdk' to show installed SDK information.

This command is just a wrapper for SDK's setup command,
but it simplifies the installation process. It will be a good
improvement for onboarding first-time users.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
Andrej Butok e767ac0703 runners: jlink: Add support for .elf files to the jlink flash command
The .bin & .hex build output is optional and can be disabled by
CONFIG_BUILD_OUTPUT_BIN/HEX.
Add support for the mandatory .elf build output
to the jlink runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-20 18:59:26 -04:00
Raffael Rostagno eca1112d5b tools: esp32: Update for esp32c2
Added argument to support custom baud rate on ESP monitor
for ESP32C2 and ESP8684.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 10:32:59 +02:00
Tomasz Chyrowicz 4c541eb216 scripts: nrf_common: Use cfg for SUIT paths
It is safer to base the SUIT artifacts path on the path of the
configuration file than the HEX file that is being flashed.
The latter may be overriden by several scripts that merge/transform the
final firmware image.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-08-05 18:38:23 -04:00
Pieter De Gendt 9894b84a2d scripts: west_commands: build: Fix empty testcase
An empty but specified testcase does not build, check if the test key
exists instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-01 16:39:51 +02:00