Extends the msgq benchmark test to obtain data for larger message
queues (messages of size 192 bytes). This allows for a better
indication of what the impact of data size is on message queue
performance.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add user thread support to message queue, semaphore, mutex and
pipe tests. Mailbox and memory map tests are restricted from
executing from user threads.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds two custom syscalls. The first allows a user thread to
change its priority to a higher priority level. The second
is used to obtain a timestamp from a user thread.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds macros for placing variables into bench_mem_partition.
This partition will be used to place global data in the test
that will need to be accessed from user threads.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Use dynamic threads instead of statically defined threads. This will
make it easier to add support for user threads to this test.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Eliminates the loop surrounding the execution of the benchmark
components as it was not doing anything.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds userspace configuration to testcase.yaml.
Updates the README.rst with output from runs on a frdm_k64f board
as not only have the descriptions changed, but there is now
additional output for userspace configurations.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Many architectures and platforms can not directly read a timestamp
from userspace as the relevant MMIO registers are inaccessible.
This necessitates that the timestamp be obtained by a system call.
The additional overhead from these system calls can be taken into
account and the recorded times adjusted depending upon whether
the test occurred entirely within kernel space, entirely within
user space, or a mix between the two.
It is worth noting that when the test requires a mix of both user
and kernel space threads, the overhead is estimated as the mean
average of purely kernel threads and purely user threads overhead
times. This might not be technically correct, but it ought to
provide a reasonable enough approximation.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates the interrupt to thread benchmark tests to address
a number of items.
1. Updates descriptions to correctly indicate that it is not
interrupt latency being measured, but the time to leave
the interrupt and return to a thread.
2. Repeats the test numerous times instead of just once to
get an average.
3. Overhead from obtaining timestamps is now accounted for.
4. Adds support for returning to a user thread.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates both the preemptive and cooperative thread context switch
benchmark tests so that not only will they share the same
infrastructure, but they can both get the context switch times
when switching from ...
1. Kernel thread to kernel thread
2. Kernel thread to user thread
3. User thread to kernel thread
4. User thread to user thread
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
k_thread_name_get has inconsistent signature. In the function
declaration it uses k_tid_t but in the implementation it is using
struct k_thread *. Change the implementation to use k_tid_t.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add audio_codec_clear_errors and audio_codec_register_errors_callback
functions to manage audio codec errors.
Callback has to be called from dedicated thread to allow I2C or SPI
operations.
Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Add a guidelines rst converter script
to convert the rst document written coding guidelines
into another format.
First supported format is the format for cppcheck
Signed-off-by: Simon Hein <Shein@baumer.com>
radio_pkt_big_ctrl_get() returns a statically allocated
buffer of type pdu_big_ctrl, but the callers expect a
buffer where a whole PDU for a BIG control packet can fit
(not just space for the payload),
and use it as such, overflowing this statically
allocated buffer, and smashing other variables after.
Let's fix it by allocating a buffer of the correct size
to fit a BIG control PDU.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/64497
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the labels used in io-channels to be consistent in whole
tests/drivers/build_all/sensor/adc.dtsi file.
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
Using extern attribute in function signatures is not
necessary and it is not consistently across Zephyr headers.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Use mock.patch instead of monkeypatch for os.name in unittests
to fix error when executing tests under VSCode
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Add tests for new DT APIs added in the previous commit:
- `DT_IRQN_BY_IDX`
- `DT_INST_IRQN_BY_IDX`
Added additional tests for the following existing DT APIs when
`CONFIG_MULTI_LEVEL_INTERRUPTS` is enabled:
- `DT_IRQN`
- `DT_INST_IRQN`
Added `qemu_riscv32` for the multi-level interrupt tests.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The multi-level encoding of the interrupt number currently
happens in the `gen_defines.py`, which is called in the
`dts.cmake` module after `kconfig.cmake`. However, the number
of bits used by each level is defined in Kconfig and this means
that `gen_defines.py` will not be able to get that information
during build.
To fix this, do the multi-level encoding in C devicetree macro
magic instead of the python script. This ticks one of a
long-standing TODO item from the `gen_defines.py`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Relocate multi-level interrupts APIs out of `irq.h` into
a new file named `irq_multilevel.h` to provide cleaner
separation between typical irq & multilevel ones.
Added preprocessor versions of `irq_to_level_x` as `IRQ_TO_Lx`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
- Added GNSS documentation entry to peripherals
- Added GNSS API entry to the API overview as 3.6 experimental
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds a sample which configures a GNSS modem
to enable all available systems, registers callbacks to
the GNSS data and satellites callbacks, and prints the
GNSS data and satellites from the callbacks when invoked
using printk.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds a GNSS driver for the Quectel LCX6G
series of GNSS modems (LC26G, LC76G, LC86G). It is
based on the modem subsystem, and the GNSS utilities
added in the two previous commits.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds generic matches and handlers for the RMC,
GGA and GSV messages to be implemented as part of all
NMEA0183 based GNSS modems.
NMEA0183 based GNSS modems must place the
struct gnss_nmea0183_match_data struct as the first struct
in their data struct. Their data struct shall then be set
as the user_data for the modem_chat instance.
Lastly, the gnss_nmea0183_match callbacks must be included
in the unsolicited matches for the modem_chat instance.
The GNSS modems will initialize the NMEA0183 match instance
using gnss_nmea0183_match_init.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds utilites to parse the RMC and GGA
NMEA0183 messages, which contain all data which shall be
published using the struct gnss_data.
It also adds a test suite for the added utilities.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds parsing utilites for common string
representations of values contained in GNSS messages.
These utilites both parse and validate the integrity of
the data.
Unit tests are also added to validate the parsing
utilities.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>