Commit Graph

70224 Commits

Author SHA1 Message Date
Dominik Ermel
e4d0bf0e64 mgmt/mcumgr: Fix image erase returning improper error code on error
The img_mgmt_erase could return MGMT_ERR_EOK even when
img_mgmt_impl_erase_slot failed.

Fixes #50522

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-22 15:32:04 +00:00
Erwan Gouriou
ce1377c5ee boards: stm32: Update doc for STM32U5/L5 boards
Update documentation for STM32U5 and STM32L5 based boards:
- Zepĥyr SDK openocd can be used instead of openocd ST fork.
- All these boards use a STLinkV3 instead of V2.
- Update (or provide when missing) instructions for building and
flashing TFM applications.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-22 10:23:58 -05:00
Gerhard Jörges
1e87837f2a drivers: spi: pl022: fix dropping RX bytes
If the thread that submits data over spi is interrupted by a higher
priority thread while pushing data to the tx fifo the hardware pushes
data to spi and frees up space in the fifo. In this case more than
8 Bytes are written to the tx fifo and bytes in the rx fifo get lost
before they are collected in the rx while loop.
To avoid this, the tx loop is exited after a maximum of 8 bytes and the
rx loop will run until it collected all bytes from the rx fifo.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2022-09-22 17:16:45 +02:00
Torsten Rasmussen
af4a87af8e cmake: support relocating of a board folder
Fixes: #49116

During development of out-of-tree boards and applications it is not
uncommon to refactor / restructure code.

To allow developers more freedom, let's check that board's defconfig
still exists during a CMake re-run.
If the defconfig no longer exists, either because it's been moved or
deleted, then warn the user and set BOARD_DIR to NOTFOUND.

The NOTFOUND will request CMake to search for the new location in all
board roots. If the board has not been found, as example it's deleted,
then the existing error is printed later.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-22 17:14:20 +02:00
Marc Herbert
3ebb18b882 cmake: fix utterly cryptic error handling in the -DSPARSE=y build
Fixes commit 7a85ff7683 ("add sparse support")

The sparse build needs (at least) two things:
1. sparse to be in the PATH
2. the environment variable REAL_CC to be defined and to match the
   value expected by CMake

Fix error messages when either condition is wrong.

- New error message when 1. is not satisfied:
```
CMake Error at zephyr/cmake/compiler/gcc/target.cmake:12 (find_program):
  Could not find CMAKE_C_COMPILER using the following names: cgcc
```

- Previous error "message" when 1. is not satisfied:
```
CMake Error at zephyr/cmake/compiler/gcc/target.cmake:17 (message):
  C compiler
  ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc
  not found - Please check your toolchain installation
```
Note the "not found" cross-compiler actually exists!

- New error message when 2. is not satisfied:
```
Kconfig header saved to 'ws/build-tgl/zephyr/include/generated/autoconf.h'
-- Found sparse: /home/user/sparse/cgcc
CMake Error at ws/zephyr/cmake/compiler/gcc/target.cmake:25 (message):
  The only way to override its 'cc' default when cross-compiling with
  sparse is unfortunately an environment variable.  So you _must_ set
  REAL_CC at both configuration time and build time to:
  $ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc

```

- Previous error "message" when 2. is not satisfied:
```
modules/hal/xtensa/include/xtensa/config/core.h:54:10:
    error:unable to open 'core-isa.h'`
```

Also: stop using the same name REAL_CC for both the internal CMake
variable and the external sparse parameter; they're two different
things so name them differently. Environment variable messes are
complicated enough.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-09-22 15:12:22 +00:00
Jamie McCrae
10f9d576f4 doc: release: 3.2: Add MCUMGR changes
Adds MCUMGR changes to the release notes.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-22 10:09:22 -05:00
Francois Ramu
6507afd07e drivers: adc: driver for stm32wl configure sampling
This Commit makes the adc configuration correct
for using the adc with 12b conversion on the stm32wl.
TriggerSource must be set to SW.
The ADC clock must be disabled by clock gating during CPU1 sleep/stop.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-22 15:06:20 +00:00
Ming Shao
0e1eba523e reel_board: remove the hw_reset which blocks flashing
The hw reset type is blocking the flash of reel_board.
It seems removing it can fix the issue.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-09-22 15:02:53 +00:00
Tim Lin
3474ba919f ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C
FIFO2 can be selected to support channel of B or C by dtsi.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin
c30ec3ba4d ITE: drivers/i2c: Rename the parameter in data struct
Rename the parameter in data struct to avoid confusion.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin
de1fc0ca89 ITE: drivers/i2c: Fix the bug of msgs in I2C transfer
1. To explicitly set the MSG_START flag on the first message.
2. Remove redundant declare.
3. Using data->msgs->flags is the correct address instead of
   msgs->flags.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Henrik Brix Andersen
a92e68b626 doc: release-notes: minor fixup to the CAN release notes for v3.2.0
Add a couple of minor fixups to the CAN related release notes for Zephyr
v3.2.0 (fixed typo and removed duplicate entry).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-22 09:30:09 -05:00
Stephanos Ioannidis
357b2231de doc: release-notes: Add C++ subsystem release notes for 3.2
This commit adds the C++ subsystem release notes for the Zephyr 3.2
release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-22 09:22:53 -05:00
Enjia Mai
77986382df tests: framework: fix code coverage report on zephyr-sdk-0.15
The GCC/GCOV version over 12 has slight format change of the gcno
and gcda. Make some adaption in the gcov dump function to fix the
code coverage report.

Mainly two places change:
1. Added the checksum in the struct gcov_info. This fix the crash
in qemu_x86, and mps2_an385 when run with --coverage.

2. Adjust the GCOV_TAG_FUNCTION_LENGTH accroding to gcov-io.h. It's
length unit is caculated by bytes now.

Fixes #50255.
Fixes #50257.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-22 14:14:39 +00:00
Gerard Marull-Paretas
fa308ca191 doc: release-notes: fix syntax issues
This patch fixes a couple of syntax issues that lead to incorrectly
rendered content:

- Bad list indentation
- Missing blank line between list item and sub-item.

Also made 'label' a literal.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-22 13:54:45 +00:00
Vinayak Kariappa Chettimada
30823c6f56 Bluetooth: Controller: Fix stream index use in Broadcast ISO Tx
Fix incorrect use of stream handle instead of connection
handle to enqueue Tx ISO Data, and use stream index to get
stream instance.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-22 15:53:35 +02:00
Stephanos Ioannidis
e52b621d6c doc: release-notes: Add C library release notes for 3.2
This commit adds the C library release notes for the Zephyr 3.2
release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-22 15:46:49 +02:00
Fabio Baltieri
96fc137654 twister: treat imgtool image exceeded as flash overflow
Twister detects FLASH overflow and skips tests that trigger that
condition by default, but sometimes images are just on the flash size
limit and then overflows at a later stage when imgtool adds a trailer,
which gets detected as a build fail and fails the run.

This detects the imgtool flash overflow together with the normal build
ones, causing the build to be skipped on imgtool flash overflow as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-22 12:41:25 +00:00
Gerard Marull-Paretas
7e6e4579c2 doc: release-notes: add details on pinctrl/pinmux changes
Inform about pinmux deprecation and add relevant changes in the pinctrl
area.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-22 10:55:44 +00:00
HaiLong Yang
ea59b0ce79 doc: release: 3.2: add GigaDevice changes
More GigaDevice support added, include drivers, boards, etc.
Also, some known issue has been fixed.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-09-22 10:54:27 +00:00
Kevin Townsend
5af0fbc2e3 doc: release-notes: Add Aarch32 release notes
Adds Aarch32 release notes for Zephyr 3.2.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-22 10:08:10 +02:00
Kevin Townsend
d180be37a1 doc: release-notes: Add TF-M release notes
Adds release notes for Zephyr 3.2 related to TF-M.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-22 10:07:53 +02:00
Pavel Vasilyev
e4921cc84d Bluetooth: Mesh: Trigger GATT update when subnet is added
When the node is part of only one subnet, it starts Network ID
advertisements with infinite timeout. It is not an issue when using
legacy advertising and extended advertising with shared set for local
messages and GATT because any message will stop advertisements. However,
when a separate adv set is used for GATT advertisements,
`struct bt_le_ext_adv_cb.start` callback won't be called, but the
implementation relies on that callback to switch to a next subnet.
Calling `bt_mesh_adv_gatt_update()` stop GATT advertisement so that the
implementation can switch to the next subnet.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Pavel Vasilyev
20a3a83c9f Bluetooth: Mesh: Fix node identity interleave multiple subnets
Reduce advertising duration to `max_timeout` when advertising node
identity for multiple subnets. This will let the node to interleave
subnets for NODE_ID_TIMEOUT.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Pavel Vasilyev
326786efd6 Bluetooth: Mesh: Avoid indefinite timeout when duration less than zero
`struct bt_le_ext_adv_start_param.timeout` resolution is in 10ms. When
duration is less than 10ms, division will be evaluated to zero, which
will result in indefinite timeout. Set timeout to 10ms to avoid
indefinite timeout. The advertisement will end earlier anyway after the
event is finished.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Daniel Leung
55c4e06b35 doc: release-notes/3.2: add bits on serial/UART drivers
This mentions changes on serial and UART drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
e285034579 doc: release-notes/3.2: add bits on PECI drivers
This adds bits about PECI drivers:

* Devicetree binding changes for the ITE it8xxx2 driver.
* New driver for Nuvoton NPCX.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
ce4e3206fb doc: release-notes/3.2: about new PCIE shell subcommands
This mentions the new PCIE shell commands.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
8242739aa5 doc: release-notes/3.2: about new API on MM drivers
This adds the bits about new API in the memory management drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
9bd51614ff doc: release-notes/3.2: add a few bits on IPM
This adds a few bits on changes about IPM.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
a72b44fd11 doc: release-notes/3.2: add bits on Xtensa
This adds a few bits about changes on Xtensa.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
6f141a92ab doc: release-notes/3.2: add bits related to I3C
This adds a few bits about the new I3C controller API,
a new controller driver, and about extending an existing
sensor driver for I3C.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Fabio Baltieri
7b64f63139 drivers: kscan_ite_it8xxx2 fix wrong comment reference
The note refers to the wrong API, that has been replaced by a pinctrl
call, update the comment.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-21 13:54:54 -05:00
Fabio Baltieri
c19c5a99cf boards: drop few stale CONFIG_PINMUX entries
The one in esp32_net_defconfig is redundant and lpcxpresso51u68 is not
really using any of the pinmux api, so that can go as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-21 13:54:54 -05:00
Daniel DeGrasse
5980aa0196 drivers: gpio: gpio_mcux_igpio: handle gpio-reserved-ranges property
Add code to handle parsing the gpio-reserved-ranges property present on
iMX GPIO controllers, so that gpio controllers with gaps in their pin
indexing can still have pinmux settings applied correctly.

Fixes #50142

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 13:50:26 -05:00
Daniel DeGrasse
3e99bd1e46 dts: arm: nxp: add gpio-reserved-ranges property to RT10xx devices
Add gpio-reserved-ranges property to gpio controllers on RT10xx devices
that have gaps in their GPIO numbering.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 13:50:26 -05:00
Daniel Leung
b820cde7a9 soc: esp32: use Z_KERNEL_STACK_BUFFER instead of...
...Z_THREAD_STACK_BUFFER.

This is currently a symbolic change as Z_THREAD_STACK_BUFFER
is simply an alias to Z_KERNEL_STACK_BUFFER without userspace,
and Xtensa does not support userspace at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 18:47:13 +00:00
Daniel Leung
74df88d8f5 soc: intel_adsp: use Z_KERNEL_STACK_BUFFER instead of...
...Z_THREAD_STACK_BUFFER.

This is currently a symbolic change as Z_THREAD_STACK_BUFFER
is simply an alias to Z_KERNEL_STACK_BUFFER without userspace,
and Xtensa does not support userspace at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 18:47:13 +00:00
Ruud Derwig
9bccb5cc4b ARC: fx possible memory corruption with userspace
Use  Z_KERNEL_STACK_BUFFER instead of
Z_THREAD_STACK_BUFFER for initial stack.

Fixes #50467

Signed-off-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
2022-09-21 18:46:06 +00:00
Chen Peng1
4c85c84ec2 x86: Kconfig: update dependency for X86_FP_USE_SOFT_FLOAT
Update Kconfig dependency for X86_FP_USE_SOFT_FLOAT.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-09-21 18:43:11 +00:00
Chen Peng1
02f5e14b65 test: timer: behavior: Enhancement for running this test
Zephyr timer is based on system ticks, there usually exists some time drift
due to round up/down errors between cycles, ticks and time delay, we
need to add those expected time drift into the bound calculation for
running this test.
Add a new config TIMER_TEST_PERIOD_MAX_DRIFT_PERCENT for users to set
expected maximum drift percentage for the timer period.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-09-21 18:43:11 +00:00
Antoniu Miclaus
9dda350e24 drivers: sensor: adxl372: update driver
Handle SPI/I2c interface in the dts.

Support multiple instances.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2022-09-21 18:40:06 +00:00
Erwan Gouriou
9293222d25 tests: kernel: tickless: Don't run on nucleo_l073rz
Tickless test enables PM which implies use of LPTIM as ticker on STM32
platforms.
Specifically on nucleo_l073rz, this configuration is fragile as only
LSI(37KHz) could be used as LPTIM tick source, whith a huge accuracy
tolerance (20%).
This works on most cases, when a specific tick freq (4000 ticks/sec),
but this tests explicitly requires tick frequency set to 100.

Excludes nucleo_l073rz for this test.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-21 18:39:07 +00:00
Erwan Gouriou
2d740d42e0 drivers: timer: stm32_lptim: Change clock source config check sanction
A specific check is implemented lptim driver in order to ensure global
platform clock/tick configuration is in line with recommendations.
To respect portability principles, don't error out when a config
conflict is detected but generates a warning instead.
Also, since these are only recommendations, provide an option to override
the check. Besides automatically override when ZTEST is enabled, as some
kernel tests specifically configure tick freq to 100.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-21 18:39:07 +00:00
Enjia Mai
bafc258025 tests: kernel: common: remove the nop test case
The test case was originally designed for the coverage of
nop()/arch_nop() function. It is not very meaningful for
testing something but causing lots of false alarms on the
kernel/common test so far. Suggest removing this test case.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-21 13:38:09 -05:00
Anas Nashif
b3ead37efa twister: temporarily disable mec15xx boards
A workaround to exclude boards from twister. Other solutions do not work,
setting twister fields to false in the board yaml file is not enough,
given that this board has many associated samples and tests, so it can't
be disabled on its own.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-21 18:05:51 +00:00
Gerard Marull-Paretas
920ad1fff1 drivers: pinmux: deprecate pinmux
Pinctrl API has taken over pinmux. As planned, pinmux is going to be
deprecated for the next release (3.2). This patch flags all pinmux APIs
as deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-21 18:05:51 +00:00
Jay Vasanth
3bab0081dd samples: espi: add pinctrl in mec1501 board overlay
update mec1501modular board overlay to include pinctrl
properties for spi

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
a4ad4a2914 boards: microchip: mec15xx: delete pinmux.c files
remove pinmux support in mec15xxevb and mec1501modular
boards. pinmux API is deprecated in 3.2 release.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
d6ba6a5fac spi: mec15xx: add pinctrl for mec15xx/mec1501 qmspi
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 qmspi. Update board dts, pinmux and driver files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00