Highlights of zcbor 0.8.0:
- Add support for unordered maps
- Performance improvements
- Naming improvements for generated code
- Bugfixes
Update MCUboot and uoscore-uedhoc to bring in changes related to
zcbor 0.8.0.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
The implementation uses the same approach as STM32F1x.
Program/erase speed can be set by setting 'write-block-size' flash
property to 1, 2, 4 or 8.
Signed-off-by: Patryk Duda <patrykd@google.com>
Although very unlikely for this value to ever be negative in practice,
this would make Coverity happy.
Fixes#67969
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Instead of seeding the random generator from the test
itself calling into a host API, let's use the
entropy generator option to be seeded from /dev/urandom
This avoids trouble with the srandom() and time() calls
not existing depending on the chosen C library.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a command line option which will seed the random generator
from /dev/urandom.
This can be usefull for some particular tests in which we are
interested in having different random numbers in each run,
but we cannot provide a different random seed from command line.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable GCC builtin static analysis in Zephyr's static code analysis
(SCA) infra.
When this option is enabled GCC performs a static analysis and
can point problems like:
sample.c
+ int *j;
+
+ if (j != NULL) {
+ printf("j != NULL\n");
output:
${ZEPHYR_BASE}/samples/userspace/hello_world_user/src/main.c:30:12:
warning: use of uninitialized value 'j' [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]
30 | if (j != NULL) {
| ^
'main': events 1-2
|
| 25 | int *j;
| | ^
| | |
| | (1) region created on stack here
|......
| 30 | if (j != NULL) {
| | ~
| | |
| | (2) use of uninitialized value 'j' here
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
* Reduces memory usage for ctype while fixing an 'isblank'
related compatibility issue.
* Resolves compatibility issues with GCC 13
* Removes explicit _POSIX_C_SOURCE definition when building
as a module.
* Fix some _FORTIFY_SOURCE issues.
Signed-off-by: Keith Packard <keithp@keithp.com>
Zephyr does not include this function under Rule A.4: C Standard Library
Usage Restrictions in Zephyr Kernel, hence a conforming C library need not
provide it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add a top-level menu to prevent POSIX API options from
cluttering the menuconfig view under
"Additional libraries".
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Refactors modem chat module to use TRANSMIT_IDLE event instead
of polling when transmitting, cleaning up the transmit handler
by combining duplicate code and using an internal state instead
of multiple iterators to track send state.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Remove receive and transmit timeouts which are no
longer useful as the RECEIVE_READY and
TRANSMIT_IDLE events will be used to efficiently
manage timeouts between transmit/receive calls.
Then update the the in-tree drivers using the
modem_chat module to omit the process timeout
parameter.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Temporarily ignore the Tx ISO Data Packet Sequence Number use
as the tester app does not have yet a synchronization mechanism for
the sequence number and it constantly fails to send ISO data on time.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
With PM, when resuming from low power mode, reenable the RNG register
clocks and check the health register. If it is not set to the desired
value, it means we exit Suspend to RAM mode, and that the RNG needs to be
reinitialized.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Prevents the system to go in Suspend to RAM low power mode while ADC
measurement is in progress.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
When resuming from low power mode, if UART is disabled, this means that
we come from a mode that reset the registers, so we redo a full init of
the driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Fix a bug where after a standby, it was impossible to reenable a GPIO
clock.
A counter is incremented each time pm_device_runtime_get is called, and
decremented each time pm_device_runtime_put is called. The
clock is only enabled if this counter equals 1.
When configuring a GPIO (as input or output), the timer is incremented, and
when disconnecting it, it is both incremented and decremented. Thus the
next time we try to configuring it, the clock is not enabled (since the
counter will now be equal to 2).
This causes a problem when using low power standby mode: after wakeup all
clocks are disabled and the GPIO clock can not be reenabled.
This commit fixes this bug by not incrementing the counter when disconnect
is asked (or in other words incrementing it only when configuring either
an input or an output).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for a backup standby timer in STM32 LPTIM driver for cases
when the LPTIM is not available (ie standby low power mode).
A counter (typically RTC) is used for such a case.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove initialization of static variable to 0 to prevent resetting the
value when reinitializing the driver after resume from standby.
This has no impact since static variables are initialized to 0 by default.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Avoid unexpected memory access in cases where the IPSR has an odd
register index. In the scenario where an odd register index is present
in IPSR, the LSB of the register index is utilized as MSB of the bank
number. Observe how we pack reg/bank:
'IPSR(((reg) << 4U) | (bank), shift, func)' (macro IPnSR)
and how it is read from the device tree source:
'(RCAR_IPSR(node_id) >> 10U) & 0x1FU' (macro RCAR_PIN_FUNC).
Finally, this bank is used to obtain the required IPSR offset:
'PFC_RCAR_IPSR + rcar_func->bank * sizeof(uint32_t)'
in the 'pfc_rcar_set_ipsr' function. For example, if we have the 1 as
a reg index and the 3-rd bank, the resulting offset would be 19,
which is beyond the IPSR range.
Align the IPSR comment with the definition of the 'rcar_pin_func'
structure.
Note: we can omit the usage of the register index entirely since this
information is obtained from the pin number inside the
'pfc_rcar_get_reg_index' function.
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Provide different loop delays to `wait_until_ready` based upon the
operation that we are waiting for.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Don't monopolise the CPU in `spi_nor_wait_until_ready`. For slow flash
chips, operations can take minutes (Full chip erase on MX25R is listed
as 120s typical, 240s max).
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This tests whether there actually is an itcm or dtcm in the device tree.
Otherwise a FATAL_ERROR is generated.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
This allows to link code and data blocks, e.g. the vector table, into
tightly coupled memory using `zephyr_linker_sources`.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
Use `DT_CAT*` macros to paste simple things together instead
of `UTIL_CAT` wherever possible. This should reduce the amount
of error messages from the compiler when something goes wrong.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Update the Thrift sample to include instructions on
fetching optional modules. Without this, user builds
will fail.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This change marks each instance of the 'api' as 'static const'.
The rationale is that 'api' is used for declaring internal
module interfaces and is not intended to be modified at runtime.
By using 'static const', we ensure immutability, leading to usage of only
.rodata and a reduction in the .data area.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Minor fixes in this test script to:
* Start with an empty flash even if there was a left over flash file
on disk
* Not overwrite the simulation activity from the first part of the test
in the second part of the test, to allow looking into the
traffic and to allow rerunning the test in check mode, to ensure
there is no radio activity changes when another change is done.
* Set the simulation id to something more unique (it was just
"peripheral" before which is too easy to be repeated in another
test)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Updates the latency_measure benchmark to make the number of
iterations for which each test executes to be configurable.
This allows someone to make a tradeoff between accuracy
and execution time (can be useful for simulators).
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When set, this GPIO controller has pins associated with the
keyboard controller. In this case the reg_gpcr property is
overloaded and used to write the keyboard GCTRL register
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Update the reference to the Bluetooth Appropriate Language Mapping
Tables document. The link is now the same as the Bluetooth SIG website
uses.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
As described in issue:
https://github.com/zephyrproject-rtos/zephyr/issues/65027,
sdmmc_wait_ready can enter an infinite loop if the card is removed while
waiting for it to report an idle status. Fix this by always decrementing
the timeout in sdmmc_wait_ready, regardless of whether the SD card is
busy.
Fixes#65027
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
NXP RT series DMA need use buffer in nocached area,
so only use memory region relocated is not enough.
fixing: #67053
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
This commit adds source and header files required for bmp581 I2C driver.
I have used bmp581_user.h to add more usage related definitions
but bmp581.h to add hardware related definitions.
Signed-off-by: Talha Can Havadar <havadartalha@gmail.com>
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
This patch add the basic board support for the
STM32WB5MM-DK Discovery Kit. At the moment only
debug UART Debug is ported. Other peripherals will be added
in the following patches.
Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
The STM32 DMA driver supports cyclic mode by setting source_reload_en
and dest_reload_en. This causes the dma_callback to be called twice per
buffer run-through, at half-time and when wrapping back to the start of
the buffer.
However, the current implementation only calls dma_callback twice. When
wrapping the first time, it sets stream->busy to false and ignores
subsequent interrupts.
With this change, the busy flag is only cleared in non-cyclic mode.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Fix the handling of buffers with fragments. What seems to have been
broken is the metadata reference that was not passed to the next frag in
the chain.
Add a test to regression too.
The main user of this is IPSP.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Use different acquisition time for a board (WB55) that has individual
sampling register, and for another (WBA52) that have two common registers.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For series that have two sampling time common channels, only one was used.
This commit add the support for the second one. The first two different
acquisition time values are used for the sequence and all further values
must match either of them, otherwise generating an error.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>