With verbose output enabled, twister logs the cmake arguments as a
python array whenever it invokes cmake to generate a build system.
This is clunky output for manual reproduction, because it forces the
developer to manually join the arguments together for consumption by
the shell.
As an enhancement for this use case, use the standard library
shlex.join() function to produce a string that can be copy/pasted
directly into the shell on POSIX platforms.
We should use this function instead of str.join, because it correctly
handles things like shell quoting for options with spaces in them.
This function is not available on Windows, so we fall back on behavior
that is similar to the old one there.
The main difference on Windows is that the output now includes the
path to cmake as well, and not just its arguments. (This is the same
on POSIX, and is intended to help debug if multiple cmakes are
installed on the same machine.)
We are running cmake from a couple of different places, so doing this
cleanly requires adding a shared module with the platform abstraction.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
In Ubuntu 22.04 there is no need to add any extra repositories
to meet the minimum required versions for tools like cmake and dtc.
In fact, the Kitware repos don't even work in Ubuntu 22.04.
So, instructions updated to explain that step is only required for
Ubuntu versions older than 22.04.
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
I am still interested in contributing to the documentation, but I am
tired of the spam I'm getting from zephyrbot whenever any pull request
touches anything in doc/.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Allow for having array types (array, uint8-array, string-array) be const.
This would allow for something like:
properties:
reg-names:
const: ["foo", "bar"]
To be supported.
Renamed function _check_prop_type_and_default to _check_prop_by_type
as part of this change and Moved the check for 'const' types into
_check_prop_by_type as its similar to the prop_type check and it was
easier to implement in _check_prop_by_type as we already extract
prop_type from the option in that function.
Signed-off-by: Kumar Gala <galak@kernel.org>
Fixes: #48950
Kconfig requires quoted strings in its configuration files, like this:
> CONFIG_A_STRING="foo bar"
But CMake requires expects that strings are without additional qoutes,
and therefore qoutes are stripped when loading Kconfig config filers
into CMake.
This is particular important when the string in Kconfig is a path to a
file. In this case, not stripping the quotes leads to an error as the
file cannot be found.
When users pass a string to Kconfig through CMake, they are expected to
pass it so that qoutes are correct seen from Kconfig, that is:
> cmake -DCONFIG_A_STRING=\"foo bar\"
In CMake, those qoutes are written as-is to Kconfig extra config file,
and then removed in the CMake cache.
After Kconfig processing, the Kconfig settings are read back to CMake
but without quotes. Settings that was passed through the CMake cache,
for example using `-D` are written back to the cache, but this time
without the qoutes. This results in Kconfig errors on sub-sequent CMake
runs.
Instead of writing the Kconfig value setting back to the CMake cache,
introduce an internal shadow symbol in the cache prefixed with `CLI_`.
This allows the CMake cache to keep the value correctly formatted for
Kconfig extra config creation, while at the same time keep existing
behavior for CONFIG_ symbols read from Kconfig.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Replaced hand coded use with DT_STRING_UPPER_TOKEN_BY_IDX. We should have
introduced the APIs when this was needed since the token values in
devicetree_generated.h should only be accessed via an API macro.
Signed-off-by: Kumar Gala <galak@kernel.org>
It was not possible to disconnect a pin using the nRF pinctrl driver.
That is, it was not possible to set PSEL to 0xFFFFFFFF (indicating pin
is not connected). This can be useful in certain scenarios, e.g. a
bootloader configures all signals of a certain peripheral but
application then needs to disconnect certain signals.
A new DT macro has been introduced to accomplish this:
NRF_PSEL_DISCONNECT. It can be used like this to explicitely disconnect
a peripheral signal:
```
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 1)>,
<NRF_PSEL_DISCONNECTED(UART_RX)>;
};
};
};
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use SHELL_CMD_ARG() for argument check and add help, looking like:
...
$ pcie -h
pcie - PCI(e) device information
Subcommands:
ls :List PCIE devices
Usage: ls [bus:device:function] [dump]
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The command uses 1 optional parameter and this parameter can be at
maximum MAX_I2C_BYTES.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Since the interface quantity in the document of ESP32 C3
is different from the datasheet,
the quantity was corrected based on the datasheet.
Signed-off-by: Haruki Obuchi <dev@mail.nyarn.wtf>
When configuring the octo-flash in SPI/STR mode, the address size
must be on 24bits (and not on 32bits).
Despite the dev_data->address_width which is always seen as 4, the
erase command must reduce the AddressSize for this transfer mode.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Now that I2S drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *.conf files.
Signed-off-by: Kumar Gala <galak@kernel.org>
Now that I2S drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.
Signed-off-by: Kumar Gala <galak@kernel.org>
Update I2S drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.
We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.
Signed-off-by: Kumar Gala <galak@kernel.org>
This commit enables the SoC's flash memory controller.
- added lpc55s36 specific code in the NXP MCUX driver
to take advantage of the SoC's check-before-read
capability
- enabled the FMC node in the SoC's dtsi (iap)
- added the flash controller chosen node to the board's dts
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Add the missing piece of documentation for binary blobs: the submission
process. This follows the external source code process relatively close,
but it is relatively simpler.
The proposal includes a new issue template for requesting inclusion of
blob(s) for a particular module.
Fixes#7516.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit updates the ST HAL (hal_st) to pull in the fixes for the
warnings observed when building with the GCC 12.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
GCC 12 performs bounds checking on the pointer arguments specified like
an array (e.g. `int arg[]`) and treats such arguments with an empty
length as having the length of 0, resulting in the compiler printing
out `stringop-overread' warning when they are accessed.
This commit corrects any pointer arguments declared using the array
expression to use the pointer expression instead.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Change default flash driver testcase to depend on FLASH_HAS_DRIVER_ENABLED,
and the presence of a storage partition in the output DTS, so that the test
will run on all platforms that report flash support.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Disable flexspi flash controller by default, allow boards to enable it.
This SOC uses external flash, so boards should only enable the flash
controller when their specific flash module has been verified to work
with the flash driver API in Zephyr.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
enable IAP flash controller for secure core, as this is the core where
flash support has been verified.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Disable IAP by default for lpc55s06, enable it for the non secure core
as this is the mode that the flash controller has been tested in.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support for LPC54xxx IAP flash driver to soc_flash_lpc.c
Driver is tested on M4 core only, and is therefore disabled on the M0 core.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>