When building an LLEXT-enabled kernel, 62b19ef65c added weak aliases
of all syscall implementation functions to a pointer to NULL, with the
assumption that LLEXT would check the required symbols at link time and
fail if any of them were found.
This check, however, is ineffective in the current implementation: the
actual address that is exported is the rather normal-looking location of
the variable containing the NULL pointer. This defeats the NULL symbol
validity checks in llext_link.c and causes the extension to crash at
runtime by jumping to a location containing a few zeroes in read-only
data memory.
This commit makes sure the alias target is actually placed at address 0
using the llext-sections.ld linker fragment, so that undefined syscall
implementations are exported as NULLs and as such properly flagged at
link time.
The test for this functionality is also updated to reflect the change.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Whenever FW blobs are updated manually, we need to tell cmake to
auto-build the source files to use the latest firmware without doing a
pristine build.
This adds a custom target to be run with nRF Wi-Fi driver and updates
timestamp of fw_load.c to rebuild whenevr the blob is updated.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This script is needed only when external flash is used to store nRF70
firmware patches. This also uses PM which is supported only in NCS.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
For using external flash the tooling is only available in NCS, so, use
the existing Kconfig option to override the FW loading.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Building the net logger backend with IPv4 only gives the following
warning:
log_backend_net.c:116:31: warning: array subscript 'struct sockaddr[0]'
is partly outside array bounds of 'struct sockaddr_in[1]'
[-Warray-bounds] local_addr->sa_family = server_addr.sa_family;
hence assign the address family directly to sockaddr_in/6 structs.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The sample uses net_config library, so there's no need for the sample to
configure unicast IP addresses manually.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case CONFIG_DNS_RESOLVER_MAX_SERVERS is larger than the actual number
of DNS servers configured, some server entries may be left
uninitialized. The dispatcher needs to take this into account, otherwise
it may cause memory corruptions.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Refactor the code to comply with:
Violation to rule 5.7 (Tag name should be unique) tag: data
Rename the structure to avoid excessive refactoring.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Building the sample with IPv4 only gives the following warning:
tcp.c:99:37: warning: array subscript 'struct sockaddr[0]' is partly
outside array bounds of 'struct sockaddr_in[1]' [-Warray-bounds]
data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP);
This doesn't really seem like a valid one, but to get rid of it
workaround by specifying address family explicitly.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The checks did not properly take into account
that the pref_pd_min and pref_pd_max could have valid
0 values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There are many places where source_id is retrieved and it
depends on runtime filtering being enabled. So far it was
all exposed but lets encapsulate that into a helper function.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Streamline the `rc` return logic in `nvs_flash_wrt_entry()`, `nvs_gc()`
by directly returning `rc`, as the redundant conditional check and
explicit return of 0 were unnecessary.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Full name or description of a board is something we are missing in
HWVv2. It is right now being added to yaml files parsed by twister. This
should be generically available to tooling and documentation
independently from twister.
As we rework how twister parses board meta-data (#77250) and how we
generate board documentation (#79160), this becomes neceassry.
Moving the board full name/description from the twister yaml files to
the board.yaml is something we can automate once the schema is agreed
upon.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change log level to fixed value coherent with macros used in the
test (LOG_INF). Use context struct to better organize global
variables and improve code readability.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.
This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.
Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/72567
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Disable CDC ACM logging in the configuration overlays used to select the
CDC ACM UART as the shell backend.
The build warning was introduced by the commit e8c4867806
("usb: cdc_acm: disable logging if used for shell with logging")
to prevent recursive logging when using the CDC ACM UART as shell or
logging backend
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add a flash copy command, capable of copying a region in one
flash device to a region on the same or another flash device. The
destination is erased prior to copying.
This is useful for evaluating mcuboot on devices with little
on-chip resources, or devices that are incapable of running more
elaborate image management services (e.g. via bluetooth or
networking).
Additionally, it's useful for evaluating mcuboot on devices with
one or more images stored on external spi flash.
The command syntax is
flash copy <src_dev> <dst_dev> <src_offs> <dest_offs> <size>
E.g.
flash copy flash@0 flash-controller@abcd1234 0x1234 0x5678 21012
Copied 21012 bytes from flash@0:1234 to \
flash-controller@abcd1234:5678
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
test_flash_erase() requires that the expected[] array contains
pseudo-random data. However, the expected[] array would only
be initialized once before all tests are run using the setup
callback.
Instead, use the before() callback to randomize data before
each test in the suite, since there is otherwise no guarantee
that test_flash_erase() will be run directly after the
expected[] array has been randomized.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Provide a generic flash_copy() algorithm that is capable of
copying from one flash device to another or within different
regions of the same flash device.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Some counter drivers do not support alarms, so I added testcase which
starts the counter, checks if the value is in range after certain time and
stops the counter, to check if the counter is running correctly.
Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
Co-authored-by: Michal Smola <michal.smola@nxp.com>
Adding the macros `RA_CGC_CLK_SRC` and `RA_CGC_CLK_DIV` that derive
the BSP clock settings from the DeviceTree node settings.
I also define some aliases to fill in the gaps with the BSP
naming conventions.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Move the process of replacing numerical values with macros to
the header, and set the division ratio in a numeric without
using macros in the device tree.
Change `clk-div` defined in `renesas,ra-cgc-pclk.yaml` to `div`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
DeviceTree typically references the clock source using the `clocks`
property defined in `base.yaml`, so we'll change it to this.
Also delete the custom clock source definitions in
`renesas,ra-cgc-pclk-block.yaml`, `renesas,ra-cgc-pclk.yaml`, and
`renesas,ra-cgc-pll.yaml`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Changes the path name of a DTS node so that it can be used
as the stem of a BSP macro.
All nodes to be changed are referenced via labels,
so only the name is changed.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Like some other string properties, I will add a derived form
to FULL_NAME to make it easier to reference from macros.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Extend the `coap_transmission_parameters` struct with the field
`ack_random_percent`. This was the last remaining CoAP transmission
parameter that was not configurable at runtime.
Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
The ztest.c calls atoi, which is provided by the C standard library.
Remove the conditional inclusion of the C standard library with the
definition of CONFIG_ZTEST_SHUFFLE.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
dcache-alignement needs to be defined for ipc to have
consistent memory organization on both endpoints, when
shared memory is cacheable. nrf54h20 and nrf9280 are
using cacheable shared memory.
This is applied for ipc with icmsg backend.
Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>