When running just the test mqtt_sn_client::test_mqtt_sn_wait_suback on
native_sim, the current timestamp is still 0. That caused the test to fail,
because 0 is used as an indicator, that the message has never been sent,
thus sending it every time process_work is executed.
Instead of adding additional variables and complexity, the code now simply
treats now==0 special and waits 1ms until doing anything.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
- The paho client does that, too.
- This allows running single tests, because they don't rely on previous
ones having incremented the msg_id a certain number of times.
- The variable already existed in the client struct, but wasn't used. I
guess it was intended that way but never implemented.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Making the assumption, that mqtt_sn_connect does not process any incoming
data allows for this to be a very simple, additional API function instead
of adding more complexity to the connect function. This also means that the
user has to re-add predefined topics upon reconnects which don't reuse the
old session though.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Make the STM32 I2C transfer timeout configurable via Kconfig.
- Add CONFIG_I2C_STM32_TRANSFER_TIMEOUT_MSEC Kconfig symbol.
- Use this Kconfig value in both STM32 I2C drivers.
Tested on STM32WBA55CG.
Fixes: #95819
Signed-off-by: Pablo Bacho <pablobacho@gmail.com>
This updates the Intel Audio DSP smoke test to use the new
IPC API based on IPC message service. The old API is still
being tested for now until all users of the old API has
moved to the new one.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This reworks the Intel audio DSP host IPC driver as a backend of
the IPC service. This is the first step to rework IPC in SOF
(Sound Open Firmware) into using a more generic IPC API instead
of a SoC specific one.
For now, it keeps the old interface to maintain usability
as it is going to be a multiple process to rework IPC
over there.
Also, the structure of the new IPC backend resembles
the SoC specific driver to make it easier to compare
between them at this first iteration. Future optimizations
will probably be needed once we start modifying the SOF
side to utilize the IPC interface.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds ACE boards to the allowed platforms so they can
be tested.
Note that this only adds boards that I have tested to run
correctly with the tests.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The 4th CPU test tries to gauge tight loop performance. However,
it has been observed occasionally that the calculated would go
over just a bit. The threshold was 3, and the observed ratio
has been bouncing between 2.9 and 3.1. So up the threshold
a little bit to account for that.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
On ACE, the CPU halting requires the cooperation of the PM
subsys to set the CPU to SOFT_OFF. The mechanism has not
been implemented in the smoke test. So skip the halting test
on ACE for now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The IPC is only needed for old hardware earlier than CAVS 2.5.
They are no longer supported in the tree as their board configs
have been removed. So there is no need to do IPC anymore.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The SoC specific IPC driver is for host IPC, and not IDC (which
is between CPUs). So there is no need to use the IDC devicetree
binding to enable the kconfig.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This IPM driver is not being used by SOF and is there simply for
a test which does not provide much additional value compared to
the existing host IPC tests. That IPM specific test has been
removed so there is no need to keep this driver in the tree.
This is in preparation to rewrite the host IPC driver to utilize
the IPC API. There is no need to maintain another driver that is
not being used in SOF.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This removes the IPM test from the intel_adsp smoke test.
The IPM driver is not being used by SOF and is there simply
for this test. The host IPC functionality is also being tested
via test_host_ipc. The additional usage of mailbox in the test
does not provide much value since the mailbox is shared memory
between the DSP and the host. We would have bigger problems if
the shared memory does not work properly.
Removing the test is in preparation to removing the CAVS host
IPM driver. That is also a preparation to rewrite the host IPC
driver to the IPC API, and there is no need to maintain
another host IPC driver that is not used by SOF.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Various drivers have their own static versions of reg_read()/reg_write().
When building for riscv the macros conflict with the driver function
causing compiler failures. Prefix them with riscv_ to avoid conflict
and move them into the unit test which is the only place they are
used.
Signed-off-by: Lee Trager <lee@trager.us>
Adds a testcase to the send on connect test for sending data over a
user-defined fixed L2CAP channel.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds support for the user defining their own channels within the
fixed L2CAP channel range. To make this possible, the
`bt_l2cap_fixed_chan` struct and `BT_L2CAP_CHANNEL_DEFINE` macro
needed to converted to public API. In the process of doing so, the
`_destroy` parameter was removed from the `BT_L2CAP_CHANNEL_DEFINE`
macro as it was never used (fixed channels will not be destroyed over
the lifetime of the connection). `BT_L2CAP_CHANNEL_DEFINE` is renamed
`BT_L2CAP_FIXED_CHANNEL_DEFINE` to avoid confusion
The `bt_l2cap_chan_send` function is updated to be able to send data
on fixed l2cap channels.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Rename the bt_bap_is_x_ep functions to better match the
modules where they are implemented.
Additionally modify the check to use IS_ARRAY_ELEMENT
in the broadcast sink and source for a stricter check.
IS_ARRAY_ELEMENT cannot easily be used in the unicast
client and server, as the endpoints are part of another
structure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We check for all other roles when checking whether
an endpoint can send or receive, except for the unicast server.
It is technically implied, but if the ep is not a valid pointer,
then we may access invalid memory.
Add check for bt_bap_ep_is_unicast_server (which uses the new
bt_ascs_has_ep function).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a test of the CONFIG_NATIVE_SIM_REBOOT functionality together
with the hw_info get_reset_cause() logic.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Support reporting the reset cause for native_sim. The default is to
report POR (Power-On Reset). If CONFIG_NATIVE_SIM_REBOOT was enabled and
the system is rebooted using sys_reboot(), the reset cause is set to
SOFTWARE.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Align with native_simulator's upstream main
4eab13716376e63236d77013f996a897d24dd780
Which includes:
4eab137 Host trampolines: Add getenv/setenv
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use statically registered event handler.
Otherwise we might get stuck waiting for event that has already
happened.
Network events are not keeping the state.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This commit adds support for IAR C-STAT Static Analysis
in the Zephyr's SCA Framework.
By specifying -DZEPHYR_SCA_VARIANT=iar_c_stat in west, a SQLite
database file will be generated under build/sca/iar_c_stat.
Signed-off-by: Felipe Torrezan <felipe.torrezan@iar.com>
Add stress test which validates that allocator is thread safe
and has no memory leaks.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add micro heap implementation which is using one or more 32 bit masks
to allocate quickly blocks. It is significantly better than using
sys_heap. Difference is especially big on RAM3 heap because heap
control data is in RAM3 space so operations there were extremely
slowly (15 us to allocate a buffer).
Simplified implementation of the heap requires DMM API change as
release functions need to know the length of the allocated buffer as
simple heap requires that (buffer address is enough for the standard
heap).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Default memcpy used in zephyr is not optimized and performs simple
byte by byte copying. Using double word or word access can significantly
reduce copying time especially for RAM3 (slow peripheral RAM).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Clang's -Wused-but-marked-unused warns when variables marked as
__unused are actually used. Logging macros can trigger this warning
depending on CONFIG_LOG_* settings, leading to noisy builds.
This change suppresses those warnings, allowing the warning flag to
be used alongside logging functionality.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Update the CAP commander status to being feature complete with
BSIM test after implementing the last missing procedures
(Handover).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implement the broadcast to unicast handover procedure,
as per the Bluetooth CAP specificiation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Extend the gen_isr_table test to support the Hazard3 cores on the
RP2350A. This allows some testing when building and running using flash,
but it seems like Twister builds with different flags. It's unclear if
this is intended or not.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Now that there's support for the Hazard3 cores these comments are
incorrect. Remove them.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
All the samples and tests are applicable to both the Cortex-M33 and
Hazard3 cores, so most of these additions are thin shims.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Update Kconfig.rpi_pico2, add a new .dts and associated files to support
building an image targeting the RP2350A on the Raspberry Pi Pico 2 which
excutes on the Hazard3 core(s).
Tested using
```
west build -p -b rpi_pico2/rp2350a/hazard3 .\samples\hello_world
```
and programming onto the board using the generate .uf2 file, which gives
the following example output:
```
*** Booting Zephyr OS build v3.7.0-5943-g2db5e4dec7bd ***
Hello World! rpi_pico2/rp2350a/hazard3
```
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>