Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS22HH sensor reporting wrong pressure data #35871

Closed
nashif opened this issue Jun 2, 2021 · 4 comments · Fixed by #35907
Closed

LPS22HH sensor reporting wrong pressure data #35871

nashif opened this issue Jun 2, 2021 · 4 comments · Fixed by #35907
Assignees
Labels
area: Sensors Sensors bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@nashif
Copy link
Member

nashif commented Jun 2, 2021

Describe the bug

The pressure sensor reporting wrong data that is too high

To Reproduce
Steps to reproduce the behavior:

  1. west build -b frdm_k64f samples/shields/x_nucleo_iks01a3/ -- -DSHIELD=x_nucleo_iks01a
  2. See data on console

HTS221: Temperature: 25.9 C
HTS221: Relative Humidity: 45.5%
LPS22HH: Temperature: 26.3 C
LPS22HH: Pressure:25822.956 kpa
STTS751: Temperature: 27.2 C
LIS2MDL: Magn (gauss): x: -0.864, y: -0.270, z: -0.330
LIS2MDL: Temperature: 4631.4 C
LIS2DW12: Accel (m.s-2): x: -0.459, y: 0.000, z: 9.648
LSM6DSO: Accel (m.s-2): x: 0.043, y: -0.273, z: 9.892
LSM6DSO: GYro (dps): x: 0.005, y: 0.021, z: 0.047
51:: lps22hh trig 10080
51:: lis2dw12 trig 10182
51:: lsm6dso acc trig 2
51:: lsm6dso gyr trig 2
51:: lsm6dso temp trig 0

Expected behavior

Value should be realistic

@nashif nashif added bug The issue is a bug, or the PR is fixing a bug area: Sensors Sensors labels Jun 2, 2021
@nashif
Copy link
Member Author

nashif commented Jun 2, 2021

also note:

LIS2MDL: Temperature: 4631.4 C

@avisconti
Copy link
Collaborator

@nashif
Anas, can you possibly set the priority of this bug? For me it is low, but I'll let you decide. Anyway, I'll start asap.

@avisconti
Copy link
Collaborator

also note:

LIS2MDL: Temperature: 4631.4 C

@nashif
This is LIS2MDL, can you please open a separate bug for it?

avisconti added a commit to avisconti/zephyr that referenced this issue Jun 3, 2021
The lps22hh 24 bit raw sample is left aligned, which means that
it needs to be right-shifted by 8 before applying conversion.
Moreover the conversion has been simplified for clarity.

Fix zephyrproject-rtos#35871

Signed-off-by: Armando Visconti <armando.visconti@st.com>
@nashif nashif added the priority: medium Medium impact/importance bug label Jun 3, 2021
@nashif
Copy link
Member Author

nashif commented Jun 3, 2021

see #35910

galak pushed a commit that referenced this issue Jun 3, 2021
The lps22hh 24 bit raw sample is left aligned, which means that
it needs to be right-shifted by 8 before applying conversion.
Moreover the conversion has been simplified for clarity.

Fix #35871

Signed-off-by: Armando Visconti <armando.visconti@st.com>
sabhiram added a commit to recogni/zephyr that referenced this issue Sep 16, 2021
* arm: shrink names for null-pointer exception detection Kconfigs

Reduce the length of the Kconfig defines related to
null-pointed dereference detection in Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* arm: cortex-m: shrink hidden option for null-pointer detection

Shrink the name of the hidden cortex-m option for the
null-pointer dereference detection feature.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* boards: arm: Update frdm_k64f and mimxrt10{60,64}_evk board docs

Updates board documentation for several NXP boards to reflect currently
supported features, NXP documentation links, clarifications on debug
probes, additional troubleshooting tips, and some minor editorial
changes.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

* MAINTAINERS.yml: Add myself as ARM collaborator

Currently the Cortex-R platform has no one watching over it.  Submitting
myself to help with the Cortex-R parts of the ARM architecture.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>

* tests: ztest: Use #if defined()

This compile test should be checking if a symbol has been defined,
otherwise it is using the kconfig value directly.  This fixes a warning

../src/main.c:115:37: warning: "CONFIG_SOC_QEMU_ARC" is not defined,
evaluates to 0 [-Wundef]

when using the -Wundef flag.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>

* nios2: max10: fix uart0 base register

Fix register for uart0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* boards: max10: fix function name in debug section

_Cstart was renamed, fix the docs to reflect that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* nios2: revert back to builtin sys_io functions

Some time ago we did a cleanup of sys_io function and left nios2 broken,
especially on the MAX10 board. Revert back to the original
implementation for this architecture.

Fixes #35694

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* kernel: k_sleep: fix return value for absolute timeout

Fixes calculation of remaining ticks returned from z_tick_sleep
so that it takes absolute timeouts into account.

Fixes #32506

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>

* dts: same70: use lower case letter in tc0 reg address

The change removes the following warning:
Warning: /soc/tc@4000C000: simple-bus unit address format error,
         expected "4000c000"

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>

* sensor: qdec_sam: use compatible atmel,sam-tc-qdec

Change the drivers's compatible from atmel,sam-tc to atmel,sam-tc-qdec.
The atmel,sam-tc should be reserved for the future counter driver.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>

* ARC: gcc-m-cpu: use -mcpu=archs as a default for ARCv2 HS

Due to the fact that we use -mcpu=hs as a default for ARCv2 HS
the compiler doesn't generate multiply/divide/mac/64bit memory
operations instructions.

Fix that by using -mcpu=archs as a default for ARCv2 HS which is
fits for all existing boards with ARCv2 HS CPU.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>

* soc: arm: nxp: kinetis: k2x: remove MPU support

Remove (disabled) MPU support for the NXP Kinetis K2x. At least the
MK22F51212, which is the only K2x supported by Zephyr so far, does not
contain an MPU.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>

* arch: arm: cortex-m: add support for clearing NXP MPU regions at boot

Clear NXP MPU regions at boot if CONFIG_INIT_ARCH_HW_AT_BOOT is
enabled.

Fixes: #34045

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>

* cmake: arm64: Bail out if the old SDK is used

After the ARM/ARM64 split the SDK 0.12.4 is needed to be able to compile
the ARM64 arch code. Bail out if an old SDK is detected at compile time.

Also change the minimal supported Zephyr SDK to v0.12, as agreed in
Toolchain WG.  Main reason is added compiler architectures and important
inclusion of fixes, for example qemu and arm fixes for veneers (TFM)

Signed-off-by: Carlo Caione <ccaione@baylibre.com>

* manifest: update TF-M with latest upstream

The TF-M update brings in the latest PSA crypto headers,
after TF-M switched formally to MBedTLS 2.26.0. It also
brings in some important fixes for cache enabling in nRF
platforms.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* samples: tfm_integration: tfm_ipc: Remove regression dependency

Removes the dependency on the external test service from the
CONFIG_TFM_REGRESSION_S test suite, instead
demonstrating how to make direct IPC calls to the CRYPTO
service that is available as a part of standard TF-M builds.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>

* boards: lpcxpresso55s69: fix TFM offset for builds without MCUboot

The flash layout definition has changed in upstream TF-M for the
LCPXPRESSO55S69 platform, for builds without bootloader. Fix the
layout in the boards' configuration, as well.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* samples: tfm_ipc: update DT overlay for nucleo_l552ze_q_ns

Update overlay file for nucleo_l552ze_q_ns board,
since now the sample does not enable REGRESSION,
and thus regular TF-M flash layout for the board
is used.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* samples: tfm_integration: DT overlay doc fixes for stm32l562e_dk_ns

Minor documentation fixes for the DT overlay files for
stm32l562e_dk_ns board.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* doc/releases: v2.6.0: Update for SoCs and ARM boards

Add list of new SoCs and ARM boards added in this release.  (Folded the
STM32 board section into the ARM board section).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* drivers: pinmux: mchp: Update pinmux based on latest HAL

Microchip HAL 1.2.0 fixed a bug in the define of GPIO
control register MUX field. The incorrect MUX defined
cleared by GPIO input pad disable field by accident.
After the MUX definition was corrected the pinmux driver
must be modified to mask off the input pad disable for
the pin to be operational.

Signed-off-by: Scott Worley <scott.worley@microchip.com>

* release: Zephyr 2.6.0-rc2

Set version to 2.6.0-rc2

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* Bluetooth: ISO: Speed up BT ISO data processing

For the native posix build the sleep calls used in tasks will stall
the zephyr instance which sets an upper limit on the data processing
interval to once every 20-30 millisecond.
This change reduces the duration of the sleep calls and increases the
TICKS_PER_SECOND to allow for shorter sleeps. This is needed to
support the data rates needed for LE Audio streaming. The rate is
tuned to support up to bidirectional 5ms ISO-intervals.
This change also increases the ISO buffer count from 1 to 5 to
allow for some buffering in the controller, which is needed for
gapless playback and/or use of burst number larger than 1.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>

* Bluetooth: ISO: Add sequence number to ISO data packets

The sequence number is needed in the appliaction layer to detect lost
packets in the ISO stream in cases where the timestamp is not included.
(Sequence number is mandatory to include where timestamp is optional).
The API for the public metadata have been moved to a public header file.

As the size of the ISO meta data exceeds the default 4 octets net_buf
user_data the public ISO metadata have been moved into a seperate array.
The internal metadata is still stored in net_buf user_data.

This also fixed the user_data overflow on 32 bit systems, caused by
writing the ts into user_data on index 4 to 7, which is outside the 4
allocated bytes.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>

* Bluetooth: ISO: Make it possible to setup unidirectional CIS

The current iso commands in the shell only supports setting up
a bidirectional stream or unidirectional for central role.
Adding rx/tx/rxtx option to iso listen command to allow for
peripheral side configuration of an iso connection.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>

* drivers: console: rtt: Add no multithreading support

Avoid calling k_sleep when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* manifest: update segger

Update segger with RTT version that support no multithreading.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* logging: backend_rtt: Align to changes in RTT_LOCK/UNLOCK

RTT_LOCK/UNLOCK in certain configuration creates code block (curly
braces). In that case variables declared inside are local to that
block. Moved declaration of ret variable before the block. Updated
code to ensure that RTT_LOCK/UNLOCK are in the same code block.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* drivers: can: can_set_bitrate is not a syscall

There was a verification function for can_set_bitrate calling a syscall
implementation. But, can_set_bitrate is not a syscall and does not need
to be because it is accessing the driver through other syscalls.

Fixes #34734

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* drivers: can: Fix compilation issue

Remove extra (and syntactically wrong) semicolon.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* doc/releases: v2.6.0: Update drivers section

* Remove driver categories that didn't have any major updates
* Add a first pass on new drivers that got added

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* cmake: c++ exceptions linking support

Fixes part of: #32448

This commit updates the CMake CMAKE_CXX_LINK_EXECUTABLE to include
crtbegin.o and crtend.o at the right locations when linking with gcc.

It also updates linker scripts to ensure proper location of the
exception header frame sections.

This ensure proper handling of exceptions for those architectures
- x86
- xtensa
- riscv32

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* tests: libcxx: increase ZTEST_STACKSIZE and added platforms for testing

Increasing ZTEST_STACKSIZE to 4096.
This ensures that the riscv32 platforms can succesfully execute the
C++ exception test cases.

Also add the following platforms to allow list:
- qemu_arc_em
- qemu_arc_hs
- qemu_cortex_m0
- qemu_cortex_m3
- qemu_cortex_r5
- qemu_riscv32
- qemu_x86
- qemu_xtensa

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* drivers: wifi: esp32: fix reconnect issue

Device won't reconnect automatically even if
AP station is available. This fix adds the carrier event, indicating
that network is present again enabling DHCP bound event.
Also, internal wifi event callback was added into wifi
driver to enable proper event handling.

Update west.yml to bring exposed wifi event callback.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>

Fixes #33843

* scripts: size_report: fix pylint docstrings and import issues

This fixes the issues on import statements identified by pylint.
Also add docstrings for method and classes. Most of them are
already there as comments, so simply move them as docstrings.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* scripts: size_report: recognize C++ file extensions

This adds some common C++ file extensions so the script
can recognize those as source file, and display them in
different color.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* scripts: size_report: keep full path until inserting into tree

This changes how paths are stored in intermediate structures
so that full paths are stored. This makes it more consistent
with those structures to avoid an issue where some paths are
full paths, some are relateive to ZEPHYR_BASE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* scripts: size_report: alter how nodes are grouped together

This changes how the tree is generated. Symbols with no paths
are now grouped together instead of scattering throughout
the tree. If paths in ELF file are not all under ZEPHYR_BASE,
it will create additional node groups as 2nd level. This is
useful when not all source files are under ZEPHYR_BASE, and
provides a better indications of where they are.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* scripts: size_report: add tree node for hidden symbols

The list of symbols only contain visible symbols that can be
obtained through ELF file. There are code and data where
the toolchain never emits symbols for them and thus are not
visible in the list. So add a "(hidden)" node to the tree
to show they are there.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* scripts: size_report: add tree node for WORKSPACE

Add a tree node to group files under WORKSPACE so that
they won't be shown with full path. The WORKSPACE is
usually the same as WEST_TOPDIR unless ZEPHYR_WORKSPACE
is defined during build.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* net: sockets: tls: check return code from fcntl

Not checking return code in fcntl can result in interpreting -1 as
flags, and cause unexpected behaviour.

Fixes #35541

Signed-off-by: Emil Lindqvist <emil@lindq.gr>

* drivers: modem: ublox-sara-r4: implement F_GETFL in ioctl

Zephyr sees fnctl as an alias of ioctl, and so the F_GETFL
request should be handled here as well.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>

* posix: pthread_exit: check for null before dereferencing

In a primitive SYS_SLIST_FOR_EACH_NODE check for null was
after dereferencing. Place check for null of the "thread_spec_data"
before its dereferencing.

Found as a coding guideline violation (MISRA R4.1) by static
coding scanning tool.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>

* doc: improve installing dependencies

A few language fixes to the install dependencies section.
Also adding IDs to be able to link directly.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>

* doc: improve doc processor installation

A few language fixes to the "Installing the documentation
processors" section.
Also adding comments to be able to include this section in
other locations.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>

* soc: mchp: Deep sleep exit sequence update

Zephyr kernel masks interrupts before calling the SoC PM
sleep entry point. On the Cortex-Mx family this prevents
wake from peripheral interrupts. The SoC PM layer requires
interrupts to wake the SoC and must prevent the CPU from
vectoring to an interrup until PM exit. The SoC does this
by setting ARM NVIC PRIMASK to 1 and BASEPRI to 0. On
return to the kernel SoC sets PRIMASK to 0 allowing ISR's
to fire. In addition the MEC HW only clears its peripheral
sleep enables if the CPU vectors to an ISR. On wake we
clear the MEC PCR sleep control register which clears all
the peripheral sleep enables so peripherals will be active
before exiting the SoC PM layer.

Signed-off-by: Scott Worley <scott.worley@microchip.com>

* ci: labeler: add Power Management

Add support for Power Management automatic labeling.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* drivers: ieee802154: fix ACK length handling

OpenThread expects the FCS field at the end of the ACK frame to be
passed with `otPlatRadioTxDone`.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>

* pm: device: Get rid of z_pm_core_devices

z_pm_core_devices was hack to set some priority between devices. It
was doing it hardcoding some devices that were the first to bring up
and the last to power down. Remove it and use the same list used to
initialize devices.

Fixes #34214

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* pm: device: Get rid of device_idx_t

It was just making the code hard to read. Also it was not following
the code guideline because the type was not telling us the sign
and size.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* linker: cpp: Disable sorting of C++ exception handling info sections

The `CONFIG_LINKER_SORT_BY_ALIGNMENT` config, which is enabled by
default, causes the sections containing C++ exception handling
information to be re-ordered for certain targets (in particular, the
64-bit arch targets). This effectively breaks the required "crtbegin.o
-> others -> crtend.o" order and causes the address of the
__EH_FRAME_BEGIN__ symbol to be invalid; thereby, causing C++
exception unwinding to fail.

This commit adds SORT_NONE property to these sections in order to
ensure that the linking order specified in the linker command line is
maintained.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* tests: cpp: libcxx: Update C++ exceptions testing filter

This commit updates the filter for cpp.libcxx.exceptions test to allow
testing on all architectures except the ones that are known to be
broken (see #32448).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* cpp: Restrict C++ exceptions usage to supported archs

This commit makes CONFIG_EXCEPTIONS un-selectable for the architectures
that are known to have broken C++ exception handling support
(see #32448).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* doc: release-notes-2.6: Add entries for ADC and PWM drivers

Add release notes related to ADC and PWM.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>

* Tracing: TRACING_NONE Compilation Fix

Fixed several compilation errors that resulted from selecting
TRACING without specifying a tracing system (Tracerecorder,
CTF, Systemview). In this case (TRACING_NONE), some default trace hooks
(in tracing.h) were incorrectly named resulting in compilation errors.
The legacy sys_trace_isr_enter, sys_trace_isr_exit, and sys_trace_idle
also caused problems since these were only given as defines, resulting
in undefined reference errors since they are required by the assembly
files calling these. To solve this issue I've added a stub file
"tracing_none.c" (only compiled if TRACING_NONE) and declared the
functions in tracing.h if no tracing system is selected.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>

* samples: tensorflow: Fix sample path

Otherwise documentation mentions wrong path in the "west" options.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

* drivers: can: init timing.sjw also in canfd mode

This commit resolves the undefined behviour caused by missing timing.sjw
initialization.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>

* drivers/ADC: STM32: This solves coverity reported in ADC driver.

This commit it to resolve following bugs:
* Operands don't affect result.
* Logical dead code in stm32_adc driver.
Above mentioned bugs were solved by adding parenthesis and
changed the method of comparing. Since comparison of ADC
channel_id with the channel may cause loss of value.
So instead of direct comparison, introduced a mechanism to
convert channel constant to a decimal using
__LL_ADC_CHANNEL_TO_DECIMAL_NB() and strips away
the INTERNAL_CH bit and then compare with channel_id.

fix:
* zephyrproject-rtos/zephyr#35130
* zephyrproject-rtos/zephyr#35136

Signed-off-by: Affrin Pinhero <affrin.pinhero@hcl.com>

* scripts: series-push-hook: Use main as base comparison branch

Following master branch renaming to "main", update this script
to use $remote/main as base comparison branch

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

* tests: posix: common: clock.c: rephrase comment on tick alignment

This k_usleep(1) is a tick alignment, not a workaround. Simple
reword to avoid confusion.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>

* Kconfig: `ROM_START_OFFSET` fix for samd5x

Set `ROM_START_OFFSET` for SAMD5X series to match the value
calculated in the linker file after forced alignments in
`vector_table.ld`.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>

* scripts: gen_syscall: ignore Coverity overrun check

Coverity does not understand syscall mechanism and will already
complain when any function argument is not of exact size as
uintptr_t. So tell Coverity to ignore this particular rule here.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* board: set chosen zephyr,shell-uart in LEON boards DTS

This associates the SHELL UART backend with the DTS uart0. It solves
an issue with unresponsive shell.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>

* SPARC: add the Flush windows software trap

This commit implements the SPARC V8 ABI "Flush windows" software trap.
It enables support for C++ exceptions and longjmp().

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>

* tests: libcxx: added qemu_leon3 to C++ exception test

This exercises the SPARC support for C++ exceptions.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>

* cpp: Update list of archs supporting C++ exceptions

C++ exceptions are supported on SPARC.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>

* net: mgmt: Initialize the event callbacks statically

This commit allows to add callbacks to NET_EVENT_IF_UP events before
the network initialization.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>

* doc: zephyr.doxyfile.in: remove obsolete variable

From Doxygen 1.9.1 when running 'make htmldocs':

warning: Tag 'COLS_IN_ALPHA_INDEX' at line 1028 of file
'/tmp/tmpkbj62jo0' has become obsolete.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>

* doc: mainpage.md: fix for new doxygen

I'm getting the following error on doxygen 1.9.1:

.../zephyr/doc/custom-doxygen/mainpage.md:1:
error: multiple use of section label 'index' for main page,
(first occurrence:
.../zephyr/doc/custom-doxygen/mainpage.md, line 1)
(warning treated as error, aborting now)

Extension error (zephyr.doxyrunner):
Handler <function doxygen_build at 0x7f1abf9e30d0>
for event 'builder-inited' threw an exception
(exception: Doxygen process returned non-zero (1))

This fixes it for me without breaking anything in
_build/doxygen/html/index.html that I can see.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>

* doc: external_content: fix for Unix

Path.rename() uses os.rename() internally. Per the Python docs:

     The operation may fail on some Unix flavors if src and dst are on
     different filesystems.

Since 'src_adjusted' is in a temporary directory, on my flavor of
Unix, that's in /tmp, which is indeed on a different filesystem than
'dst', a destination in the doc build directory on my root filesystem.

This is causing the following error when I build the docs:

Handler <function sync_contents at 0x7f9b8fca9c10> for event
'builder-inited' threw an exception (exception: [Errno 18] Invalid
cross-device link: '/tmp/tmpfscfo20o/index.rst' ->
'/home/mbolivar/zp/zephyr/doc/_build/src/reference/drivers/index.rst')

Fix this by using shutil.move() instead of Path.rename(). The shutil
function handles cross-filesystem moves correctly. It did not take a
path-like object for both its src and dst arguments until Python 3.9,
though, so we need to convert to strings for portability on earlier
but still supported versions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>

* Bluetooth: ISO: Simplify reference handling

This makes bt_conn_cleanup to be automatically called when the last
reference to a connection of BT_CONN_TYPE_ISO is dropped.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

* Bluetooth: ISO: Fix not assigning CIG and CIS IDs

When handling CIS Requested event CIG and CIS IDs must be set in order
for the channel to be properly accepted.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

* Bluetooth: ISO: Fix call order of connected callback

The state shall be set before calling the callback as it could be check
code behind would expect the channel to be in connected state.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

* Bluetooth: conn: Add support for ISO connections to bt_conn_get_info

This enables bt_conn_get_info to be used with connection of type
BT_CONN_TYPE_ISO.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

* Bluetooth: shell: Add connection type information to connections command

This prints information about the role and id along with connection
parameters in case the connection is of LE type.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

* Bluetooth: conn: Align cleanup for ISO connections

This makes connections of type BT_CONN_TYPE_ISO use BT_CONN_CLEANUP to
cleanup so the TX and RX queues are properly cleanup.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

* drivers: flash: nrf_qspi_nor: Fix no multithreading compilation

Fixing error introduced in 951e72b94769f55b0c2f2cf70f81d063ec81d11e
where ifdef was converted to IS_ENABLED. Ifdef was required because
element in the struct does not exist when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* doc/releases: v2.6.0: Updated Major enhancements section

Added bullets for ARC64, ARM32/64 split, TCP legacy removal, and
ARM v8.1-m support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* soc: xtensa: linker: Update linker scripts for C++ build

When we link in crtbegin.o for C++ exception support we end up pulling
in the .tm_clone_table section.  We need to update the linker scripts
to handle this.  soc/xtensa/sample_controller/linker.ld was already
updated, this fixes the others.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* drivers: serial: nrf_uarte: Fix async/int TX api in inactive state

Currently zephyr has no means to control access to the uart
driver when it is inactive, e.g. shell is not aware of uart
being in idle state and calls asynchronous api. Add early
return to TX starting procedure if device is idle.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* doc: security: Change 'master' to 'main'

Fix up a handful of references to 'master' in the security documentation
to refer to the new 'main' branch.

Signed-off-by: David Brown <david.brown@linaro.org>

* kernel: mmu: add doxygen group for demand paging APIs

This adds the doxygen group for demand paging APIs in
sys/mem_manage.h header file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* kernel: mmu: rename z_eviction* to k_mem_paging_eviction*

These functions and data structures are those that need
to be implemented by eviction algorithm and application
outside kernel. Promote them from z_* so these can be
included in documentation.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* kernel: mmu: z_backing_store* to k_mem_paging_backing_store*

These functions are those that need be implemented by backing
store outside kernel. Promote them from z_* so these can be
included in documentation.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* doc: add some bits about demand paging

This adds some information about demand paging in Zephyr.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>

* doc: release: Add Bluetooth release notes for 2.6

Document the most important changes in the Bluetooth subsystem for the
2.6 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>

* net: capture: Fix the function documentation

The net_capture_pkt() does not return anything so remove the
return description from the function documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

* net: capture: Fix the return value of net_capture_is_enabled()

The net_capture_is_enabled() function returns boolean value
so fix the function prototype.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

* kernel: stack_sentinel: disable in single-threaded builds

Add a dependency on MULTITHREADING for the
STACK_SENTINEL feature, so it may not get
enabled in single-thread Zephyr builds.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* tests: arm: fix name for arm_irq_vector_table test suite

Minor fix to the name for the arm_irq_vector_table
test suite, removing the 'interrupt' from the name.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* net: l2: bluetooth: Handle error if failed to register server

Return error code if init code failed to register the L2CAP server.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* docs: Change a number of 'master' branch refers to 'main'

Now that we use 'main' for git development, update the docs to reflect
or point there instead of 'master'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* Bluetooth: host:l2cap: fix sending error in le_ecred_reconf_req

Result to send was overwritten by BT_L2CAP_RECONF_SUCCESS just after
exiting while loop. This caused to send success response even if
reconfiguration failed. Now, result is initialized to success value,
and if reconfiguration fails, this value will be overwritten with
appropriate one. Added BT_L2CAP_RECONF_INVALID_CID (0x0003) for invalid
cid in request. Added BT_L2CAP_RECONF_OTHER_UNACCEPT (0x0004) to return
if MPS is to small. Reordered checks for mps/mtu as
BT_L2CAP_RECONF_OTHER_UNACCEPT is expected to be returned if both mps
and mtu are to small.

This was affecting L2CAP/ECFC/BI-05-C and L2CAP/ECFC/BI-05-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>

* doc: release: add documentation changes

Add a list of most relevant documentation changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* doc: toolchains: move description of alternative install method on mac

On macOS there exists an alternative install method for gnuarmemb.

Unfortunately this information was located with the Intel oneApi
toolchain description and not the GNU arm Embedded toolchain.

Move the description to its correct location.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* doc: release-notes-2.6: Added and refined some testcases of kernel

1.Added or refined some testcases, most of them are neagtive tests, to
  improve the test code coverage.

2.Provide test excution time per ztest testcase.

3.Add a feature which handles pytest script in twister and provide an
  example.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>

* docs: Fix doxygen errors in include/sys/mem_manage.h

Various params didn't match between docs and functions.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* doc: release notes: added oneApi toolchain to release notes

Adding Intel oneApi as new toolchain supported in Zephyr.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* doc: release: v2.6: add note for UART console input expired options

Add note for UART console input expired mechanism Kconfig options.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>

* doc: release notes: update tracing section

Update tracing section for the v2.6 release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* lib: newlib: fix _gettimeofday hook

The time() function works correctly with the minimal libc, but always
returns -1 with the newlib libc. This is due to the _gettimeofday hook
being implemented that way.

Fix that by calling gettimeofday in the _gettimeofday hook instead of
returning -1.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

* tests: error_hook skipping div-by-0 test on cortex M0 M0+

On the Cortex M0+, M0, M23 the div-by-zero is not mapped
as an hardware exception but triggers a HardFault.
The test case is skipped for any ARMV6_M_ARMV8_M_BASELINE.

Signed-off-by: Francois Ramu <francois.ramu@st.com>

* nios2: Fix C++ exception handling info linking

The NIOS2 architecture linker script was including `cplusplus-ram.ld`
linker script after `__data_ram_end`, and this caused the content of
`.gcc_except_table` section to be not copied to the RAM by the
`z_data_copy` function; leading to the C++ exception handling
malfunction.

This commit relocates the `cplusplus-ram.ld` linker script inclusion
such that the contents of the relevant sections are properly copied by
the `z_data_copy` function.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* cpp: Remove C++ exception handling arch restriction

The C++ exception handling feature is now supported on all
architectures.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* tests: cpp: libcxx: Test C++ exception handling on all archs

The C++ exception handling feature is now supported on all
architectures.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* doc: release: final release notes for cortex-m

Finalize v2.6.0 release notes for ARM Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* doc: release: release notes for Cortex-R

v2.6.0 release notes for Cortex-R.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* doc: release notes: remove blank lines

Remove blank lines between bullet points.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

* pm: device: remove CONFIG_PM_MAX_DEVICES

When a device is defined a new pointer to a device will be created in
the "z_pm_device_slots" region, effectively creating a device array with
the same size as the number of system devices. This array is then used
by the device PM subsystem to keep track of suspended devices during
power transitions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* sensor: use function properties to document the context

We now have function properties which can replace the confusing message
in the doxygen docs.

Fixes #10499

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* Bluetooth: host: Notify application about prepare write error

Notify application about prepare write error when continueing the write
procedure fails when RX thread is processing responses. It is possible
that this operation fails, either because of disconnection or ATT
timeout on the ATT bearer. Notify the application in case it needs to
clear up resources, e.g. the write parameters.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* Bluetooth: host: Reject remote public key on same X coordinate.

Reject remote public key when this has the same X coordinate.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* Bluetooth: host: Log failure to initiatie security for bonded peer

Log failure to initiatet security for bonded peer when GATT wants to
initiate security for CCCs for the remote.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* Bluetooth: samples: Fix peripheral sample handling of string values

Fix peripheral sample handling of string values. The read callback
uses strlen to get the length of the current string value. Make sure
that the string value is always zero-byte terminated.

Fix multiple characteristics using the same storage for its value.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* Bluetooth: hci: Add response structure for HCI CTE sampling enable cmd

Add missing response structure for HCI_LE_Set_Connectionless_IQ_-
Sampling_Enable command.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>

* Bluetooth: controller: hci: Set correct return params for CTE sampl enable

Fix bug of missing sync_handle parameter in return data in
HCI_LE_Set_Connectionless_IQ_Sampling_Enable commnad
handling function.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>

* Bluetooth: host: Check sync_handle return value when CTE sampl enable

Check correctness of returned sync_handle value while requesting
HCI_LE_Set_Connectionless_IQ_Sampling_Enable in controller.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>

* dts: arm: nxp: Add port property to nxp,lpc-gpio nodes

Add a port property to describe which hardware port a GPIO device node
is describing since we can't tell from the registers (as the registers
are interleaved in the same MMIO space).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* drivers: gpio: mcux_lpc: Convert driver to use devicetree port prop

Move to using port property for a few cases in which we need to know
which specific hardware port a device is for.  This allows us to
remove the PORT0/1 Kconfig options.  This also fixes the issue that
assumed pio0 would map to DT_INST(0) and pio1 would map to DT_INST(1)

Fixes #35693

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* workflows: backport: Switch to using main

The  workflow was pointing to `master` instead of `main`, which
prevented it from running after the branch was renamed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>

* Bluetooth: Host: add missing zero CIDs in ecred_conn_req

Fix missing 0x0000 CIDs in response for ecred_conn_req. Previously,
when one of "All connections refused" error i variable was set to 0,
thus no CIDs were copied to response.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>

* Bluetooth: Host: do not overwrite result in  le_ecred_conn_req

For more than one requested channels in le_ecred_conn_req only result is
overwritten in every iteration. This causes an issues if after failed
l2cap_chan_accept occures successful one: returned result will be
BT_L2CAP_LE_SUCCESS, where in reality should be returned error
and non-zero Destination CIDs will signal "Some connections refused".
Now, overwrite error only if the last one failed. If no errors occur,
result will remain BT_L2CAP_LE_SUCCESS.

This was affecting test cases L2CAP/ECFC/BV-20-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>

* Bluetooth: Host: change error returned when ecred_conn_req

BT_L2CAP_LE_ERR_INVALID_PARAMS shall be returned instead of
BT_L2CAP_LE_ERR_UNACCEPT_PARAMS.

This was affecting test case L2CAP/ECFC/BV-26-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>

* Bluetooth: ISO: Fix BIG cleanup

Fix a regression for cleaning up BIGs added by
80c824f18ee80caa5bd162b9d2957dde1639add6 where the way
ISO connections were unref'ed was changed.

bt_iso_cleanup has been changed to only effect CIS
(as the unref from that has been removed), so instead
of calling bt_iso_cleanup we just call
bt_conn_unref directly.

This also removes some unref's from the BIG complete
and BIG Sync complete event handlers as the BIS bt_conns as
they don't increase the ref counter before anymore.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>

* doc/releases: v2.6.0: Update for logging subsystem

Update release notes with logging v2 info.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* doc: add docs for west spdx

These are based on the commit log in
fd31b9b4acb5d48f83ef8cf0f3afe3e48b7844c0.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>

* doc: release-notes-2.6: west extensions

Just the extensions changes for Zephyr 2.6, since west has its own
release notes page as it's developed on its own pace.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>

* drivers: i2c: gpio: fix compilation

Fix the compilation of i2c_gpio.c after the gpio_config() syscall was
removed.

Fixes: 3632815e2e124c0c4b1ed09cd91f60ecbd2fda83

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>

* boards: arm: arty: fix compilation with v2c_daplink shield enabled

Fix the compilation of board.c when the DAPlink QSPI MUX devicetree
node is enabled.

Fixes: 3632815e2e124c0c4b1ed09cd91f60ecbd2fda83

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>

* drivers: can: sjw == 0 in can_set_timing should not change sjw

If the supplied sjw in the timing parameters is zero,
the sjw parameter should not be changed.
This fixes the uninitialized swj in can_set_bitrate.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>

* modules: mbedTLS: Add separate Kconfig entry for MBEDTLS_HAVE_TIME_DATE

Currently the MBEDTLS_HAVE_TIME_DATE mbedTLS option is enabled based on
the CONFIG_POSIX_API option. This doesn't seem right, since the enabling
the POSIX API does not guarantee that there is a valid time source in
the system. This was the case for the qemu_x86 platform, where enabling
POSIX_API caused TLS handshake failures due to certificate validation
errors caused by no valid time avaialble in the system.

Fix this by adding a specific KConfig entry for date/time configuration
in mbedTLS. Applications that need to enforce date verification in
mbedTLS should enable it explicitly instead of relying on the
non-obvious implicit configuration.

Fixes #35401

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>

* Bluetooth: Host: Add status check BIG sync/create events

Add a status check for the BIG sync established and
BIG sync created events such that we don't log a warning
of invalid BIS count when it is an error event.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>

* tests: bluetooth: bsim: Updated advx test to verify sync data

Updated advx test to verify sync data when no extended
header flags are set in the PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* Bluetooth: controller: Fix incorrect ext header flag access

Fix Periodic Advertising data population from corrupting
the PDU by populating fields when there is no flags in the
common extended advertising header.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* tests: bluetooth: bsim: Updated advx test to verify previous sync data

Updated advx test to verify previous sync data when no
extended header flags are set in the PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* Bluetooth: controller: Fix incorrect prev periodic header flag access

Fix Periodic Advertising PDU population from incorrectly
populating new PDU when there is no common extended header
flags being set in the previous PDU and or the new PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* Bluetooth: controller: Fix incorrect prev aux header flag access

Fix Extended Advertising PDU population from incorrectly
populating new PDU when there is no common extended header
flags being set in the previous PDU and or the new PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* Bluetooth: controller: Minor improvements to ext header population

Minor refactor and improvement to common extended header
population.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* thread analyzer: fix formatting for unsigned int

On 64bit systems, this was issuing warnings due to wrong formatting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* boards: up_squared: remove 32bit variant

This board was created for the transition to all 64bit, it is not needed
anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* boards: qemu_x86_coverage: remove board testing coverage

This board was added to test coverage feature when coverage was
introduced. This is now being testing with other boards and
configurations on a regular basis, so no need for this extra overhead in
CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* boards: minnowboard: remove untested and old board

Remove minnowboard configuration which is very basic and can be brought
back by just taking another X86 configuration. We have not tested this
board for a while and it is not being used actively, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* release notes: document removed x86 boards

Document removed boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* boards: acrn: do not run net/bt tests

Do not run those tests, the features are not enabled in ACRN.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* docs: release notes: PM API changes

Add information about API changes in device runtime PM.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* docs: release notes: PM release notes

Add notes about PM changes during this release cycle.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* docs: release notes: Simple tags fixes

Fix some wrong tags usage.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* soc: arm: Fix condition to set lpc55xxx flash wait states

Commit f5c6afeccb53e4121ba5e97294cf589a752623d9 attempted to avoid
accessing lpc55xxx flash registers in nonsecure mode by conditionalizing
part of the SoC clock initialization routine on whether the flash driver
was enabled. This caused secure applications without the flash driver
enabled (e.g., hello_world on lpcxpresso55s69_cpu0) to not boot or show
any console output. Fix this by changing the condition to depend on
whether we are building a nonsecure image.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

* release: Zephyr 2.6.0-rc3

Set version to 2.6.0-rc3

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* doc/releases: v2.6.0 Add new R-Car platform drivers

Add to the v2.6 release note all Renesas R-Car drivers
that have been merged during this period.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>

* boards: arm: bl5340: Fix LIS3DH IRQ levels

Levels were wrongly assigned to being active low instead of active high

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>

* logging: Eclipse CDT parser workaround

Recent rework in logging api brings complicated macros which can
overhelm Eclipse CDT parser.
This workaround disables expansion of LOG_xxx macros in Eclipse.

Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>

* doc/releases: v2.6.0: Updates and cleanups

* Add high level bullets about tracing & power mgmt
* Removed duplicated bluetooth section
* Remvoed RISC-V section, to changes of note for this release

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* doc: colibri board: Add missing empty lines

Two code-blocks were not correctly rendered, due to missing
empty lines before them. This commit fixes this.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>

* boards: doc: Update H3ULCB documentation

Update documentation for H3ULCB board following the
addition of new features during v2.6 windows.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>

* tests: posix: common: clock: exclude ehl_crb from test posix realtime

The ehl_crb board has hardware issue that prevents this test from
being able to pass this otherwise-correct test. So exclude ehl_crb
from the testcase.yaml.

Fixes #33544.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>

* doc/releases: v2.6.0: Update to MCUmgr and Shell section

Short update to list of changes to MCUmgr that impact Zephyr.
Note to Shell on changes that affect mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>

* lib: newlib: Add minimum required heap size config

This commit adds a new `CONFIG_NEWLIB_MIN_REQUIRED_HEAP_SIZE` config
that allows user to specify the minimum required heap size for the
newlib heap, and makes `malloc_prepare` validate that the memory space
available for the newlib heap is greater than this value.

The default minimum required heap size values were empiricially
determined, so as to allow the basic standard C functions such as
`printf` and `scanf` to work properly.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* tests: mem_alloc: Increase heap size for newlib nano test

This commit increases the heap size for the newlib nano test to 2048,
which is the recommended minimum required to ensure proper operation
(see #35799).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* tests: net: getaddrinfo: Increase newlib heap size

This commit increases the newlib heap size to 2048, which is the
recommended minimum required to ensure proper operation of the newlib
nano used by test (see #35799).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>

* drivers/sensor: lis2dh: use gpio_dt_spec oriented macros

Use gpio_dt_spec structure and related macros for both drdy
and AnyMotion interrupts, to have a more compat, readable and
safe code. Moreover, skip setting DRDY or AnyMotion trigger
from application if the corresponding irq-gpios has not been set.

(This commit also fixes #34794)

Signed-off-by: Armando Visconti <armando.visconti@st.com>

* samples: net: sockets: big_http_download: Update certificate

The Let's Encrypt X3 certificate is no longer in use, replace it with an
up-to-date certificate.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>

* doc: scripts: gen_devicetree_rest: add workaround for page width

Since Zephyr docs switched to fixed-width, the binding pages are not
displayed correctly. We should move to another data representation
format that works better for fixed-width documents. Until this decision
is made, add a workaround that forces the template to expand page width
to the maximum on binding pages.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* doc/releases: v2.6.0: Updates

* Removed ARCH POSIX, driver/pinmux, updatehub, settings, random, POSIX
  subsystem, and LGVL sections as no significant changes this release
* Add new drivers for eeprom, timer and watchdog sections
* Added bullet item about shared interrupt support being devicetree
  based
* Added bullet about moving of CMSIS portability headers

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* samples/boards/stm32: PM Blinky: Rework README

Rework README to provide a correct and understandable status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

* Bluetooth: host: Fix CCC store on write for multiple connections

Fix CCC store on write feature for multiple connections. CCCs are only
enqueued for storing when going from no connections subscribed to any
connection subscribed.
The CCC should be stored when its value is changed for the specific
connection.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* doc: intro: Add a reference to ARMv8-R

Specify that 64-bit Cortex-R, ARMv8-R, is now supported in Zephyr.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>

* doc: gs: Clearly state the main dependencies min version

Introduce a table with the minimum version required for the three main
dependencies (CMake, Python and DTC). At the same time remove the CMake
help code from the GSG, since it's just a duplicate of the instructions
that Kitware provides.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Co-authored-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>

* Tracing: Incorrect Unlock Mutex Trace Hook Fix

Changed location of the last k_mutex_unlock trace hook since it was
being called after k_sched_unlock, which could result in tracing
scenarios (other thread waiting for lock) where it appeared that a
mutex was being locked again before becoming unlocked.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>

* cmake: warn the user if a Zephyr library is created in app-mode

Fixes: #19582

When `find_package(Zephyr)` completes then all boilerplate code has been
processed and all Zephyr libraries has been placed inside the
whole archive flags.

Also all libs dependencies has been processed.

This is indicated by the presence of the zephyr_prebuilt target.

Thus, warn the user if `zephyr_library()` / `zephyr_library_named()`
is called in app-mode.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* doc: release-notes-2.6: add release notes for disk drivers

Add release notes for disk drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>

* doc: release-notes-2.6: add release notes for USB

Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>

* drivers/sensor: lps22hh: Fix the raw to kPa sample conversion

The lps22hh 24 bit raw sample is left aligned, which means that
it needs to be right-shifted by 8 before applying conversion.
Moreover the conversion has been simplified for clarity.

Fix #35871

Signed-off-by: Armando Visconti <armando.visconti@st.com>

* nxp: rt series eth timer clock enable

enable ethernet timer clock when enabling ptp

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>

* drivers/sensor: lis2mdl: Fix temperature sample handling

The lis2mdl temperature samples work with a level of 25 Celsius.
When temperature goes below that level the samples become negative
and there was an issue in properly propagating the sign.

Fix #35910

Signed-off-by: Armando Visconti <armando.visconti@st.com>

* boards: arm: 96b_aerocore2: fix table rendering

J1 header table was not rendered correctly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* doc: release: Add sensor changes to v2.6.0 release notes

Fills in the sensor drivers section of the v2.6.0 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

* doc: release: Add NXP-related changes to v2.6.0 release notes

Adds v2.6.0 release notes for NXP boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

* doc/releases: v2.6.0: add resolved issues

Add list of all resolved issues since 2.5.0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* boards: rt600: Add information to connect an external debug probe

Update documentation to include information on how to connect
an external debug probe

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>

* docs: pm: System power management diagram

Add a diagram for system power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

* tests: i2s_speed: Increase the RX buffer count

The NXP I2S driver queues 2 receive buffers to avoid receive overflows.
Allocate an extra block so we do not see test failures due to allocate
failures

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>

* logging: log_core.c: fix coding guideline 15.7 missing comment

The final else {} in the if...else if is missing required
comment (non-empty, ';' is not sufficient). This adds a comment
to comply with CG 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>

* logging: log_msg.c: fix coding guideline 15.7 missing comment

The final else {} in the if...else if is missing required
comment (non-empty, ';' is not sufficient). This adds a comment
to comply with CG 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>

* arch/x86_64: Terrible, awful hackery to bootstrap entry

Because of a historical misunderstanding, by default the ACRN
hypervisor wants to load Zephyr at address 0x1000 and enter the binary
at that same address.  This entry point corresponds to the __start
symbol of the build they were given, which is a 1-cpu non-SMP
configuration.  Unfortunately, when we build with
CONFIG_MP_NUM_CPUS=1, the code in locore.S #if's out the 16 bit entry
point for the auxiliary CPUs at the start of the section.  So in the
build ACRN received, the start address happened to be 0x7000, the same
address we need to launch the AP processors from.

That's right: under ACRN, the SAME ADDRESS used to enter the OS in 32
bit mode needs to be used later to boot CPUs running in 16 bit real
mode!

The solution, such as it is, is to put a 32 bit jump at the entry
address which hops to the 32 bit OS entry code, and then scribble NOP
instructions over that jump once we get there so that the next time we
reach that address (in real mode) we fall through to the correct
entry.

This patch should be considered a temporary workaround.  While it
works on all x86 hardware, it's not really needed.  A much better
solution would be to eliminate the locore linker region entirely
(which causes other headaches) and enter the Zephyr binary in a 32 bit
address somewhere in the contiguous high memory area.  All that locore
is needed for is the 16 bit bootstrap code for SMP processors, which
is ~6 instructions and can be copied in from the kernel at runtime.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

* arch/x86_64: Use modern CR0 assembly

The 16 bit bootstrap code for SMP CPUs was using the 286-era "lmsw"
instruction (load machine status word) to set the protected bit in CR0
(which is the modern evolution of the same register), presumably
because this is 16 bit code and we can't move a dword into CR0.

But that's wrong, because the full instruction set *is* available in
real mode on a 386, you just have to use a operand size prefix to get
to it, which the assembler emits for you automatically when you use
the .code16 directive.

Write this conventionally and use modern (e.g. 1986-era) instructions.
It also has the advantage of not confusing much more modern
hypervisors like ACRN by issuing instructions they (and I!) never knew
existed.

Fixes #35076

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

* boards/x86/acrn: Add APIC IDs

The ACRN hypervisor uses 0, 2, 4, 6 as its local APIC IDs for
virtualized CPUs and not the 0, 1, 2, 3 defaults we have.

(I hate this feature, having to manually (!) probe and code these
things in C isn't scaling.  Zephyr needs to do the probing on its own
somehow, even if it's an offline tool in Linux or something.)

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

* boards/x86/acrn_ehl_crb: Enable SMP by default

SMP is working now, make a 2-cpu configuration default for this
device.

Note that this requires changes to the default ACRN build
configuration!  In hybrid.xml, you need to specify multiple physical
CPUs for the VM to uses, e.g.:

    <vm id="0">
        ...
        <cpu_affinity>
            <pcpu_id>0</pcpu_id>
            <pcpu_id>1</pcpu_id>
        </cpu_affinity>
    </vm>

Failing to build with this change will result in the system hanging at
boot trying to start up a CPU that won't run.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

* boards/x86/acrn: Rework board documentation

ACRN build and configuration is non-trivially complicated, and so far
integration documentation has been mostly missing, and users have had
to get by via copying from existing integration efforts with minor
changes, leading to repeated mistakes and persistent confusion.  This
is an attempt to document the process from first principles, with an
eye toward informing integrators (not me!) who might come by later to
better automate things.  Some of the content is going to look remedial
to someone already familiar with e.g. ACRN configuration or EFI boot.

This simply replaces the pre-existing docs, which were for earlier
versions of ACRN where Zephyr was launched from the service OS instead
of the now-standard pre-launch VM mode.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

* boards/x86/acrn: Use APIC_TSC_DEADLINE_TIMER

This board got forgotten when we migrated the older APIC_TIMER users.
Now the platform is SMP by default and the older driver refuses to
build.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

* size_report: give root node a unique identifier

Call the root node 'root', otherwise we end up with two nodes with the
same identifier ':'.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* boards: arm: Clarify J-Link OpenSDA firmware usage for frdm_k64f

Updates the frdm_k64f board documentation to clarify that the J-Link
OpenSDA firmware version depends on the DAPLink bootloader version.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

* Bluetooth: controller: Check length field of scan response data

Check the length field of the scan response data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

* drivers: can: mcan: Fix DBTP sjw register writes

The data-sjw value was incorrectly written to the NBTP register when it
should be written to the DBTP register.

This fixes a regression introduced by
5e0ca9b41e5cd4d1d84ceef919510f3f2a22ecfe.

Signed-off-by: Christoph Steiger <c.steiger@lemonage.de>

* drivers: fix pm callback signature

For some reason a few drivers were not converted to the new device PM
callback signature. The reason may be because the device PM part is
compiled only when CONFIG_PM_DEVICE=y, a condition not enabled in CI by
default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* shell: Add missing dependency to shell log backend

Shell log backend depends on logging being enabled. Lack of this
dependency leads to compilation failure when logging is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

* manifest: segger: zephyr kconfig options

Update segger module version to revision that re-introduces zephyr
Kconfig options

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>

* drivers: cc13xx_cc26xx: fix pm.h not included

Fixes #35916.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>

* tfm: interface: Fix bug where FPU registers were not restored correctly

The caller saved registers were restored both as caller saved and
callee saved registers, i.e. register 0-15 were restored into
both register 0-15 and 15-31.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>

* Bluetooth: controller: Fix conn setup regression

Fix incorrect and redundant use of ticker user id ULL_LOW
instead of ULL_HIGH when setting up a connection using a
mayfly to disable LLL context. Also, the LLL context pointer
is invalid, where node rx is passed instead of LLL context.

Use the ULL disabled callback when done event has not yet
been processed, or a direct connection setup in ULL_HIGH
context when ULL is already disabled (reference count is
zero) is sufficient.

Regression introduced in commit 30f260dfaaf7 ("Bluetooth:
controller: Fix adv/scan context access post release").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>

* pm: do not use deprecate Kconfig

CONFIG_DEVICE_POWER_MANAGEMENT is deprecated, use CONFIG_PM_DEVICE
instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

* shell: fix tab for dynamic commands

The tabulator handler creates a single structure if it is handling
dynamic commands. If the currently processed dynamic command has a
dynamic subcommand they both share the same structure.
As a result tabulation operation may result in undefined behaviour.

As a solution, a new structure was introduced to keep subcommand
information.

Fixes #35926.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>

* doc/releases: v2.6.0: minor updates

* Added a bullet about new storage subsystem feature
* Moved disk subsystem changes into disk section

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

* cmake: support ZephyrBuildConfiguration_ROOT for package location

Fixes: #35890

The current implementation of Zephyr build configuration CMake package
only allows the build configuration package to be placed inside a
Zephyr workspace.

This commit extends the usability by allowing users to locate the
Zephyr build configuration CMake package outside the Zephyr workspace
and then refer to the package using
`-DZephyrBuildConfiguration_ROOT=<path>`
`set(ZephyrBuildConfiguration_ROOT <path>)`

This allows users greater flexibility in their workspace layouts.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* doc: Zephyr build configuration CMake package freestanding

Update to the Zephyr build configuration CMake package documentation
with description on how a Zephyr build configuration CMake package can
be located outside a Zephyr workspace.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

* doc: application: add details on example-application

Mention example-application as a reference application.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

* doc: add example application to the release notes

Mention the example application as a major enhancement and provide a
link to its repository.

Signed-…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants