Commit graph

83785 commits

Author SHA1 Message Date
Huifeng Zhang 2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang df41deac1c arch: arm: Remove aarch32 directory
It doesn't make sense to keep the aarch32 directory in the
'arch/arm/core' directory as the aarch64 has been moved out.

This commit introduces the following major changes.

  1. Move all directories and files in 'arch/arm/core/aarch32' to
    'arch/arm/core' and remove the 'arch/arm/core/aarch32' directory.
  2. Move all directories and files in 'arch/include/aarch32' to
    'arch/include' and remove the 'arch/include/aarch32' directory.
  3. Remove the nested including in the 'arch/include/kernel_arch_func.h'
    and 'arch/include/offsets_short_arch.h' header files.
  4. Change the path string which is influenced by the changement 1
    and 2.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Alperen Şener f6a9fc1202 Bluetooth: Mesh: add optional OOB info to ext scan report
Even though the OOB information is optional we can add it
to extended scan reports in cases there is detected unprovisoned
devices.

Referring to MshPRT section 4.4.5.3:
When the Remote Provisioning Extended Scan procedure completes without
receiving an advertisement from the unprovisioned device, the
OOBInformation and AdvStructures fields shall be skipped. When the
obtained data is empty, the AdvStructures field shall be skipped. The
Status field shall be set to Success.

and referring to MshPRT section 4.3.4.9:
The OOBInformation field contains the OOB Information of either the
unprovisioned device or the Remote Provisioning Server.

Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
2023-09-13 10:07:42 +02:00
Jamie McCrae 07ece0cb1d boards: arm: stm32f411e_disco: Fix button level
Fixes the button to have the correct polarity for when it is
pressed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-13 09:16:45 +02:00
Jamie McCrae 0a5e5b68ff boards: arm: stm32f411e_disco: Add MCUmgr UART chosen node
Adds a chosen node for MCUmgr UART

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-13 09:16:45 +02:00
Jamie McCrae f970bf10fa boards: arm: stm32f411e_disco: Add MCUboot LED/button defines
Adds the user button and orange LED for use with MCUboot to enter
serial recovery and indicate when in this mode

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-13 09:16:45 +02:00
Jamie McCrae f03acea3e8 boards: arm: stm32f411e_disco: Add flash partitions
Adds flash partitions so that MCUboot can be used with this board

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-13 09:16:45 +02:00
Declan Snyder dbbdd3c6cf drivers: wdt_mcux_wwdt: Fix warning callback
Warning callback by default is configured to happen
at the same time as reset, which results in unexpected
behavior from the point of view of Zephyr API. Return
-ENOTSUP from install_timeout if trying to set up
callback with 0 warning time, and add kconfig to configure
the warning time.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-09-13 09:16:33 +02:00
Benjamin Cabé f8398fda02 doc: css: fix text color for toggle buttons in related samples
Missed this usability issue earlier. This makes the text and icon in
collapsible admonition the same color as the admonition title.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé fad29ecb03 doc: Code samples must be referenced using new dedicated role
Drop code that would let people reference samples using legacy
:ref:`sample_id` syntax, and only support the use of
:zephyr:code-sample:`sample_id` role going forward.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé 59e4c5aed0 samples: fully migrate basic samples to the new Sphinx extension
- Updated basic samples READMEs to use the new zephyr:code-sample::
  directive. Dropped "-sample" suffix that's not required anymore now
  that samples have their own namespace.
- Updated all references to the samples to use the :zephyr:code-sample:
  role. Checked and updated the wording of said references to account
  for the fact that samples should not have "... sample" in their name
  anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé 9d0deabba2 samples: stm32: move board-specific STM32 UART sample
The STM32 single-wire UART sample should live with board-specific
samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:14:06 +02:00
Chaitanya Tata 79158a777b zperf: Add support to configure context priority
This is handy in setting a custom priority for the context either
through shell or API.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-09-12 21:26:28 -04:00
Chaitanya Tata 7711d28b03 net: Add configuration option to allow any priority
This adds support to allow any priority from the user instead of
limiting to the protocol values (0-7). This is useful in conveying
custom priorities from application to the driver/chipset.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-09-12 21:26:28 -04:00
Chaitanya Tata 3b4c529d7e net: Add priority to ping
This is handy in testing of setting priority directly rather than
deriving from DSCP. Please note ICMP doesn't use net context.

This is applicable for both shell and API.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-09-12 21:26:28 -04:00
Flavio Ceolin 35e38f858a maintainers: xtensa: Add collaborator
Add ceolin as Xtensa collaborator.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-12 21:25:55 -04:00
Benjamin Cabé 7b3d94cda2 MAINTAINERS: update GitHub ID for casparfriedrich
GH User dp7hgh7 is now casparfriedrich.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-12 14:16:30 -05:00
Anas Nashif a7df4295e2 manifest: upsate SOF tree
This change removes use of internal zephyr API in SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-12 12:55:36 -04:00
Anas Nashif fcf50ed6e7 kernel: move timeout_q.h to kernel/include
This is a private kernel header with private kernel APIs, it should not
be exposed in the public zephyr include directory.

Once sample remains to be fixed (metairq_dispatch), which currently uses
private APIs from that header, it should not be the case.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-12 12:55:36 -04:00
Anas Nashif 8634c3b444 kernel: move wait_q.h header to be internal
This header does not expose any public APIs, so move it under
kernel/include and change files including it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-12 12:55:36 -04:00
Anas Nashif 1fd3171f7b arch: remove wait_q.h include
This include is not used directly in those files, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-12 12:55:36 -04:00
Sylvio Alves 1a513a46fd MAINTAINERS: update esp32 names
Keep single maintainer.
Added "marekmatej"
Remove "glaubermaroto" from the list.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-12 17:24:21 +01:00
Johan Lafon 244b437a0d drivers: rtc: stm32: disable calibration for STM32F2 and some STM32L1
STM32F2 and STM32L1 Cat. 1 only provide the coarse calibration feature
which is not supported by the code yet.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon b06a119f2f drivers: rtc: stm32: fill all rtc_time fields
Set tm_yday and tm_isdst to -1 as theses values are unknown.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon 961c465efb drivers: rtc: stm32: use Zephyr BCD<->bin conversion functions
This replaces the verbose LL_RTC_CONVERT_BCD2BIN and LL_RTC_CONVERT_BIN2BCD
by the bcd2bin and bin2bcd Zephyr provided equivalent

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon a8b7076099 drivers: rtc: stm32: ensure thread safe operations
This adds mutex a lock in rtc_stm32_set_time and rtc_stm32_get_time to
ensure consistent data reading. Also performs register reading in a single
operation in rtc_stm32_get_calibration for the same reason.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon e46aff5902 drivers: rtc: stm32: avoid using LL_RTC_Init
LL_RTC_Init() internally uses LL_RTC_EnterInitMode() wich uses a blocking
while loop. This rewrite uses the less CPU time wasteful local
rtc_stm32_enter_initialization_mode() instead. As a side effect
LL_RTC_InitTypeDef in rtc_stm32_config is not needed anymore.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon a4f5f87e29 drivers: rtc: stm32: avoid infinite blocking loop
Use the less CPU intensive and timeout capable WAIT_FOR zephyr provided
macro

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon cdab80eece drivers: rtc: stm32: avoid reset induced time drift
Calling LL_RTC_Init causes the RTC to stop while being configured thus
inducing time drift. This commit avoids doing it at each reset if the RTC
is already properly configured.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon 9e202e57e9 drivers: rtc: stm32: avoid potential erroneous readings
As shadow registers bypass is enabled, an erroneous reading may occur at
each day or second increment. This commit fixes this issue.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon 4eac3db1b9 drivers: rtc: stm32: check if tm_wday is set
tm/rtc_time structure allow for tm_wday to be set to -1 if unknown but RTC
is expecting it

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon f0b3e4e850 drivers: rtc: stm32: check if year is supported by RTC
RTC does not support year before 2000 while tm/rtc_time structure
reference year is 1900

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon 16de401e79 drivers: rtc: stm32: fix day of the week conversion
The conversion used was working but not consistent with values given by
reference manuals.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon 29fa718941 drivers: rtc: stm32: fix wrong nanosecond value
SSR register does not contain direct nanosecond value. This adds the
necessary conversion.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Johan Lafon 8aa6531aed drivers: rtc: stm32: add calibration feature
This adds the set_calibration and get_calibration API functions to the
STM32 RTC driver

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-12 17:23:47 +01:00
Krzysztof Chruściński 5191444316 logging: Minor improvement in instance logging
When using instance logging (e.g. LOG_INST_INF) first argument is
a pointer to the logging object associated with an instance. It is
not used if logging is disabled and that can generate 'unused
variable' warning when logging is disabled.

Previously logging object was not created when logging was disabled
That was done to save memory but because of that object could not be
referenced when logging was disabled. Better approach is to create
empty array instead of a logging object. It does not increase memory
usage but can be referenced and potential compilation warning is
suppressed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-09-12 17:23:31 +01:00
Krzysztof Chruściński 1e7b540aa8 toolchain: Add flag indicating zero length array support
Add flag which indicates if a toolchain supports ZLA (Zero
Length Arrays). It is a GCCC extension inherited by clang as
well.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-09-12 17:23:31 +01:00
Aaron Massey c6fd21c5de emul: Remove unused ZTEST_DMEM in sbs emulator
The redefinition of ZTEST_DMEM in the SBS emulator is unused. We ought to
remove it as it's dead code.

Remove the unused #define ZTEST_DMEM.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-12 17:23:00 +01:00
Aaron Massey 8035ec69fa emul: Add syscall support for fuel gauge emulators
In order to ease user thread testing with fuel gauges, enable syscalls for
the fuel gauge emulator backend API.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-12 17:23:00 +01:00
Daniel DeGrasse 77998b2171 tests: drivers: adc: support sampling more than 2 channels with test
Support sampling more than 2 channels using the ADC API test. This
requires updates to the repeated samplings test, which samples using 2
channels even when more channels are defined by the ADC test overlay.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-12 17:22:35 +01:00
Lukasz Mrugala da3c9d2671 scripts: tests: twister: Testsuite tests update after 20b81a8
A commit breaking tests slipped past CI checks.
This commit fixes broken tests in test_testsuite.py.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-09-12 10:42:08 -04:00
Mia Koen 01f144b201 doc: bluetooth: mesh: fixed spec links
Corrected the profile specification v1.0.1 link to point to
the spec directly and not to the general specification page.
Added link to protocol specification v1.1.

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-12 16:30:44 +02:00
Mia Koen 0d57935d80 doc: bluetooth: mesh: doc for SAR Config models
Adding rst files describing SAR Configuration
models, SAR Configuration Client and SAR Configuration
Server.

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-12 16:30:44 +02:00
Mia Koen ad57c7d621 doc: bluetooth: mesh: listed models alphabetically
Changed placement of a few models so they are
in alphabetical order

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-12 16:30:44 +02:00
Miika Karanki 7ae9a0b55d net: mqtt: change cipher and sec_tag lists to const
cipher_list and sec_tag_list are used only with zsock_setsockopt
in MQTT. For that use, they can be const (and potentially kept
in flash memory).

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2023-09-12 16:30:28 +02:00
Brian Juel Folkmann 8b6382e68d drivers: flash: stm32 ospi: jedec_id read wrongly
Manufacturer id is skipped when reading jedec_id, due to wrong
address mode.
Before: flash_stm32_ospi: Jedec ID = [60 20 00]
After:  flash_stm32_ospi: Jedec ID = [ef 60 20]

Signed-off-by: Brian Juel Folkmann <bju@trackunit.com>
2023-09-12 16:29:47 +02:00
Aron Lander bf1410bd20 west.yml: Updated to use the latest version of the percepio module
The percepio module change removes unused kernel ports from the
zephyr version of the percepio module.

Signed-off-by: Aron Lander <aron.lander@percepio.com>
2023-09-12 10:19:37 -04:00
Aron Lander 89c866ab68 modules: Add DFM and move Tracerecorder into percepio module
This commit adds the DFM (DevAlert target side code) module and
moves the TraceRecorder module into the percepio module, which
results in the TraceRecorder module definition being removed
from the west manufest and module definition within zephyr.

Signed-off-by: Aron Lander <aron.lander@percepio.com>
2023-09-12 10:19:37 -04:00
Bjarki Arge Andreasen 4129b10b69 modem: tests: Add test case for partial matches
This commit adds a test for the partial matches.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-12 14:50:17 +02:00
Bjarki Arge Andreasen 840f2e40b5 modem: chat: Add partial match feature to modem_chat
This commit adds support for partial matches for the modem_chat
module. A match is a combination of an expected response to a
request along with delimiters to use and a handler for the
parsed response.

The usual behavior of the modem_chat script is to continue to
the next step when any expected response is received. The partial
flag indicates that the script should not proceed to the next
step if the response matches the match. This is useful for
commands which respond with an unspecified number of lines,
followed by an "OK". This flag allows the script to essentially
run in a "while" loop until OK is received.

Along with this addition, a more scalable macro for initializing
the modem_chat match struct, MODEM_CHAT_MATCH_INITIALIZER().
Without this macro, we will need 4 different macros to initialize
the 4 variants of a chat_match, and 8 when the next feature is
added...

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-12 14:50:17 +02:00