There is only one flag, NET_BUF_EXTERNAL_DATA, used when net_buf was
allocated with external data. The flag is checked in net_buf_clone() and
net_buf_destroy(). net_buf with external buffer can be used for
receiving and transmitting. net_buf_reset() is convenient way
to reset net_buf with external data before it is re-enqueued again.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Some SoCs support EXT1 wake-up pins (RTC IOs) but do not provide
IOMUX features like internal pull-up/down resistors. Support for
these features is indicated by SOC_RTCIO_INPUT_OUTPUT_SUPPORTED.
This change updates the test configuration to account for this
and fixes EXT1 pin mapping for ESP32-H2.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
The swapped_app image, added via ExternalZephyrProject_Add,
wasn't receiving the swap method configuration from sysbuild.
If trying to build the test with a different configuration that
SWAP_USING_OFFSET (for example SWAP_USING_MOVE)
this resulted in a boot loop due to configuration mismatch
between swapped_image and mcuboot.
This fix ensures proper configuration propagation and prevents
similar mismatches in future scenarios.
Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
zsock_recvfrom() takes as last argument a socklen_t pointer
( c546c1cad1 )
whose definition has changed.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Zephyr's socklen_t was changed in
c546c1cad1
to be uint32_t instea of size_t.
Let's fix accordingly the prototypes which expect it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
zsock_getsockopt() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
net_tcp_accept_cb_t takes a socklen_t as 3rd argument,
which type was changed in
c546c1cad1
and is not anymore equivalent to size_t.
So let's correct it.
As a freebie, let's define that function as static as it is.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
zsock_recvfrom() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
There was extra parameter when calling zassert_not_equal() which caused
compilation warning.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add information that the socklen_t was changed from size_t, which
can be either 32 or 64 bit long depending on system configuration,
to always be 32 bit long. This is now aligned to way Linux is defining
socklen_t.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Fix an incorrect interpretation of the chip select signal
for the SPIM instances. If cs-gpios is used then the chip
select pin is used as a GPIO, and should have CTRLSEL=0.
Only when NRF_FUN_SPIM_CSN is used should CTRLSEL
be configured to enable hardware control of the pin.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Extend the registration status definitions and explicitly tie them to
the values defined in 3GPP TS 27.007. Definitions were copied from
version v18.6.0.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update the defined access technologies to align with the 3GPP standard
TS 27.007. Definitions were copied from version v18.6.0.
Signed-off-by: Jordan Yates <jordan@embeint.com>
refactor move_to_negative_direction, run_positive as well as
run_negative direction from drv84xx_api to stepper test-suite
refactor test_microstep_resolution to drv84xx_emul
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
add is_moving check to already existing stepper_api move_by
and move_to tests.
delete corresponding redundant test cases from drv84xx
bugfixes in step_dir_stepper_common.c
- start_stepping shall return 0 instead of return ret since
timing_source_start can return 1 depending on which timing
source in selected
- stop timing source before triggering steps_completed event
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
test_actual_position_set, test_test_move_by_zero_steps_no_movement
from drv84xx_api test-suite are already accounted for in stepper_api
test suite through test_actual_position & test_move_by_zero_steps
respectively.
test_move_to_identical_current_and_target_position scenario from
drv84xx_api is now covered in test_move_zero_steps in stepper_api
test_move_to_positive_direction_movement from drv84xx_api test-suite
is now test_move_to_positive_step_count in stepper test-suite
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Setting 0 as microstep interval is invalid. If microstep_interval is
not set then the motion related functions should return -EINVAL.
drop test_run_zero_step_interval_correct_position
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Move to dtcm.bss to reduce flash usage.
When increasing SEGGER_SYSVIEW_RTT_BUFFER_SIZE,
it will waste a large amount of flash space.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
When connecting to WiFi from stored credentials, the key_passwd is never
freed.
Additionally if the connect fails, the allocated data was never freed.
Convert heap allocated memory to stack allocated buffers.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Added support for disk_access and I2C with bme280 application
for ptl-h platform.
-samples/sensor/bme280
-tests/drivers/disk
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Updated RTC to support MFD method on panther lake platform
and board config to include alarm and update tests.
-boards/intel/ptl/
-dts/x86/intel/
-tests/drivers/rtc/rtc_api/
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Adds a sample to show the tracing and profiling features when the
instrumentation subsystem is enabled (CONFIG_INSTRUMENTATION=y).
The sample consists in two threads in ping-pong mode, taking turns to
execute loops that spend some CPU cycles. This allows a couple of
context switches and so to demonstrate tracing of thread scheduling
events.
The sample also has an example on how to capture and show traces and
profile info via the CLI tool zaru and also how to export the traces
so they can be loaded in the Perfetto Trace Viewer tool.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
This commit adds 'zaru', a CLI tool for the instrumentation subsystem.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
This commit enables users to pass -DQEMU_SOCKET=y for 'west' when
selecting to run the build on a QEMU VM. This allows the target's serial
port to be served to the host via a TCP/IP port for convenience, easing
communication with the target from the external world.
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
This commit adds the instrumentation subsystem.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Adds a new '__no_instrumentation__' preprocessor definition for GCC,
mapping it to '__attribute__((__no_instrument_function__))'.
This new macro is used to disable code instrumentation (enabled when
'-finstrument-functions' flag is passed to the compiler) for specific
functions when placed before a function definition.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Adds a new compiler flag to enable function instrumentation injection
at compile time for compilers that support it.
Adds support for this flag to GCC when `CONFIG_INSTRUMENTATION` is
enabled, setting the `-finstrument-functions` flag during compilation.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Currently, CORTEX_M_DWT option does not refresh its value when
TIMING_FUNCTIONS, on which it depends, is selected via menuconfig.
This occurs because during the early west build steps the
aarch32-specific Kconfig file is parsed with TIMING_FUNCTIONS=n,
resulting in CORTEX_M_DWT being set to 'n' (not set) in .config.
Later, when the user runs west with -t menuconfig and sets
TIMING_FUNCTIONS=y using the menus or any other option that selects
TIMING_FUNCTIONS=y indirectly, CORTEX_M_DWT is already set to 'n' and
remains set as such. That is inconvenient, and, moreoever, since
CORTEX_M_DWT gets set if TIMING_FUNCTIONS is set in prj.conf, the
current behavior is not consistent, i.e. via the menuconfig setting
TIMING_FUNCTIONS=y doesn't imply selecting CORTEX_M_DWT automatically.
This commit addresses this issue by selecting CORTEX_M_DWT=y if
TIMING_FUNCTIONS becomes set to 'y', otherwise allowing it to be set via
the prompt. This is possible by making the CORTEX_M_DWT prompt
conditional. Hence, in menuconfig, if TIMING_FUNCTIONS gets set
CORTEX_M_DWT is set automatically. If TIMING_FUNCTIONS is not set, a
prompt is presented to allow selecting CORTEX_M_DWT manually.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Add an option that excludes generation of a given path of `.gcda` files
when running coverage testing. This can be useful when running testing
coverage on downstream repos, which would otherwise result in large
`.gcda` files for paths we don't care about filling up the disk.
One example of using this is to exclude coverage outputs from
mbedtls files with the following:
`CONFIG_COVERAGE_DUMP_PATH_EXCLUDE="*modules/crypto/mbedtls*"`
Signed-off-by: Jordan Yates <jordan@embeint.com>