Commit Graph

100015 Commits

Author SHA1 Message Date
Mikhail Kushnerov 8a76048ea4 scripts: profiling: Add stackcollapse script
Samples, that were obtained by profiling perf tool, can be be translated
into flamegraph using stackcollapse.py script.

Originally-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov 140f9a57b7 arch: x86: ia32: Implement perf stack thrace func
Implement stack trace function for x86_32 arch, that get required
thread register values and unwind stack with it.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov 1588390907 arch: x86: intel64: make perf stack thrace func
Implement stack trace function for x86_64 arch, that get required
thread register values and unwind stack with it.

Originally-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov a74474c1f9 arch: riscv: Implement perf stack thrace func
Implement stack trace function for riscv arch, that get required
thread register values and unwind stack with it.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov e50d1190fa profiling: Add perf tool
Add profiling subsystem.

Add perf util based on periodic stack unwinding. Perf from Linux
was taken as a reference.

The operation of module is based on frame pointer usage and saving
registers during interruption handling.
The unwinding function stay in timer as expiry functioin so is called
during interruption handling. Thus the function have access to saved
registers (program counter and frame pointer in particular) of the current
thread and use it to unwind the thread stack.
Timer starting and results printing function are made as shell commands
for conveniency.

Originally-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Andy Sinclair 66f386593e maintainers: Change regulator maintainer to gmarull
Regulator maintainer changed from aasinclair to gmarull

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-08-13 18:28:24 -04:00
Sadik Ozer 4df17deb74 dts: arm: adi: Enable sysclk for MAX32690
MAX32690 support sysclk div property
This commit enables this feature

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-13 18:21:57 -04:00
Raffael Rostagno a205fe9155 samples: esp32c3: Move config files from boards to socs
Move samples config files from 'boards' to 'socs' in order to
remove multiple files with the same configuration and render
available samples for new boards. Only changed sample files
which are not board or hardware specific.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 18:21:10 -04:00
Raffael Rostagno 708783a93e boards: esp32c3_devkitc: Added support
Add support to esp32c3_devkitc-02

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 18:21:10 -04:00
Bjarki Arge Andreasen 65af3ab34c tests: wifi: nm: exclude nrf7002dk
The nrf7002dk board's wifi chip requires blobs to build wifi driver.
Therefore it can not be built by CI. Exclude the board and its
variants from the wifi test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-13 18:21:01 -04:00
Bjarki Arge Andreasen e8f37c7640 boards: nordic: nrf7002dk: add docs
Add documentation to nrf7002dk board

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-13 18:21:01 -04:00
Bjarki Arge Andreasen 12559fe6fc boards: nordic: add nrf7002dk
Add nrf7002dk board.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-13 18:21:01 -04:00
Gerard Marull-Paretas 8cf0d0b0c6 soc: nordic: introduce CONFIG_NRF_PLATFORM_HALTIUM
Some new Nordic nRF SoCs are based on a common platform, named
'Haltium'. Introduce a selectable Kconfig option available for series to
flag they are part of such common platform. This will allow to easily
enable common code shared across all Haltium based products.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-13 18:19:51 -04:00
Murali Karicheri 7baf026adf drivers: flash: stm32h7: ignore STRBERR during flash write
When application code runs from M4 (resides on lower 896KiB of
the internal flash of bank2) and it does write to a block in
the upper 128KiB, write fails sometime (for example failed
1 out of 10 block write based on the tests) due to STRBERR.
As per technical reference manual section 4.7.4 of
STM32H745/755 SoC, application may ignore this error and
continue with write. So check for the flag and return okay
status for write(). Based on our tests, the application write
succeeds even when this error happens and match with document
description. So igoring this error flag is okay during write.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-08-13 18:19:41 -04:00
Muhammad Haziq 9958a2e3c3 net: wifi: replace (1 << xyz) with BIT(xyz)
Refactor (1 << xyz) to use the BIT(xyz) macro.
The change aims to enhance code readability.

Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
2024-08-13 18:19:33 -04:00
Flavio Ceolin f284091073 xtensa: core: Remove constant branch
is_dblexc is constant for targets without MMU. There is no need
to check it when building without MMU.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-13 18:18:53 -04:00
Flavio Ceolin b9a0f0039f dma: emul: Fix pm action signature
The signature for dma_emul pm action callback is wrong.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-13 18:18:44 -04:00
Jonathan Rico e1ac3866ee Bluetooth: L2CAP: document memset requirement
The `struct bt_l2cap_le_chan` and `struct bt_l2cap_br_chan` objects
should be memset before passing them to the stack.

This was not stated anywhere, but all the in-tree users are doing it, so
it must be API.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-13 18:18:34 -04:00
Alberto Escolar Piedras bb9704a422 arch posix: Cleanup old code
When the native simulator use was introduced,
the POSIX architecture and SOC were split in 2 versions:

One was the old version, which remained used by native_posix and the
other NATIVE_APPLICATION based targets.
The new version was a shim on top of the native simulator threading
and CPU start/stop emulation.

This was done to ensure no regressions were introduced in the old
targets while the native simulator was tested and matured.

The old SOC code was removed a small while after, and all
NATIVE_APPLICATION targets moved to use the shim version on top of the
native simulator.

Now we remove also the old arch code, so native_posix and its
NATIVE_APPLICATION kin, also use the native simulator NCT component
instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:25 -04:00
Alberto Escolar Piedras 0d25e0b655 doc: release notes & migration guide: mention native_posix deprecation
Mention that native_posix is being deprecated in favour of native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:10 -04:00
Alberto Escolar Piedras 84ce8221bb native_posix docs: Warn users about the deprecation
So they switch to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:10 -04:00
Alberto Escolar Piedras b969dc93fc native_posix: deprecate with planned removal for 4.2
native_posix has been replaced with native_sim.
Users have been encouraged to switch since 3.6.

We deprecate it now, and plan to remove it in 4.2.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:10 -04:00
Alberto Escolar Piedras e3da5c3d39 Bluetooth: Mesh: Fix build warning with gcc 13
gcc 13 thinks  max_adv_duration may be used unitialized
and warns accordingly (see below)
It seems the reason is the goto, which confuses it.
In any case, pacifying this warning is trivial,
so let's just do so.

The warning:
```
In function ‘gatt_proxy_advertise’,
inlined from ‘bt_mesh_proxy_adv_start’ at
subsys/bluetooth/mesh/proxy_srv.c:1214:9:
subsys/bluetooth/mesh/proxy_srv.c:842:44: error: ‘max_adv_duration’ may
be used uninitialized [-Werror=maybe-uninitialized]
subsys/bluetooth/mesh/proxy_srv.c: In function ‘bt_mesh_proxy_adv_start’
zephyr/subsys/bluetooth/mesh/proxy_srv.c:786:17: note:
‘max_adv_duration’ was declared here
  786 |         int32_t max_adv_duration;
      |                 ^~~~~~~~~~~~~~~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:00 -04:00
Emil Gydesen 7331b071eb Bluetooth: Audio: Fix double "not" in bcast immediate get
The description of ENODATA had an extra "not".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-13 18:17:51 -04:00
Marcin Niestroj 878640fa08 json: support parsing and serializing 'int64_t'
Up to now there was only support for parsing/encoding 32-bit integer
numbers, with no support for larger ones.

Introduce support for 'int64_t' type, so that large numbers can be
serialized into JSON payloads.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-13 14:58:06 +02:00
Georgij Cernysiov 5246c16109 drivers: flash: stm32 ospi correct memory map return code
Use ENOTSUP instead of EIO to signal about not
supported configuration.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Georgij Cernysiov a1e39d0b64 drivers: flash: stm32 ospi reword memory map log output
Add more clarity to memory map log output.

Use LOG_DBG instead of LOG_INF to signal about
memory map mode being enabled.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Georgij Cernysiov f4b63f9644 drivers: flash: stm32 ospi extend memory map modes support
Extend memory map support to QUAD, DUAL, SPI modes.

Allow custom write opcode usage and SFDP:BFP read opcode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Grygorii Strashko 965ca96c77 testsuite: coverage: fix arm64 build with gcov enabled
On ARM64 the build will fail with coverage and GCOV enabled:

  CONFIG_COVERAGE=y
  CONFIG_COVERAGE_GCOV=y
  CONFIG_FORCE_COVERAGE=y

west build -b rpi_5 -p always samples/hello_world -- \
 -DCONFIG_COVERAGE=y -DCONFIG_FORCE_COVERAGE=y

Failure:
 "linker_zephyr_pre0.cmd:181: undefined symbol `__gcov_bss_end' referenced
in expression"

Fix build of ARM64 platforms with coverage and GCOV enabled by adding for
ARM64 the same gcov linker sections as it is done for ARM.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-08-13 14:57:50 +02:00
Aleksander Wasaznik 5783d4873a Bluetooth: GATT: Document `bt_gatt_attr`
Improve the documentation of `bt_gatt_attr`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-08-13 14:57:26 +02:00
Piotr Kosycarz 2fd7ab7b97 testsuite: coverage: allow disabled multithreading
k_sched* are not avaliable when there is CONFIG_MULTITHREADING=n

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-08-13 14:57:18 +02:00
Conor Paxton 22df8459fa boards: beaglev_fire: update readme with correct openocd args
The debug instructions for launching OpenOCD were missing an argument.
Add the argument.

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2024-08-13 14:56:55 +02:00
Conor Paxton 70d93618da boards: mpfs_icicle: update readme with correct openocd args
The debug instructions for launching OpenOCD were missing an argument.
Add the argument.

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2024-08-13 14:56:55 +02:00
Johan Kraft e8c3154ee1 doc: Added Percepio Tracealyzer guide on Tracing page
The Tracing page did not cover the Percepio Tracealyzer support.
Added a guide for Tracealyzer with a screenshot (like SystemView has).
Moved the three tools to a common subsection for better overview.
(Updated with kartben patch.)

Signed-off-by: Johan Kraft <johan.kraft@percepio.com>
2024-08-13 14:56:47 +02:00
Armando Visconti 9a5f145c7a sample: board: add STWIN.box sample for testing sensors
Add sample to test STWIN.box board sensors.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti f36b887837 boards: st: steval_stwinbx1: Improve sensor support
Add few other sensors support to steval_stwinbx1 board:

 - IIS2MDC: 3-axis magnetometer
 - ISM330DHCX: IMU, 3D accelerometer and 3D gyroscope
 - IIS2DLPC: 3-axis accelerometer
 - IIS2ICLX: 2-axis digital inclinometer

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti a47b88c09b drivers/sensor/st: iis2iclx: (fix) convert range into mg
Fix the sensor range setting at runtime which is currently returning error,
converting the SI (ms2) value passed thru SENSOR_ATTR_FULL_SCALE in mg (and
not in g) as this is the unit used in the driver internals.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti c6f8d37056 drivers/sensor/st: iis2iclx: fix odr setting
Do not fail when requested rate passed in SENSOR_ATTR_SAMPLING_FREQUENCY
is not matching any of the odr values supported by sensor. Instead, round
it up to the next one.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Maciej Baczmanski 23ba68a45d kconfig: openthread: Add 1.4 version
This commit adds thread 1.4 version.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-08-13 14:56:30 +02:00
Francois Ramu 48b84d2c65 drivers: counter: stm32 counter timer exclude stm32 devices without APB2
The STM32 devices like stm32F0/G0/C0 which have a f0-rcc compatible
does not have APB2 prescaler : do not try to set it.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-13 14:56:22 +02:00
Krzysztof Chruściński e18254901c logging: When strings are stripped keep source name pointers
90ab94f61d added a change that source name pointers were not stored
in the const data structure associated with a logging source. That was
done because those string pointers were invalid (on purpose pointing to
non-existing memory) and reading those strings could lead to a fault.
However, those pointers are used by scripts which are building the
dictionary database and after this change script was no longer
able to retrieve source names from elf file and database was incomplete.

This patch brings back storing of source name string pointers but in
API for reading those source names guards are added to not return
invalid addresses.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-13 14:56:14 +02:00
Dawid Niedzwiecki c2151ad1e3 ztest: undefine _POSIX_C_SOURCE before defining it
Undefine _POSIX_C_SOURCE before defining it to avoid double
definition

The previous version, changed in this PR
https://github.com/zephyrproject-rtos/zephyr/pull/70363, did the undef.
Make sure to do the same for all files in the current dir.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-13 14:56:06 +02:00
Fabio Baltieri 73b6bf2651 MAINTAINERS: add intc_gic drivers to the ARM platform area
Add drivers/interrupt_controller/intc_gic* to the ARM platform area so
they get assigned to the ARM platform maintainers directly.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-13 14:55:59 +02:00
Tim Lin 9bcf33bbc4 drivers/pinctrl: it8xxx2: Fix I2C5 pin leakage
When setting these pins as I2C alternate mode and then setting
GCR7 or func3-ext of GPIO extended, it will cause leakage.
In order to prevent leakage, it must be set to GPIO INPUT mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-13 14:55:34 +02:00
Anke Xiao 5368d7d0df boards: nxp: frdm_ke17z512: enable RTC driver
Enable RTC driver to test 'drivers.counter.basic_api' sample.
Select clock-source to LPO clock.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao 20820b40fa dts: arm: nxp: add rtc support for ke17z512
Add RTC driver support for NXP frdm_ke17z512, rtc doesn't exist on
frdm_ke17z board, delete rtc node from its dtsi file.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao 7c7760f4cd drivers: counter: update counter_mcux_rtc.c
Set LPO 1KHZ clock for RTC if clock source 'LPO' is selected.
The frdm_ke17z512 has no 32KHZ OSC, the RTC clock comes from SOSC,
RTC_CLKIN, LPO 1KHZ. But usually the SOSC is connected with 8MHZ
oscilator, so only 1kHZ LPO is usable.
Update the nxp,kinetis-rtc.yaml to select RTC clock source.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao 6987120cc8 tests: drivers: pwm: add pwm configuration for mke17z
Add pwm configuration for frdm_ke17z and frdm_ke17z512 boards.
Set the alias of pwm-0 to ftm2 and test the pwm_api sample.
Update the ftm and pwt configuration to test pwm_loopback sample.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Anke Xiao a2890affd4 boards: nxp: frdm_ke17z and frdm_ke17z512: add ftm and pwt pwm support
Add ftm pinctrl configuration, and enable ftm2 to support pwm-led.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Anke Xiao 9491e726ff drivers: pwm: update pwm_mcux_pwt.c
Skip period and pulse width capture configurations that
specific flags are not supported on ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00