Split heap-validate.c into smaller chunks. We have been adding all kind
of new APIs under this file and building it unconditionally whether
those APIs are needed/used or not. Many of those APIs have nothing to do
with the validation part.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As the common.h is only meant to be used by the network
shell files, rename it to be more descriptive in order to
avoid possible conflicts with any other common.h file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Do dhcpv6 state initialization same way as how dhcpv4 is done
when initializing network interface structure.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Avoid using #ifdefs when declaring macros twice. This way
there is only one macro that does the initialization.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use the IF_ENABLED() macro to define the net_buf pool initializer
macro only once. This way the initializer is only defined in
one place.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The target has board configuration for spi_flash sample but bacause
of the lack of SPI mentioned in supported peripherals Twister
is filtering out the target for sample.drivers.spi.flash test.
Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
The string "" is of type '(const char *)', so add a cast over to
'(char *)' to clean up source code.
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Use the common USBD sample initialization helper where new USB device
support has already been added.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
There is common code for the new USB device support in the samples to
instantiate USB device, descriptors, configuration and initialize USB
device. Add common code that can be used for the simple usecase with a
single USB device and single configuration.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Usually we want set all values of code triple Base Class, SubClass, and
Protocol at once. Merge existing functions to set code, subcode,
protocol into just one helper to set code triple.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Targets that have a data cache must enable CACHE_MANAGEMENT to allow the
llext API to flush it when loading an extension. This patch forces the
flag to be enabled when the target has a data cache.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The arch_* functions are architecture-specific and may not be defined in
all targets. Use the global alias defined in the Cache API instead.
Fixes#66382.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Introduce support for ST Nucleo F722ZE, an evaluation board based on
the STM32F722ZET6U microcontroller.
Signed-off-by: Evan Perry Grove <evan@4grove.com>
The STM32F722 is similar to the STM32F723, but lacks the latter's
more advanced USB PHY. Otherwise, they are virtually identical.
Signed-off-by: Evan Perry Grove <evan@4grove.com>
Renames "prov device" references and options to
"provisionee" to align implementation with Mesh
Protocol specification v1.1, section 5.4.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
This commit replaces a magic number in the definition of serialization
ring buffer length with a macro provided by the 802.15.4 driver.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
IEEE 802.15.4-2020 defines four possible values for Key Identifier Mode
field of the Auxiliary Security Header. The current ieee802154 driver
API only supports two of them: b00 and b01. This commit adds support for
the two remaining Key Identifier Mode values. It's done by replacing a
field that can only hold Key Index into a field that can holds a pointer
to the entire Key Identifier field.
See IEEE 802.15.4-2020, sections 9.4.2.3 and 9.4.4 for further reference.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
ERROR_QUIET should be used only when the command is actually expected to
fail, otherwise discarding stderr can be extremely time-consuming. See
recent example of time lost in commit 40c2e08e82 ("xcc/cmake: don't
discard stderr; don't (ever!) use ERROR_QUIET")
If some Python interpreter cannot even evaluate `sys.version_info[:2]`,
then we definitely don't want to hide what its stderr says about that.
Fixes commit 94de3e9f60 ("cmake: FindPython3: Adjust python3 program
search")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add support for enabling the clock security system, which can detect
failures of the HSE clock.
Includes tests for nucleo_h743zi and nucleo_g474re.
Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
Isochronous endpoint issue with USB drivers on STM32G491
we setup an isochronous endpoint and are having an issue
where every other frame sends the desired data sandwiched
between garbage data.
For isochronous the parameter ep_kind into the fonction :
HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr,
uint16_t ep_kind, uint32_t pmaadress) must be PCD_DBL_BUF.
The parameter pmaadress (EP address in The PMA) is like that:
EP address in The PMA: In case of single buffer endpoint
this parameter is 16-bit value providing the address
in PMA allocated to endpoint.
In case of double buffer endpoint this parameter
is a 32-bit value providing the endpoint buffer 0 address
in the LSB part of 32-bit value and endpoint buffer 1 address
in the MSB part of 32-bit value.
Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
Separating two new functions force and allow l1
to have the current state with separated functions
in the ipc file so that SOF can call these
functions via IPC DMI_FORCE_L1_EXIT. Change related
to the addition of a new parameter to force
DMI L1 exit on IPC request.
Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
Calling the registered receive callback when releasing TCP context
doesn't make sense, as at that point the application should've already
closed the associated socket (that's one of the conditions for the
context to be released). Therefore, remove the pointless receive
callback call, while keeping the loop to unref any leftover data packets
(although again, I don' think there should be any packets left at that
point, as they're all consumed in tcp_in()).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
While improving thread safety of the TCP stack I've introduced a
possible deadlock scenario, when calling tcp_conn_close() in tcp_in().
This function shall not be called with connection mutex locked, as it
calls registered recv callback internally, which could lead to deadlock
between TCP/socket mutexes.
This commit moves the tcp_conn_close() back where it was originally
called. I've verified that the thread safety is still solid with the
test apps used originally.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added a spinlock to accesses of registers and struct gpio_ite_data,
except for gpio_ite_isr() function.
Bug #66401
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Add test case for all drivers that are supporting the die temperature
feature, and fix right away all the yet undiscovered issues.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
When we are sending a network pkt, do not tweak the original
packet but the cloned one. The original behavior is ok too, but
logically we should adjust the cloned packet only that is being
received by the stack. This also means that we avoid one extra
copy to tmp variable when sending the packet.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This fixes the return error code for Preset Write operation that shall
be returned when preset is not writable (or disabled via Kconfig like in
this case).
As per HAS_v1.0; 3.2.2.3 Write Preset Name operation
"If the Writable bit in the Properties field of the preset record which
is identified by the Index parameter is set to 0b0, then the server
shall return an ATT_ERROR_RSP PDU to the ATT_WRITE_REQ PDU with
the Error Code parameter set to Write Name Not Allowed."
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Rename xtensa_asm2.c to have a more meaningful name to actually
reflect the content of the file. This file is mostly about
handling interrupts and exceptions (via the predefined vectors
in Xtensa core).
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fold z_arch_get_next_switch_handle() into return_to(). This is
not exactly an arch interface, and is simple enough to be
moved into return_to().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This gets rid of the z_ prefix.
Note that z_xt_*() are being used by the HAL so they cannot be
renamed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This follows the idea to remove any z_ prefix. Since MMU has
a large number of these, separate out these changes into one
commit to ease review effort.
Since these are no longer have z_, these need proper doxygen
doc. So add them too.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
z_xtensa_dump_stack() and z_xtensa_exccause() are both arch
internal functions that should not be exposed in public API.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>