Fix the out of bound buffer read by checking the lower-bound index
in the ov5640_enum_frmival function.
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
This reverts commit 26614832f2.
A bug in upstream nanopb, which this commit was pulling as part
of the submanifest update, seems to be causing test failures
on big-endian platforms.
Upstream bug: https://github.com/nanopb/nanopb/issues/1039
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Or more precisely, do not remove the workaround for them.
The current HW models are accurate enough in this area for the
workaround to work properly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This fixes ruff linting error UP007,
where one would use Optional or Union
instead of X | Y notation.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Fixes ruff linting errors UP030, UP031, UP032,
which make you use format specifiers (fstrings)
instead of printf formatting or str.format().
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error F541,
where an fstring is used when a normal
string would suffice.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error F811,
where a module is reimported or otherwise
redefined without being used.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM115,
where files were opened without the use of
a context handler.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM105,
where try-except-pass construct was used
instead of contextlib.suppress().
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error B023,
where function definitions use
loop variables incorrectly.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error B904,
where an error raised inside an except
clause does not specify from where it
should start.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM102,
where multiple ifs were used instead
of combining them with and or similar
operators.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting errors UP021 and UP022,
where obsolete subprocess parameters were
still used.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
this fixes ruff linting error UP006,
where old typing types are still used
instead of newer, PEP585-compliant ones.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error E741,
where a variable name is ambiguous
or hard to read (e.g. l).
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM1101,
where a builtin, like any() or all()
has been reimplemented.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM114,
where there are multiple arms in an
if-elif-else construct with the same result.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM201,
where not is used instead of a more
appropriate comparison operator.
SIM202 exclusion was removed, as it
didn't apply to anything.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM300,
where constant values are on the left
side of an expression.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes the ruff linting error SIM401,
where if-else construction is used instead
of dict.get().
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes errors E402 - module import
not at top of file.
One error in testplan.py left in,
as it is a part of a obscure 2020 fix
that would need to be re-tested.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
ruff check still detects a few linting errors
inside twisterlib.
We add them to the exclusion list to fix them
issue-by-issue in further commits.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
The west packages extension can be used to install module dependencies.
Upstream nanopb has added the pip package dependencies to the
zephyr/module.yml file. Remove in-tree pip package dependencies.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a migration entry for the device driver API change, and start listing
driver classes that have been updated in-tree.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Move all adc driver api structs into an iterable section, this allows us
to verify if an api pointer is located in compatible linker section.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Tests the ADC clock domain on the stm32g0 serie
Possible ADC clock sources are SYStem clock (default) or PLL_P.
No clock source HSI for the ADC tested here.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add uart-pipe driver default option in device trees for silabs boards.
It enables vcom for the boards, handy to have for sample application, for
example tester app.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Sleeping in sysworkq is a very bad idea, it can trash any hope of
realtimeness at best, deadlock the whole system at worse.
Add a check to input_report to downgrade the event to K_NO_WAIT
automatically when called from the sysworkq, similarly to what's done by
other APIs (netbuf and bluetooth), though only log if messages are
actually dropped.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This adds a test that checks that the Subnet Bridge behaves correctly
when one or more of the involved subnets are undergoing the Key Refresh
Procedure.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This introduces a global variable controlling the number of remote nodes
used in a given test case. This allows removal of the `TEST_TYPE_...`
enums and further tests in the future that can use different remote node
counts.
This also cleans up the test source by extracting common tester
initialization to separate functions, avoiding repetition.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Initializes the `net_idx` field of the ack context properly for KRP
functions in the Config Client.
This fixes a problem where `bt_mesh_cfg_cli_krp_get` and
`bt_mesh_cfg_cli_krp_set` would always fail the ack ctx comparison if
`key_net_idx` was != 0.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This reverts commit ec0b9ccbc1.
This commit has two issues:
1. We already query signal poll just above, so, wastes time querying the
infor from the firmware.
2. Doesn't handle modes, i.e., queries even for AP mode as well.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Use the regex mode for zephyr-keep-sorted to verify alphabetical order
of projects.
Sort accordingly
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use the regex mode for zephyr-keep-sorted to verify alphabetical order
of projects.
Sort accordingly
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Release HSI CLK48 semaphore when going to sleep to allow C2 (M0)
core to start and stop clock as needed while C1 core is not running.
CLK48 is shared between RNG and USB. RNG is needed by M0 during BLE
advertisement. If semaphore is locked, C2 core can start it when it
needs to but not stop it.
Fixes zephyrproject-rtos#69955.
Signed-off-by: Jonny Gellhaar <jonny.gellhaar@prevas.se>
Ambiq USB HAL do not expect endpoint transaction request when an
endpoint is stalled. This commit addresses this behavior in shim driver
by checking for endpoint's stall status when enqueue request is
received, and defer it until endpoint stall is cleared.
Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
Apply nRF54H20 `min-residency-us` and `exit-latency-us` values for
existing power states.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add 128 MHz clock source and use it for uart00. Baudrate setting
must be adjusted based on uart clock source so without this
change there is wrong baudrate on uart00.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The test interfaces registered addresses within the same subnet. As now
only the subnet part of the address is verified when choosing source
address or interface, it was not deterministic which interface would be
selected. Therefore, make the two interfaces use two different subnets
so that tests that verified which address/interface was used work
reliably as earlier.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When IPv4 address is added, currently the netmask remains empty. This
makes it impossible to use the address now that the netmask is
considered during address selection if the application does not
specify the netmask manually. Therefore specify a default netmask for
IPv4 addresses added to an interface with Kconfig.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Bit-wise comparing of the entire IPv4 addresses doesn't make much sense
as when selecting the source address for communication, what really
matters is the subnet part.
Doing so may actually lead to unexpected results, i. e. two addresses
within the same subnet should be considered equally good for
communication within the subnet, yet comparing the unique part of
the address (beyond the netmask) may lead to different results.
This is a problem for the mechanism of preferring the default interface
for LL communication if two interfaces have LL addresses with the
default subnet mask.
Fix this by filtering out the subnet from the IPv4 address before
passing it to net_if_ipv4_get_best_match() function.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case which validates that if two network interfaces are
equally good wrt net mask for LL IPv4 communication, the default
interface is preferred.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Currently we blindly return the LL address found on the default
interface or else on the first interface that has a valid LL address
configured.
This doesn't work well, if different interfaces have LL addresses
configured with a different subnet mask. Therefore, instead of blindly
selecting the address based on the first LL address encountered, use
net_if_ipv4_get_best_match() function for LL addresses to find the best
match for the given interface.
The rework takes into account current behavior, i. e. default interface
still gets the preference if there is no better candidate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case verifying that a proper source IPv4 address and
interface is selected for a given LL destination address.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Accessing DWC2 otg core registers before the clock starts results in
complete system hang. Add a 1 us busy wait to make sure that software
won't access registers before the clock is started.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The PSA Crypto implementation provided by Mbed TLS generally requires
some amount of heap to function, so enable the arena unconditionally
to make the test compatible with MINIMAL_LIBC configurations where the
arena is disabled by default.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves signal tests into a singular
testsuite at tests/posix/signals app directory.
Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
With recent changes the regulatory domain is handled via the hostap
rather than by passing and going through the driver and hostap doesn't
have any option for forcing the regulatory domain, so, add a note to
reflect that this is implementation dependent to cover both hostap as
well other offloaded implementations.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Instead of depending on SPI/GPIO. This allows to just enable
CONFIG_LORA=y + DT node in the application layer. The same
pattern is nowadays followed by most drivers.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add DT definitions for the RAK3172 LoRaWAN module, based on
STM32WLE5.
Ref. https://docs.rakwireless.com/product-categories/wisduo/
rak3172-module/low-level-development/
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The dns_unpack_answer() did not check the length of the message
properly which can cause out of bounds read.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the packet parsing fails in dns_unpack_response_query(), then
do not continue further but bail out early.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
As the error print strings are very similar, construct the final
output at runtime to save some flash space.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Follow net coding style and remove extra new lines between
variable set and checking its value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
We must do null check before trying to access the fields.
Fixes#81980
Coverify-CID: 434549
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
These devices have an architecturally fixed 13 MHz clock device. But
thankfully you can put a default into a DTS binding so we don't have
to repeat it for all of them.
Signed-off-by: Andy Ross <andyross@google.com>
Add Zephyr support for the Audio DSP on the MT8196 SOC. This is a
very similar device to previous designs. Most of this patch is just
DTS.
The biggest delta is the more complicated second level interrupt
controller, though it is still able to be represented using some
vaguely clever DTS config over the older intc_mtk_adsp driver.
Also the memory layout is slightly different, requiring a little
indirection to set the initial boot stack address and log output
buffer. And the timer "irq_ack" register bits moved.
Signed-off-by: Andy Ross <andyross@google.com>
New platform has different mappings. Auto-detect rather than parse
dts or similar, as this is is really just a simple format for testing.
Signed-off-by: Andy Ross <andyross@google.com>
The early boot function got renamed to a pseudo-standard "z_prep_c",
but this isn't an actual API and doesn't have a prototype in the
headers anywhere, so the compiler started whining about an undeclared
function.
Signed-off-by: Andy Ross <andyross@google.com>
Add a twister YAML file for these devices. Right now they're flagged
as xt-clang only, though xcc and SOF-derived gcc toolchains are known
to work too. We'll enable the zephyr SDK once sdk-ng support lands.
Signed-off-by: Andy Ross <andyross@google.com>
These are very similar devices to mt8195, minimal changes needed
beyond boilerplate configuration.
In the process, this reworks the board/soc layout to be HWMv2
compliant, with "adsp" becoming a CPU cluster beneath the SOC. So the
name of the boards to west become e.g. "mt8195/mt8195/adsp" (which can
be shortened to "mt8195//adsp" if desired).
Note that the cpuclk driver is not yet ported, it works only with 8195
(the clocking/power architecture seems similar between the parts, but
the graph of wells and clocks is different and historically these have
been three separate drivers in SOF). The biggest changes are in the
image/loader scripts, which needed some rework for cross-device
portability.
Signed-off-by: Andy Ross <andyross@google.com>
This is a feature of the 8195 DSP only, which is used only vestigially
by SOF to store data that nothing reads. The Linux kernel on the
other side uses a shared driver for all 81xx devices, which does not
expose the feature. It seems to work, but it's not worth maintaining
a driver in tree for legacy hardware that will never use it.
Signed-off-by: Andy Ross <andyross@google.com>
Wire the default printk output to the console at boot, just to be sure
we have stdio output good enough to get tests to pass.
Signed-off-by: Andy Ross <andyross@google.com>
This is currently selected by the arch, but some devices (in paticular
xtensa ones which have configurable interrupt setups) might not
actually be able to effect an irq_offload() from within an ISR even
though we have code for it.
Make this a default and not a select so that lower layers can override
the setting.
Signed-off-by: Andy Ross <andyross@google.com>
HD44780 controller can indicate via busy flag whether it's finished
processing current command. This allows for faster completion of HD44780
commands as seen from MCU perspective, as the MCU doesn't have to wait
for fixed long period of time. Implement this functionality.
Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
If proper power supply is used to power the hd44780, it initializes
correctly on a reset condition all by itself. However,
if the power supply is below its expectations (e.g. some 3.3V Nucleo
board), it won't initialize properly on its own, and the MCU
has to carry out the initialization as listed in the reference manual.
Since we cannot determine it properly in the runtime,
always carry out the initialization procedure.
Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
In order for the driver to be compliant with the timing sequence
diagrams presented in the reference manual, the MCU has to wait
for some additional period of time while setting both the rs and rw
lines.
Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
Express delay values in nanoseconds. Set the default delay time values
as specified in the HD44780 reference manual.
Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
There's no need to set this line every single time a command is sent
to the HD44780. Set it only once, so that one can save some cpu cycles.
Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
Add a note to status property that disabled parent nodes do not
implicitly disable child nodes.
Issue #82040
Signed-off-by: Andreas Rudolf <andreas.rudolf@husqvarnagroup.com>
#79174 incorectly interpreted the condition. If no simulator is found
if cannot be "renode" and therefore robot should be considered unsupported.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Verify the result of the fs_read() operation when handling filesystem
resources, and abort processing the resource in case of errors.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Reset the server timestamps after bootstrap to handle a case
where a new server instance has replaced the bootstrap server
instance.
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
In case lwm2m_get_engine_obj_field() fails to find a corresponding
object field when iterating resource instances, simply skip that
resource instance when printing object instance contents.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Support write OMA TLV resource instance in LwM2M 1.1.
Accept OMA TLV as default content format.
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
The network interface name that is copied to if_req struct might
be missing terminating null for IPv4.
This is fixing the IPv4 issue which was missed in previous fix attempt.
Fixes#74795
Coverity-CID: 368797
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
As k_sleep returns int32_t, there is a possibility for integer overflow
during conversion from milliseconds to nanoseconds.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Nanosecond time calculation overflows if the libc has 32-bit time_t.
One such libc is the classic ARC MWDT one, but there might be others.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Separate the current driver for the FPGA iCE40 into two different ones.
One implements only the SPI load mode, the other one only the GPIO
bitbang mode.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
As BT now uses PSA crypto API instead of TinyCrypt, entropy generator
is now needed for a proper bluetooth operation.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit comments out some test AC cases that are failing in bsim.
These will be investigated in PR #82199.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This reverts commit 184c0f9e9d.
Reducing system heap memory to 1024 caused runtime failures on some
platforms. This commit revert that change and return to the previous
size.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
After the switch from TinyCrypt to PSA Crypto API as crypto
backend, runtime crashes might happen on some platform due
to BT_LONG_WQ's stack size not being large enough. This
commit fixes this issue.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
When BT_SEND_ECC_EMULATION and the platform uses Mbed TLS as PSA
Crypto provider, we select the Cortex-M software optimized
implementation of the secp256r1 curve algorithms. This is much
faster than the standard support provided by Mbed TLS and it
also reduces ROM footprint.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
History seems to repeat itself and we need to momentarily discourage
folks to use Python 3.13 on Windows until windows-curses releases a
PyPI package that works with it.
See https://github.com/zephyrproject-rtos/windows-curses/issues/69Fixes#81543.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This board is mostly the same as mini_stm32h743.
Noatable diffrences for dt:
- rcc config
- octospi in quadspi mode
- pinmux naming for USB and quadspi
Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
Several of the codec helper functions used @retval incorrectly
Several functions referenced @ccid_list incorrectly
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Allow `nrfs_backend_send` to push early requests into the message queue,
but defer sending them until a connection is established, at which point
the queue will be flushed. This benefits asynchronous code by making it
optional to call `nrfs_backend_wait_for_connection` before using the
nrfs service API, which is already non-blocking.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Added ability for host MCU to perform a hardware reset of the DA14531
contained on the Mikroe BLE Tiny Click.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Introduce `CONFIG_RISCV_GP_PURPOSE` choice to make sure that only
one of `CONFIG_RISCV_GP` or `CONFIG_RISCV_CURRENT_VIA_GP` can be
enabled, instead of relying of dependencies.
To do that, introduce a new
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING` that can be selected
by SoC when it implemented global pointer (GP) initialization for
relative addressing in its linker.
`CONFIG_RISCV_GP` will be the default choice when
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING=y`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Reset the the `gp` register to `_kernel->cpus[i].current` when
`CONFIG_USERSPACE` is enabled on exception to keep it sane.
Updated the testcase to test both `CONFIG_RISCV_GP` and
`CONFIG_RISCV_CURRENT_VIA_GP`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commits puts in order log messages when unpacking CDP0 and CDP1 so
that it a bit more clear where the error happens.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit checks that config client doesn't pull out data outside of
the buffer.
Fixes#80012
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
There is a mistake and the cpuapp_ram0x_region "reg" value should
start from 0x2f011000.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
We need to drop the cloned packet that was fed to the bridge instead of
returning directly from the function. Without this change we have a
buffer leak.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the packet cloning failed, bail out in order to avoid
null pointer access.
Fixes#81992
Coverity-CID: 434493
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If nrf52840dk/nrf52840 is an integration platform, it should also be an
allowed platform, otherwise the test run breaks down.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Coverity complains about uninitialized prohibited fields. Even though it
is not used because it is "prohibited", it is simpler to just
initialized it with the value received from a server.
Fixes#81939
Coverity-CID: 434649
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The commit removes storage.stream_flash.mpu_allow_flash_write as it was
pointless, and moves nrf52840, as integration platform, to
storage.stream_flash.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Do all input validation etc BEFORE setting up configuration,
instead of mixing these things everywhere. Also condense the formatting
of the code.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove unneeded prepare_start function since all uses of it are paired
with the start function. Also, probably should not mess with chip select
before deciding to do the transfer. And just return on some error like
the rest of the driver does instead of assert.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Next packet function is way more complicated than it needs to be. Clean
it up by simplifying the code and making readable helper functions.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Move transceive funtions next to each other and clean up the wrapping of
functions to eliminate the ifdefs.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Small change to consolidate the amount of lines of code in
the spi_mcux_isr by making a macro for the argument and removing
a line of code that was commented out.
Also move the ISR to be the first function in the file which is
common in many other drivers, instead of randomly in the middle of the
file. And move the isr callback to be next to the isr.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add closing comment for #ifdef and remove unnecessary
indentation of an else block. Also move the transcieve_rtio
function to be near the other rtio functions. And move function
prototypes to top of file.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Create helper functions for duplicated code related to
checking for DMA devices, with readable names.
Also remove unneeded function prototype.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Do initializations in a more logical order,
remove unnecessarily duplicated code,
reorder stack variables to be in reverse christmas tree order.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove parent_dev from config struct, and simplify code for the
definition and use of the irq config function.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Organize #includes and #defines for less redundancy
and more readability.
Shorten some macros to avoid multi line statements.
Add some comments.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves spinlock into a singular
testsuite at tests/posix/spinlocks app directory.
Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
Remove implementation of pin configuration for Series 2 devices.
The silabs,dbus-pinctrl driver should be used instead.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The GECKO_PIN() macro does not do anything except pass the
argument through unaltered. It only serves to make DeviceTree
files more verbose. It was inconsistently used, make the .dts
files consistent by never using it.
The DBUS pinctrl driver doesn't use the port or location macros
from the gpio_gecko.h header. The pin number macro is the only
other thing defined in this header. Stop including the header on
Series 2 based boards.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Swap from silabs,gecko-pinctrl to silabs,dbus-pinctrl for all boards
with Series 2 SoCs. Explicitly declare pin properties as part of
pinctrl pinout configuration.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Silicon Labs Series 2 and newer devices do alternate function
configuration fundamentally differently from Series 0 and 1. Pin routing
is done in a centralized fashion in the GPIO peripheral, as opposed to
having ROUTE registers in every peripheral. The concept of alternate
function location numbers also does not exist, functions are directly
assigned to GPIOs by their port and pin number.
This commit adds a new pinctrl driver for devices that use DBUS. It fully
makes use of pinctrl design principles as outlined in the Zephyr
documentation. The previous driver hard-codes pin properties such as filter
and pull-up/down in the driver itself, while the new driver leaves this up
to the user as configurable DeviceTree properties. The previous driver has
hard-coded support for UART, SPI and I2C, while the new driver has generic
support for all DBUS signals.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This moves GATT releated defines that are used by both Mesh Proxy
Service and Mesh Provisioning Service implementations to a common
header file.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
By default if CONFIG_BT_MESH_PROXY_USE_DEVICE_NAME
or CONFIG_BT_MESH_PB_GATT_USE_DEVICE_NAME is enabled, the mesh stack
will add BT_DATA_NAME_COMPLETE AD Type along with the Mesh Proxy Service
or Mesh Provisioning Service advertisements accordingly.
When BT_LE_ADV_OPT_USE_NAME was present and
CONFIG_BT_DEVICE_NAME_DYNAMIC is enabled, the advertised name was
automatically updated by the host. This turned out to be a side-effect
rather than expected behavior and after #71700 this behavior waa
changed.
But customers use dynamic name feature.
This commit makes the mesh stack use bt_get_name to get the device name,
which returns runtime name if CONFIG_BT_DEVICE_NAME_DYNAMIC is enabled.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Moving from TinyCrypt to PSA Crypto API caused failures in the cpu_net
build due to RAM being overflowed. It turned out that 8192 bytes were
allocated for system heap memory, but Mbed TLS is the only user
of that memory (I found this though puncover) for AES purposes.
We reduce that to 1024 bytes because this should be enough for
this purpose.
Note: albeit this is also a standalone example, it's used extensively
in other samples/tests and babblesim, so a failure in building it
propagates in a lot of other failures.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Increase test and main stack sizes for the qemu_cortex_m3 platform
in order to be able to successfully run the test.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit fixes
tests/bsim/bluetooth/ll/multiple_id/tests_scripts/multiple.sh.
The reason is that this test seems to depend on random number
sequence in order to have the proper scheduling.
It also fixes some AC tests by commenting out failing test
cases. The reason of the failure is still unknown and needs
to be investigated in future work.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Moving from TinyCrypt to PSA Crypto API caused an entropy source
to be always required, so this commit adds it in tests where
necessary.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
BT uses PSA Crypto API to perform crypto operations and, on this
platform, these APIs are implemented through Mbed TLS. In order
to properly initialize this library, a random number generator
is required.
* If the platform supports an HW entropy generator (ex: native_sim,
nrf), then ENTROPY_GENERATOR must be used;
* Otherwise (ex: qemu_cortex_m3) test random generator can be
enabled.
Enabling the proper option at board Kconfig level allows for
a more compact code change instead of manually editing _all_
the samples/tests that required this fix.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
On platforms like nrf5340 there are 2 CPUs:
- one is the cpu_net which takes care of the radio stuff and
owns the HW random generator
- one is the cpu_app which holds application data and polls
cpu_net through HCI commands when it needs some random data.
The PSA core implemented in Mbed TLS needs random data at initialization
time, which happens early in the boot process. If we wait for BT to
be ready before issuing the HCI command, then PSA core intialization
will fail. In facts there is no need for the BT to be completely
initialized just to ask for some random data from the cpu_app to
the cpu_net since the HW random generator will likely be already
functional in the cpu_net.
So let's just try the HCI command and, if something is not right,
it will fail anyway. There's no need to anticipate the failure.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Increase the number of key slots in the PSA Crypto core
for some tests using more keys than the default (16).
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Include Mbed TLS headers to the build system. This is required
because these tests do not follow the "standard build pattern"
of Mbed TLS in Zephyr, otherwise include files would be already
available after the library has been linked. In these examples
some BT source files and Kconfigs are manually added to the
CmakeLists.txt file bypassing the standard library build pattern,
so Mbed TLS headers must also be added manually.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
As part of the work of deprecating TinyCrypt in favor of
PSA crypto API, this commit fixes some kconfigs in order to
reduce the RAM footprint. In all involved samples RAM usage
was extremely high even with TinyCrypt (usually > 98%) and
of course it got overflowed once TinyCrypt got replaced by
Mbed TLS's PSA Crypto API.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since the TinyCrypt library is being deprecated in Zephyr, this
commit modified the dependencies of BT_RPA. Instead of selecting
TinyCrypt, it relies on BT_HOST_CRYPTO or BT_CTLR_CRYPTO. This
helps both in the deprecation process of TinyCrypt, but also this
is more correct dependency since these 2 symbols are extensively
used in the rpa.c source code.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since the TinyCrypt library is being deprecated in Zephyr, this
commit set TinyCrypt usage in BT mesh as deprecated and it sets
Mbed TLS PSA Crypto API as the default option (when TF-M is not
available).
Tests are also updated in this commit.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit sets PSA Crypto API as the default library to perform
ECC-DH in HCI, replacing TinyCrypt (which is being deprecated).
Therefore the symbol BT_TINYCRYPT_ECC is renamed as BT_SEND_ECC_EMULATION.
References in samples/tests are also fixed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
CONFIG_BT_USE_PSA_API was used in BT crypto/host modules to select
PSA crypto API over TinyCrypt (which was the default until now).
Since TinyCrypt is being deprecated and PSA crypto API is the new
standard library for crypto operations, CONFIG_BT_USE_PSA_API is
no more needed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Update TF-M revision to include a fix for crypto_sizes.h header
which is no more aligned to the Mbed TLS one and this causes
build failures in tests.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Flash node should not be under the peripheral bus, it is not a
peripheral. The base address of the flash was getting set correctly by
accident due to the fmu node mapping it out of the range of the
peripheral node by coincidence.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Fixes MCUBoot build error when enabled Serial Recovery via USB CDC ACM.
- Increases MCUBoot partition size.
Signed-off-by: Andrej Butok <Andrey.Butok@nxp.com>
FH4X SoC type contains improvements in ROM code that
can save up to 35kB of memory.
Update hal_espressif in order to select proper linker
file based on upon SoC model.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add RTIO async and RTIO stream functionalities that enables,
among all the other things, the sensor data streaming from FIFO.
RTIO stream is using both SENSOR_TRIG_FIFO_WATERMARK and
SENSOR_TRIG_FIFO_FULL triggers. The decoder currently only supports
following FIFO tags:
- LSM6DSV16X_XL_NC_TAG
- LSM6DSV16X_GY_NC_TAG
- LSM6DSV16X_TEMP_NC_TAG
Following FIFO parameters has to be defined in device tree to
correctly stream sensor data:
- fifo-watermark (defaults to 32)
- accel-fifo-batch-rate (defaults to LSM6DSV16X_DT_XL_NOT_BATCHED)
- gyro-fifo-batch-rate (defaults to LSM6DSV16X_DT_GY_NOT_BATCHED)
- temp-fifo-batch-rate (defaults to LSM6DSV16X_DT_TEMP_NOT_BATCHED)
Signed-off-by: Armando Visconti <armando.visconti@st.com>
- Disables on reset NMI and EzPort.
- Fixes possible reset and power-on issues.
- Already applied for K64, now applying for the rest of Kinetis.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
In cases were west modules did not change, skip. This happens when
manifest layout changes, but without SHA changes.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The timer count calculations are done with the assumption that the
prescalar is disabled. When using u-boot's SPL as an early boot stage,
the omap timer driver enables the prescalar leaving this driver to
calculate incorrect counts. So explicitly disable the prescalar to match
the driver expectation.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
Disabled data caching for nRF54H20dk in wdt_basic_api test.
It caused variables stored in noinit section to be cached,
resulting in reset loop.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
BUS_5V regulator is placed in the i2c peripheral, where it does
not belong. Move 5V bus regulator to board common definitions.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The API documentation already states that the controller may require
the scan interval and window used for scanning and connection
establishment to be equal to obtain the best performance.
This commit prints out a warning when this is not the case. The code
size is unchanged when `CONFIG_BT_SCAN_AND_INITIATE_IN_PARALLEL=n`.
This makes application developers aware that using the parameters
`BT_LE_SCAN_ACTIVE_CONTINUOUS` with `BT_CONN_LE_CREATE_CONN` may not
give the best performance.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add minimum flash requirement to the tests. This will effectively
exclude nrf5340dk/nrf5340/cpuapp/ns as it does not have
enough flash for the application.
Fixes#81862
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Traditionally threads have been initialized with a PRESTART flag set,
which gets cleared when the thread runs for the first time via either
its timeout or the k_thread_start() API.
But if you think about it, this is no different, semantically, than
SUSPENDED: the thread is prevented from running until the flag is
cleared.
So unify the two. Start threads in the SUSPENDED state, point
everyone looking at the PRESTART bit to the SUSPENDED flag, and make
k_thread_start() be a synonym for k_thread_resume().
There is some mild code size savings from the eliminated duplication,
but the real win here is that we make space in the thread flags byte,
which had run out.
Signed-off-by: Andy Ross <andyross@google.com>
This table just blindly assumed that the values of _THREAD_xxx state
bits wouldn't change. That's dangerous. (That's right, I tried to
change them and broke it.)
Signed-off-by: Andy Ross <andyross@google.com>
The board name should have the same size as all the other attributes
in the board's "Wikipedia card".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a spinel support to an RCP design, the core of OpenThread lives on the
host processor connected to an RCP radio controller over a HDLC interface.
Signed-off-by: Jamel Arbi <jamel.arbi@nxp.com>
In most implements, the msip base address is 0x2000000. But the address
is not fixed in all boards.
Signed-off-by: Yang Jialong <yangjialong@vcore.com>
The commit removes flash_area_open usage from tests, where it is not tested
and only used to obtain area.
The commit adds tests for flash_area_device_is_ready.
The commit adds test for flash_area_sectors, which is equivalent
of flash_area_get_sectors but takes flash area object instead of flash
area index.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds flash_area_sectors function that allows to get information
on sector/erase page layout by flash_area object pointer instead of
index.
The only difference between flash_area_sectors and flash_area_get_sectors
is that the later calls flash_area_open internally and as such requires
flash map to be compiled in.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds FIXED_PARTITION(label) macro that allows to obtain
struct flash_area object for partition of given label.
The macro allows instantiation of partition at point of usage
and will be replacing need for defining flash map with all partition
entries.
Area obtained with the macro should not be passed to open, instead
flash_area_device_is_ready, basically equivalent of device_is_ready
should be called on the obtained pointer to check if area is ready
for use.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
add vendor_allow and vendor_exclude to the list of filters. The vendor
data is maintained in the board.yml files.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Prior to running the compliance checks, we rebase the PR onto the target
branch to check the compliance state as if we were merged.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The gperf tool automatically selects the optimal data type for the
asso_values table, depending on MAX_HASH_VALUE. However, there is
a corner case when the tables generated on different stages of the
build process have different data types, causing a link-time error.
Upgrade the data type for the table from unsigned char to unsigned
short to at least exclude this 8-bit to 16-bit transition. There is
another potential issue with the 16-bit to 32-bit transition, but
it seems not very likely to have 65k kernel objects anytime soon.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
The video CIDs got changed, and users will be impacted and need to
rename some constants. Offer a strategy for finding the new names in
the migration guide for the upcoming release.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Make controls more readable and intuitive to extend, with definition
of each control value to help disambiguate between similar controls,
such as BRIGHTNESS vs GAIN.
Move the class definition to the top of each relevant class, like it
is on Linux for the V4L2_CID_..._CLASS_BASE variables.
Signed-off-by: Josuah Demangeon <me@josuah.net>
This uses Linux V4L2 controls as a reference to give names to the
CIDs. Apply the renaming down to the drivers that use them.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Refers to the CID numbers found in the Linux Kernel so that each CID
of Zephyr matches the CIDs of Linux. The new CIDs introduced in
Zephyr can then follow the same number and naming found on Linux.
No renaming of the CID macro names is done yet.
Signed-off-by: Josuah Demangeon <me@josuah.net>
The V4L2 and V4Z list of control IDs are slightly different. Use the
same CIDs as Linux, with the exact same numbers to facilitate debug
and co-development.
This also rename the GENERIC class into BASE as in Linux. No change
in the video CIDs names in this commit.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Unless the PHY is managed by LE power control, the CS procedure phy
needs to match the ACL phy.
Disabling the auto phy updates keeps the ACL on 1M.
The alternative would be to read the current phy by enabling
BT_USER_PHY_UPDATE but this still doesn't work if the phy is changed
after being read.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Handling the security changed callback was missing, so it could happen
that the sample would try to read remote capabilities before the link
was encrypted, which is not allowed.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
The special value 0x8000 is just outside the range of an int16_t,
so this should help make sure whatever overflow behavior is entered
by using the step data structs on protocol bytes is the same as this
macro.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Because the number of ACL RX buffers must be at least the number of
maximum connections plus one, increasing `CONFIG_BT_MAX_CONN` could
inadvertently lead to a build failure if the number of ACL RX buffers is
not also increased. This dependency may not be obvious to users.
To address this issue, this commit deprecates the
`CONFIG_BT_BUF_RX_COUNT` Kconfig symbol and computes the value in
`buf.h` using the new `BT_BUF_RX_COUNT` define. Note that the default
value and the minimum range value have been changed to 0 to "disable"
the option.
Additionally, to allow users to increase the number of ACL RX buffers,
this commit introduces the new `CONFIG_BT_BUF_RX_COUNT_EXTRA` Kconfig
symbol. The value of this symbol will be added to the computed value of
`BT_BUF_RX_COUNT`.
The configurations of tests and samples have been updated to reflect
these changes.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The README files of these samples already indicate that they use the
Zephyr-specific HCI vendor extensions, but this may still not be clear
enough to some users, as evidenced in #81779. Add build asserts to make
sure the samples only build when Zephyr VS extensions have been enabled.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This sample requires Zephyr HCI vendor extension support by the used
Bluetooth controller. In the case of qemu this needs to be explicitly
indicated by enabling the corresponding devicetree property.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This commit refactos set_actual_position to set_reference_position.
stepper_set_reference_position is more apt in regards to what this func
actually does
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
when receiving the io cap request from controller, call
pairing_accept to check whether application accept the
pairing. If no, reply BT_HCI_OP_IO_CAPABILITY_NEG_REPLY.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
The check combination of "is zero" and then "less than zero" leaves open
the theoretical possibility of a positive return value, which would
continue on with an uinitialized 'rela'.
Checking for "not zero" has the same effect and covers all situations.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Instead of depending on GPIO. This allows to just enable
CONFIG_INPUT=y + DT node in the application layer. The same
pattern is nowadays followed by most drivers.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Detect duplicate TestSuites on load, and raise error when it happens
with `--no-detailed-test-id` option which shortens TestSuite name
excluding the test project path prefix, thus increasing chances
for duplicates. Without this check, only the last duplicated
test configuration was selected while others silently ignored.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Fix duplicate test scenario error reporting to show paths to all
twister.yaml configuration files where these duplicates were found.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Updates the Kconfig condition to support trigger functionality for INA236.
This will get rid of `warning: INA230_TRIGGER (defined at
drivers/sensor/ti/ina23x/Kconfig:43) was assigned the value 'y' but got
the value 'n'.` if INA230_TRIGGER is enabled.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Optimize 'device_get_binding' function search so that
when a matching device is found, it returns NULL if
it is not ready.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Convert the eDMA compat to prop version for NXP S32Z2 SoC
that was missed in commit b070da7c33.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Fix CIS offset calculation by Central for subsequent CISes
such that when compensating for dissimilar ACL and ISO
intervals, ensure that minimum offset does not cause a
collision between the ACL and the CIS event at the instant.
Fixes commit 3b3d53f09e ("Bluetooth: Controller: Fix CIS
offset_min for dissimilar interval").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The #81456 fixed the driver issue related to issue #81454. This add
the RTC configurations on sam_v71_xult board to enable test coverage.
Fixes#81454
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Several arguments were added but have not yet been aligned with others
in the same function. Hence, use `getopt_state` to access `optarg`,
offering a better alternative to direct global access.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Instead of maintaining two lists, use the requirements file for
installing compliance dependencies.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
nrf5340_hci_ipc.conf and nrf5340_hci_ipc_cpunet.conf were board specific
rename them for generic multi-core board support
Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves fnmatch, getopt and getentropy
into a singular testsuite at tests/posix/c_lib_ext app directory.
Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
Without this PTS tests do not pass. These values are copied from a
commit aimed at unifying the prj.conf files in this directory. I do not
know which of these are strictly necessary to make the tests pass.
Copying them all poses no harm since the unification will be done later
anyway.
Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This API gives better control on L2CAP COC credits and suits better
for Upper Tester implementation.
Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This fix calling seg_recv() callback being called even though channel
is being disconnected due to SDU overflow.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Enable some high reliability CAP tests by increasing ISO Tx
buffer counts in the Controller to sufficiently generate
number of complete when multiple SDUs are transmitted in
single ISO interval with use of pre-transmissions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ISO Sync Receiver implementation to correctly prevent
subevent from pre-empted in the unreserve time space.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ISO Sync Receiver time reservation calculation to use
peer broadcasted bis_spacing and sub_interval, instead of
incorrectly calculating using local implementation used
tMSS value.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ISO Sync Receiver implementation to correctly reflect
the payload number and timestamp for the skipped SDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update the device driver API documentation with the new DEVICE_API
macro definitions and how to use them.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Extend the device subsystem enumeration script to produce a CMake
pre-load script.
This allow CMake linker generator scripts to create iterable sections
based on output from device subsystem enumeration.
This ensures that same functionality is available in both ld linker
templates and the linker generator.
Update linker generators to support the use of the device subsystem
enumeration CMake pre-load script.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Create a CMake preload file with linker settings which is then passed
to the linker script generator as preload file.
This removes the need for command invocation with long arguments.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add macro definitions for device drivers to instantiate API structs
into iterable sections and to evaluate them.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The device enumeration feature requires all devices
to place their API implementation in linker sections
by api type. This commit adds a script which uses
the tag __subsystem to identify all existing driver
API types and generate iterable sections for them.
The script is invoked from the top CMakeLists.txt
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
Co-authored-by: Pieter De Gendt <pieter.degendt@basalte.be>
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Per the docs, the memory at address 0x80000000 ends at 0xC0000000.
In other words, the address space is 0x40000000, which is only half
of the size we want to map. This means that the upper address space
previously mapped was overlapping with the space reserved for non-cached
memory.
Instead, we map the entire 2GB at 0x1000000000, which is the correct
address for cached DDR that occupies more than 1 GB.
We defined a new node in the device tree for this memory region,
`beaglev.ddr_cached_high`. We did not reuse the `soc` node because
we needed to redefine the `#address-cells` to be 2, and doing so
would have affected other nodes under `soc`.
Signed-off-by: Alex Charlton <alex.n.charlton@gmail.com>
uart1 is not connected to anything as far as I can tell.
uart0 was the previous correctly selected uart, so this changes
back to that.
Signed-off-by: Alex Charlton <alex.n.charlton@gmail.com>
This build would fail in CI for reasons that are not obvious.
```
west twister -i -p qemu_arc/qemu_arc_em \
-s tests/posix/common/portability.posix.common.userspace
scripts/build/gen_kobject_placeholders.py did not reserve \
enough space for kobject rodata.
```
It's the only platform that fails this way.
Exclude it from this test temporarily until #82059 is fixed.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
add display type for fixtures to avoid conflcts
in NXP platform
1. add required regex for console harness.
2. add message after processing, ensure the flow is OK
3. reduce the test time in TEST mode
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Fix for conversion of temperature values in adxl367_temp_convert
and missing break statement.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Fix for SPI communication when RTIO is used in SPI driver. When in
adxl367_bus_access, const struct spi_buf buf[3] is used,
spi_rtio_copy function won't set correct buffers and length
for buf[2] and that will cause exception when that buffer is
processed.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Since the label property from base.yaml is no longer deprecated, no need
to require to explicitly block it.
The only affected bindings seem to be these test bindings.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Label property is described in DT spec and does not need to be
deprecated in base.yaml anymore. It was originally deprecated to
discourage what was previously the most common use case of labels in
zephyr which was the old device_get_binding, which was rightfully
removed. However, labels do have a purpose as described in DT spec of
providing a human readable string to software to describe the device,
which there is some use for.
The description of a label should be given in the device binding, as
stated in DT spec.
Label properties should be of type string.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Trace32 runner: no need to configure TE bit in CFG_CORE
register in the cmm start-up script, it can be configured
at Zephyr start-up code when required (via SCTRL register)
- MPU static regions also needs to be updated for XIP and
non-XIP
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Add devicetree node for code RAM, code RAM can be accessed
over AIXM bus or AXIF bus. Code access via AXIF interface
provides the best optimal performance
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
On Arm Cortex R52, cache segregation policy controls the
number of L1 I/D cache ways that are allocated to Flash
and AXIM interface. Adding Kconfig options for configuring
it.
Writing to IMP_CSCTRL is only permitted before the caches
have been enabled, following a system reset.
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Use Zephyr cache API to initialize cache as done for
various platforms. Enabling CACHE_MANAGEMENT by default
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
The ctx_shell was only used a single place and in a function
that already has a `sh` that would be better to use.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There is no point in using lock or semaphore to read current
usage counter as it may change after unlocking or giving
back the semaphore. Value can only be trusted in the controlled
environment (e.g. test).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The ASCS unit tests had various errors after adding support for
dynamic registration.
Several tests did not properly clean up after failure, causing other
tests to fail when they shouldn't.
Moved the register tests to their own file as they should not
do the register in the "before" function.
The test_ascs_unregister_with_ases_in_config_state test was also
removed, as it had both issues and the state that it wants to test
cannot be reached with the current API - It is not possible to
put an ASE in the configured state without callbacks,
and registered callbacks prevents us from calling
bt_bap_unicast_server_unregister to trigger the case as that can
only be done if callbacks are unregistered. Since unregistering
callbacks also puts all ASEs to the idle state, it is not possible
to call bt_bap_unicast_server_unregister for a non-idle ASE.
The testcase.yaml was also missing some Kconfig options to
properly enable the client tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of requiring one big buffer for formatting the output,
have a walk function that can be used to generate output by
one metric at a time.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remove the "static" from HTTP service definition macro so that
user is able to add it or leave it out if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add collector parameter to metric creation macros so that it
is possible to bind the metric to collector already at built
time.
Also add optional user_data to metric macro calls so that user
can add optional data there. This will be used by network statistics
Prometheus support in subsequent commits.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When creating prometheus network statistics variables, we need
to map the variables back to the collector, so add a backpointer
to it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Embed "struct prometheus_metric" to individual metric like
counter, gauge, histogram and summary. This way we avoid having
a separate base pointer in specific metrict struct. We also do
not need to search the specific metric from base metric as
we can simply use CONTAINER_OF() macro to get the base metric.
This embedding means that the counter, gauge, histogram and summary
metric define macros are changed as user does not need to create a
separate "struct prometheus_metric".
Convert the tests and sample to use the new macros.
Remove also the static from metric creation macros so that user
can decide whether it needs collector to be static or not.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Instead of allocating space for description and label name + value,
have a const pointer for it. The data is set typically statically
when the metric is defined, so there should be no need to allocate
separate buffer for those strings.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This is similar function as add, but will add the difference of
previous value and the new one. This can be used if we want to
periodically update the value with a new one but don't want to
keep track of the old one.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Benchmarks are not tests, we run them to verify they still work and do
not bitrot. Running them on each architecture should be sufficient.
This reduces amount of churn in CI and still allows them to be run
individually on platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This adds the board name (displayed as a code literal) to the "Wikipedia
card" for quick reference.
Fixes#81652.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Don't duplicate the test's output running it on `native_sim` after
`LOG_BACKEND_NATIVE_POSIX` was enabled by default (bd9836be8c)
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Don't duplicate the test's output running it on `native_sim` after
`LOG_BACKEND_NATIVE_POSIX` was enabled by default (bd9836be8c)
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-26 15:41:33 -05:00
946 changed files with 23007 additions and 7199 deletions
@ -15,11 +15,17 @@ hobbyists, and researchers to explore and experiment with RISC-V technology.
Building
========
There are three board configurations provided for the BeagleV-Fire:
* ``beaglev_fire/polarfire/e51``: Uses only the E51 core
* ``beaglev_fire/polarfire/u54``: Uses the U54 cores
* ``beaglev_fire/polarfire/u54/smp``: Uses the U54 cores with CONFIG_SMP=y
Applications for the ``beaglev_fire`` board configuration can be built as usual:
..zephyr-app-commands::
:zephyr-app:samples/hello_world
:board:beaglev_fire
:board:beaglev_fire/polarfire/u54
:goals:build
Debugging
@ -76,3 +82,49 @@ and load the binary:
load
break main
continue
Flashing
========
When using the PolarFire `Hart Software Services <https://github.com/polarfire-soc/hart-software-services>`_ along with Zephyr, you need to use the `hss-payload-generator <https://github.com/polarfire-soc/hart-software-services/tree/master/tools/hss-payload-generator>`_ tool to generate an image that HSS can boot.
..code-block:: yaml
set-name: 'ZephyrImage'
# Define the entry point address for each hart (U54 cores)
hart-entry-points:
u54_1: '0x1000000000'
# Define the payloads (ELF binaries or raw blobs)
payloads:
<path_to_zephyr.elf>:
exec-addr: '0x1000000000' # Where Zephyr should be loaded
owner-hart: u54_1 # Primary hart that runs Zephyr
priv-mode: prv_m # Start in Machine mode
skip-opensbi: true # Boot directly without OpenSBI
After generating the image, you can flash it to the board by restarting a board that's connected over USB and UART, interrupting the HSS boot process with a key press, and then running the ``mmc`` and ``usbdmsc`` commands:
..code-block:: bash
Press a key to enter CLI, ESC to skip
Timeout in 1 second
.[6.304162] Character 100 pressed
[6.308415] Type HELP for list of commands
[6.313276] >> mmc
[10.450867] Selecting SDCARD/MMC (fallback) as boot source ...
Waiting for USB Host to connect... (CTRL-C to quit)
. 0 bytes written, 0 bytes read
USB Host connected. Waiting for disconnect... (CTRL-C to quit)
/ 0 bytes written, 219136 bytes read
This will cause the board to appear as a USB mass storage device. You can then then flash the image with ``dd`` or other tools like `BalenaEtcher <https://www.balena.io/etcher/>`_:
* `Dev-Install: Installing Developer and Test packages onto a Chrome OS device <https://www.chromium.org/chromium-os/developer-library/guides/device/install-software-on-base-images/>`__
Once you have the device set up, the process is as simple as copying
the ``zephyr.img`` file from the build directory to the device
(typically via ssh) and running it with the script. For example for
my mt8186 device named "steelix":
..code-block:: console
user@dev_host:~$ west build -b mt8186//adsp samples/hello_world