Commit graph

65883 commits

Author SHA1 Message Date
Carles Cufi
974e868b33 doc: gh: Remove the doc for the "Question" label
This label has been removed, since we now convert issues that are just
questions to Discussions.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-30 17:01:58 -04:00
Maxim Adelman
c9ad6dbc7e drivers: gpio: gpio_mcux_lpc: fix lost interrupts
if ISR is called for an event on pin X but
another event occurs on pin Y in between the call
to GetStatus() and ClrStatus(), pin Y event wil get
cleared without being processed

Signed-off-by: Maxim Adelman <imax@fb.com>
2022-06-30 15:19:53 -05:00
Bartosz Bilas
091a54202a soc: arm: nxp_imx: rt: add new MIMXRT1062CVJ5B part number
Add missing MIMXRT1062CVJ5B SOC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-06-30 19:50:03 +00:00
Bartosz Bilas
dcf2d4d542 soc: arm: nxp_imx: rt: add new MIMXRT1062CVJ5A part number
Add missing MIMXRT1062CVJ5A SOC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-06-30 19:50:03 +00:00
Kumar Gala
29c993fc0f spi: Add SPI_CS_GPIOS_DT_SPEC_INST_GET macro
We didn't have an "INST" verion of SPI_CS_GPIOS_DT_SPEC_GET.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 19:42:14 +00:00
Kumar Gala
74afc2df06 boards: particle_argon: Use GPIO_DT_SPEC for gpio handling
Convert gpio handling to use GPIO_DT_SPEC as this removes the use
of DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 14:12:58 -05:00
Kumar Gala
eb6a5671f7 tests: eeprom: use DEVICE_DT_GET
Convert test to use DEVICE_DT_GET instead of device_get_binding
to help phase out use of DT_BUS_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 14:12:31 -05:00
Tom Burdick
5dd139fe8f tests/subsys/rtio: Update testing to use newer ZTEST API
The old test API is being phased out, RTIO is a new subsys and
deserves to use the new test API

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-30 14:58:10 -04:00
Andrei Emeltchenko
66cfe4f430 tests: mem_protect: Fix checking wrong variable
At the moment zassert_is_null() is checking value which is always NULL.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 12:37:14 -05:00
Andrei Emeltchenko
6eb312f7b9 tests: cmsis_rtos_v2: Remove unused variables
Clean up dead code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 12:37:14 -05:00
Andrei Emeltchenko
9ea701e930 tests: threads: Remove unused variable
Clean up dead code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 12:37:14 -05:00
Andrei Emeltchenko
9131a1c374 tests: ipm: Remove dead code
Remove unused code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 12:37:14 -05:00
Andrzej Głąbek
0a9a638f09 drivers: gpio_nrfx: Fix handling of GPIO_DISCONNECTED
The driver returns -EIO when a pin to be disconnected was not earlier
configured as input or output, what is not in line with the GPIO API.
This commit changes the driver to return 0 in such case.
Also -EIO is incorrectly returned when an interrupt trigger cannot be
configured in the nrfx_gpiote driver. This commit corrects this value
to -EINVAL.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:27:33 +02:00
Andrzej Głąbek
fa48dbd1db boards: nrf: Fix sw_pwm channel definitions
This is a follow-up to commit f301dc2382.

Add missing GPIO_ACTIVE_LOW flag to sw_pwm channel definitions for
nRF51 DK and nRF51 Dongle so that the initial state of their PWM
outputs is properly set up.
Add missing sw_pwm channel definition in the nrf52833dk_nrf52820 target
that was modified in 793362ae5a instead
of in f301dc2382. Add also the pwm-led0
alias for its PWM LED so that it can be used with standard samples.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:22:38 +02:00
Kumar Gala
5f7790fc23 sensor: iis2mdc: spi: Fix use of deprecated spi_cs_control field
The gpio_dev field of struct spi_cs_control is deprecated.  The
driver was already using SPI_CONFIG_DT_INST, so we should be
using the associated gpio member of spi_cs_control.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 11:19:40 -05:00
Andrzej Głąbek
c7e4d23c5d samples: boards: nrfx: Align code with the recent nrfx_gpiote API
Replace calls to nrfx_gpiote functions deprecated in nrfx 2.6.0
with recommended equivalents.
On the occasion, switch to using available `nrfx_gppi_*` functions
instead of separate paths for DPPI and PPI channels.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:14:02 +02:00
Andrzej Głąbek
21c1e9306a shields: x_nucleo_eeprma2: Make sure arduino_spi is enabled
Add `status = "okay";` in `arduino_spi` to make sure the node is
enabled (it may not be by default in certain board definitions).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:13:46 +02:00
Andrzej Głąbek
8541299020 boards: nrf9160dk_nrf9160: Add arduino_spi definition
Assign proper pins and add the arduino_spi node label to one SPI node
so that shields that require SPI can be used with the nRF9160 DK.
Due to the limited resources of the nRF9160 SoC, the arduino_spi (spi1)
and arduino_serial (uart1) interfaces cannot be used together on this
board, so remove the default "okay" status from the arduino_serial node
(this status is supposed to be set in a shield overlay that uses this
interface).
The spi1 node was selected as arduino_spi because:
- spi0 could not be used together with uart0 that is used by the Zephyr
  console
- spi2 could not be used together with i2c2, which is arduino_i2c and
  in newer nRF9160 DK revisions (0.14.0+) also provides communication
  with the onboard GPIO expander
- spi3 is used in newer nRF9160 DK revisions for communication with the
  onboard flash chip

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:13:46 +02:00
Andrzej Głąbek
22f524d874 drivers: gpio_nrfx: Add support for gpio_port_get_direction
Add implementation of this new GPIO API function.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:12:54 +02:00
Alexandre Duchesne
9a575e83de boards: arm: Add stm32f7508_dk board
add initial support for the STM32F7508-DK Discovery kit

Signed-off-by: Alexandre Duchesne <alexandre.duchesne@rtone.fr>
2022-06-30 13:41:06 +00:00
Alexandre Duchesne
7109e7dc20 soc: st_stm32f7: Add stm32f750xx SoC
add initial support for STM32F750xx SoC

Signed-off-by: Alexandre Duchesne <alexandre.duchesne@rtone.fr>
2022-06-30 13:41:06 +00:00
Joakim Andersson
3ccf5d03ff tfm: Add option for implementation custom reset handler with TF-M
Zephyr adds a custom handler that overrides the weak function
sys_arch_reset when TF-M platform partition is enabled.

This takes away the option for the application to override the weak
definition for their platform or use-case.

Add an option that control whether this default reset handling is added
to the build.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-30 13:00:09 +00:00
Kumar Gala
8abcaf5365 samples: spi_bitbang: Fix use of deprecated spi_cs_control fields
The gpio_dev, gpio_pin, etc fields of struct spi_cs_control are
deprecated.  Move to using the gpio field.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 07:14:56 -05:00
Carles Cufi
f9739ab41d python: Fix the requirement for libmagic to be installed
The Python python-magic module that we install for compliance checks
requires libmagic to be installed on the system to work. This requires
extra OS packages on Ubuntu and macOS, and an extra wheel on Windows.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-30 13:34:26 +02:00
Aaron Massey
cceb3e480e tests: wdt_basic_api: update to new ZTEST APIs
Update test suite to leverage new ZTEST APIs.

TEST=twister -T tests/drivers/watchdog/wdt_basic_api # Only build

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2022-06-30 07:32:11 -04:00
Gerard Marull-Paretas
d9707249da doc: doxygen: strip include/ from path
Include hints shown in the Doxygen documentation need to exclude
'include/' so that we have, e.g. <zephyr/sys/crc.h> and not
<include/zephyr/sys/crc.h>.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-30 13:02:51 +02:00
Keith Packard
16a4bf603d test: cmsis_rtos_v2: Initialize versionInfos
get_version_check will leave the version info unchanged if osKernelGetInfo
fails. This lead to a compiler warning when those results were used.

Initialize the values with data that will cause a failure that should be
easily diagnosed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 12:32:45 +02:00
Ederson de Souza
afed5e4010 soc/xtensa/intel_adsp/tools: Dial back stream reset sleep
A full second is too much, and since "Ack local interrupt before
processing IPC" patch, it doesn't seem necessary. This whole second
wait would break tests that log too much content, as the firmware
is already running during the reset - and the host script wouldn't read
the contents, thus some of the logs would be overwritten.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-06-30 06:13:30 -04:00
Kumar Gala
06bd942191 misc: ft8xx: convert to gpio_dt_spec
Convert SPI usage to `struct gpio_dt_spec`.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 04:30:21 -05:00
Kumar Gala
a2ffdaf2b9 misc: ft8xx: convert to spi_dt_spec
Convert SPI usage to `struct spi_dt_spec`.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 04:30:21 -05:00
Giuliano Franchetto
5ca0bbac96 logging: hide logging from jetbrains idea
For now, the logging subsystem is hidden from CDT to prevent freezing of
the IDE.
CLion has the same issue, where the IDE becomes slow with big RAM spikes.
Fortunately, CLion automatically defines a macro __JETBRAINS_IDE__ that we
can use

Signed-off-by: Giuliano Franchetto <giuliano.franchetto@intellinium.com>
2022-06-30 11:26:26 +02:00
Thomas Stranger
87ed12d796 dts: bindings: clock: Fix STM32G4 device clk src selection definitions
Some device clock sources selection helpers were not correctly defined.

With this commit the definitions are updated to match the desciption
in the reference manual RM0453.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-06-30 10:34:51 +02:00
Andrei Emeltchenko
30be920bd6 tests: net: socket: Add missing return code check
Add missing check.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
6360f75d0c tests: net: socket: Fix checking wrong variable
Check return code instead of parameter.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
8dda6b8c37 net: coap: Remove unneeded statement
Assignment is not needed.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
2a61e30384 samples: echo_server: Remove unused error code
Remove setting unused error code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
82b9282e60 samples: socketpair: Remove unused error code
Remove unused variable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
3cd5bd600f samples: dumb_http_server_mt: Remove unneeded statement
ret is not used so assignment is not needed.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Marc Herbert
9782b2cc05 scripts: intel_adsp: always invoke west sign
west flash invokes west build and we have no way to tell whether there
was any code change.

Also remove the rename() trick that achieved the same effect in a
a confusing way; just use copy() instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-06-30 10:34:30 +02:00
Marc Herbert
739aa951cd scripts: intel_adsp: don't invoke west sign with --tool-path None
When there is no rimage found in the path, don't invoke west sign with
"-tool-path None". This enhances the error message from the somewhat
cryptic:

  ERROR: --tool-path None: not an executable

... to the user friendlier:

  FATAL ERROR: rimage not found; either install it or provide --tool-path

Also log the complete west sign command at the "info" level before
running it to show that no signed firmware was found, to show which
rimage is used and in case other rimage problems arise. Invoking an
external command is an important "checkpoint".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-06-30 10:33:53 +02:00
Keith Packard
bea139f0f4 tests/posix/common: Let picolibc pick a malloc heap size
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
394a0485fb tests/kernel/common: Let picolibc pick a malloc heap size
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
7da1fca3d4 tests/c_lib: Let picolibc pick a malloc heap size
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
a6119925c8 tests/mem_alloc: Let picolibc pick a malloc heap size
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
2263708c73 tests/mem_protect: Increase MPU sizes for qemu_cortex_a53
When running with picolibc, we need more MPU resources for these
tests. Get rid of picolibc malloc arena too.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
305068a3bc tests/logging: Give picolibc lots of margin for now
We're not quite sure how much extra stack space picolibc will use, so
give it plenty of space for now.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
bc234fb1af libc/picolibc: Rework malloc arena setup
Picolibc inherited its malloc arena configuration from newlib instead of
from minimal libc. This ended up making it a bit too fragile to run the
full set of zephyr tests. In particular:

 * Z_MALLOC_PARTITION_EXISTS would get set when not used

 * Setting an arena size depended on a bunch of other values, including
   whether the system had an MMU or MPU, and whether the MPU required
   power-of-two alignment or not.

This patch cleans things up so that there is a single heap size specifier,
PICOLIBC_HEAP_SIZE.

 * If PICOLIBC_HEAP_SIZE is positive, this sets the size of the heap. On
   MMU systems, picolibc will only use the remaining memory if that's
   smaller.

 * If PICOLIBC_HEAP_SIZE is zero, then there is no heap available and
   malloc will always fail. This also disables Z_MALLOC_PARTITION_EXISTS.

 * If PICOLIBC_HEAP_SIZE is negative, then picolibc uses all remaining
   memory for the malloc heap.

The defaults are designed to allow tests to work without requiring
additional settings.

 * For MMU enabled systems, the default value is 1048576. It would be nice
   to have this use 'all available memory', but that's difficult to manage
   as the API which returns free memory (k_mem_free_get) doesn't take into
   account the amount of free virtual address space.

 * For MPU enabled systems which require power-of-two aligned MPU regions,
   the default value is 64kB.

 * For other systems, the default value is -1, indicating that all
   available memory be used for the malloc arena.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
34473f6821 subsys/testsuite: Don't add empty z_malloc_partition to mem domain
The malloc partition may actually be empty, if so, don't try to add it to
the domain as that will generate an error.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Kumar Gala
e1e8179690 modbus: serial: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 10:32:42 +02:00
Kumar Gala
e63643d212 drivers: serial: lpc11u6x: Remove DT_LABEL usage
Remove DT_LABEL usage that is needed for device_get_binding, replace
this with DEVICE_DT_GET.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 10:32:33 +02:00