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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>