Commit Graph

69019 Commits

Author SHA1 Message Date
Martí Bolívar 88aa873fbc twister: improve logging of cmake commands
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>
2022-08-26 08:53:14 +02:00
Diego Herranz 66d47cae04 doc/develop/getting_started: update for Ubuntu 22.04
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>
2022-08-25 23:39:23 -07:00
Martí Bolívar 6c03cb9fb4 MAINTAINERS: remove my doc collaborator status
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>
2022-08-25 18:30:07 -07:00
Martí Bolívar f739b85c8d MAINTAINERS: remove redundant files entry
The dts/bindings/test/ entry is already covered by dts/bindings/
above.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-25 18:30:07 -07:00
Kumar Gala f1660f4d51 edtlib: allow const arrays
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>
2022-08-25 18:11:27 -07:00
Torsten Rasmussen 4cb2ef83bf cmake: kconfig: preserved quotes for Kconfig string values
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>
2022-08-25 17:53:11 -07:00
Kumar Gala 8a5d568a79 dts: Standardize string token names for arrays
Use the same postfixes for string arrays as we use for strings.  Keep
just the _STRING_*_TOKEN) variants.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-25 15:00:24 -07:00
Kumar Gala 04adb949d1 soc: xilinx: zynq7000: move to using DT_STRING_UPPER_TOKEN_BY_IDX macro
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>
2022-08-25 15:00:24 -07:00
Gerard Marull-Paretas 18fe7bc630 tests: drivers: pinctrl: nrf: test disconnected pins
Update test to cover disconnected pins.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-25 14:38:26 -07:00
Gerard Marull-Paretas 223cc3c6bd drivers: pinctrl: nrf: add support for disconnecting a pin
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>
2022-08-25 14:38:26 -07:00
Andrei Emeltchenko 7c81ee9d18 pcie: shell: Add help and argument check
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>
2022-08-25 21:14:51 +00:00
Andrei Emeltchenko d46c7595d9 pcie: shell: Verify command parameters
Exit on wrong parameter for pcie ls command.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-08-25 21:14:51 +00:00
Sylvio Alves 7e9e3116e4 dtsi: esp32c3: add missing wifi node
Add ESP32C3 wifi entry in dtsi file.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-08-25 21:12:08 +00:00
Andrei Emeltchenko e224e4c4fe i2c: shell: Fix SHELL_CMD_ARG() parameter count
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>
2022-08-25 21:08:20 +00:00
Haruki Obuchi 653eb93593 doc: Fix interface quantity
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>
2022-08-25 21:06:45 +00:00
Francois Ramu f106465741 drivers: flash: ospi driver erase command on 24bits in SPI mode
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>
2022-08-25 21:05:27 +00:00
li biao 7e9b3a9744 tests: subsys: logging: move log_backend_init to new ztest API
Fix missing to https://github.com/zephyrproject-rtos/zephyr/issues/49004

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-25 21:04:58 +00:00
li biao edf3fe8a64 tests: subsys: logging: move log_backend_init to new ztest API
Move test subsys/logging/log_backend_init to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-25 21:04:58 +00:00
Kumar Gala 2030f658b5 I2S: remove defconfig/proj setting of I2S drivers
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>
2022-08-25 15:03:11 -05:00
Kumar Gala 1314d73104 I2S: remove Kconfig.defconfig* setting of I2S drivers
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>
2022-08-25 15:03:11 -05:00
Kumar Gala 324ee290f8 drivers: i2s: Update drivers to use devicetree Kconfig symbol
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>
2022-08-25 15:03:11 -05:00
Aastha Grover 8a730b818b samples: kernel: Add README for simple condition variable sample.
Add README for simple conditional variable kernel sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-08-25 13:24:14 -05:00
NingX Zhao 2ce20e5df6 tests: kernel: mheap: migrate mheap testcases
Move testcases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-25 13:12:04 -04:00
Yves Vandervennet 9ecf1d3529 doc: lpcxpresso55s36 evk: documentation update
Added on-SoC flash to the list of supported features

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-08-25 10:24:41 -05:00
Yves Vandervennet 8d96cc42b6 nxp: lpcxpresso55s36 evk: enabling flash partitions.
Sample paritions added to the flash memory device node.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-08-25 10:24:41 -05:00
Yves Vandervennet 6b66d7f266 flash: nxp: enabling lpc55s36's FMC
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>
2022-08-25 10:24:41 -05:00
Carles Cufi 80b4df8839 blobs: Document the submission process
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>
2022-08-25 11:10:53 -04:00
Gerard Marull-Paretas 056734bea8 soc: riscv: ite: remove pinmux/pinctrl dead code
Remove unused definitions coming from the pre-pinctrl era.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-25 13:55:47 +00:00
Stephanos Ioannidis 7253fb0f56 west.yml: Update ST HAL to pull GCC 12 warning fixes
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>
2022-08-25 22:29:49 +09:00
Stephanos Ioannidis 8506979f27 arch: arm: mpu: Fix -Wstringop-overread warning
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>
2022-08-25 22:29:28 +09:00
Daniel DeGrasse 8a0e4aa744 tests: drivers: flash: Make testcase depend on FLASH_HAS_DRIVER_ENABLED
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>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 3dca5c0617 tests: drivers: flash: enable heap for ESP32 boards
Enable heap for ESP32 boards that require it for flash driver support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 9e6b73b7da boards: usb_kw24d512: enable flash controller
enable flash controller on usb_kw24d512d

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 359d23ceaa dts: arm: usb_kw24d512: enable flash controller
enable flash controller, as it is tested on this SOC

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 2bc22ceb18 dts: arm: nxp_kw40z: disable ftfa flash controller
Disable ftfa flash controller, as flash driver support is not tested
for this SOC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 3e98434cfb dts: arm: nxp_kl25z: disable flash controller
Disable flash controller for kl25z SOC, as flash driver support is
not tested on this SOC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse e74e526854 boards: mimxrt595_evk_cm33: enable flexspi as flash controller
enable using flexspi as flash controller for RT595 EVK

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 4f6d2e485e dts: arm: nxp_rt5xx_common: disable flexspi by default
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>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 7044950a2a boards: lpcxpresso55s16: enable IAP flash controller
enable IAP flash controller for lpcxpresso55s16 evk

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse c023712be3 dts: arm: nxp_lpc55S1x: enable IAP for non secure core
enable IAP for non secure core, as it is tested on this core only

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse d8ce73fbae boards: lpcxpresso55s28: enable IAP flash controller
enable IAP flash controller for lpcxpresso55s28 evk

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse baaff25a45 dts: arm: nxp_lpc55S2x: enable IAP for secure core
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>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 8e99175a55 boards: frdm_kw41z: enable flash controller
Enable flash controller for frdm_kw41z evk

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 4fe40db974 dts: arm: nxp_kw41z: enable flash controller
explicitly enable flash controller, as it is supported on this SOC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 3671c6ab86 boards: lpcxpresso55s06: enable IAP flash controller
enable IAP flash controller for lpcxpresso55s06 evk

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 33fd9ea7fd dts: arm: nxp_lpc55S0x: disable IAP by default
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>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 3844e24f21 boards: lpcxpresso54114: enable iap flash controller
Enable flash driver with IAP flash controller

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse d70db21760 drivers: flash: soc_flash_lpc: enable support for lpc54xxx IAP
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>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 0cbe63de7d boards: mimxrt1160_evk: update documentation to indicate flexspi support
Update board documentation to indicate support for using flexspi as
a flash controller device

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Daniel DeGrasse 2b38b02470 dts: arm: nxp_rt: Remove flexspi2 on RT SOCs that don't have it
Remove flexspi2 node for NXP's iMX.RT SOCs that only have one flexspi
controller

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00