Fixes macros that broke after changes were merged which started
using the unit address of partition nodes. This also fixes the
test to ensure devices not starting at 0x0 are properly checked
which previously would silently be unknown
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds support for using MCUmgr over UART (not via shell) in a raw
mode which does not include base64 and other SMP over console
encoding
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The return value variable was initialized but immediately
overwritten before.
Remove the redundant initialization and limit the variable scope to
where it is actually used.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Changes CONFIG_MCUMGR_TRANSPORT_UART from selecting
CONFIG_UART_MCUMGR to instead of depending upon it, as it should
never have selected a driver Kconfig and instead always depended
upon it, and is needed for supporting different UART transports
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds names to these libraries to prevent using auto-generated
names of the paths, which can be longer than the maximum supported
length on the current version of gcc for windows
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes various issues in the Kconfigs including not properly having
abbreviations in the correct case, line lengths, duplicating other
Kconfigs, etc.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
A new error code FS_MGMT_ERR_FILE_CLOSE_FAILED is returned when
closing a file fails. This is done on write or close operations - read
operations remain unchecked.
Signed-off-by: Samuel Kleiser <s.kleiser@vega.com>
In case of native build, the CONFIG_architecture
cannot currently be resolved with Kconfig, so we
must fall back to resolving it during compilation
using compiler definitions.
Signed-off-by: Jaagup Averin <jaagup.averin@gmail.com>
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.
Duplicates inside different #ifdef branches are preserved
as they may be intentional.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The FW loader reports and manages exactly two slots:
- slot 0: this is the slot for the application code to update
- slot 1: this is the slot, in which the FW loader is placed
The slot 1 is reported, so tools can fetch metadata about the
FW loader installed on the device.
Unfortunately, currently SMP-based FW loader allows to issue slot erase
command for the slot 1, effectively erasing the FW loader code that is
being executed.
This change correctly identifies the slot 1 as an active one, marking it
as used and blocking erase operation on that slot.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
According to the docs the millis were in the format `.SSSSSS`. In
reality though, it only accepted exactly `.SSS`, not `.SS` or `.SSSS`
and specifically also not `.SSSSSS`, contrary to the docs. Further, it did
not fail with an error message but simply produced the wrong value.
With this change it accepts everything from `.` to `.SSSSSS` and
produces the correct result. This is compatible with the previous
behavior, with the documentation and with everything in between.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
- Currently, it is not possible to use mcumgr client with smp server
since there is no way to specify smp server address for requests.
- This patch series adds support for creating smp_client_object
containing information regarding the host server. This design allows
multiple smp_client_object to exist for the same underlying smp_udp
transport, making it much easier to use the same udp socket for multiple
OTAs.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Fixes an issue introduced in commit
32615695ad which wrongly did not
check what the residing device was on before determining if a
slot was part of a partition area
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds functionality that allows saving a single setting to NVM using
the newly added function in the settings subsystem. This also
replaces calling the subtree save function if it the underlying
Kconfig is enabled to reduce code paths in settings mgmt
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds support for the memory pool statistics (mpstat) command, which
will list details on various memory heaps on the device
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Replaces the img_mgmt specific function with the common SMP
function for resetting the zcbor buffer and allowing a new response
to be sent
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Adds a common zcbor reset buffer function, this allows for the
buffer to be reset after data has been added already to add a
different response, e.g. an error response
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Add Cortex-A320 support to the unified FVP board structure with ARMv9.2-A
specific configuration parameters.
New board target:
- fvp_base_revc_2xaem/a320
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add ARMv9-A architecture support with Cortex-A510 CPU as the default
processor for generic ARMv9-A targets.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Fix a bug where the image's SHA would be interpreted as TLV headers due
to missing a data_off increment.
Signed-off-by: Stuart Alldritt <s.k.alldritt@gmail.com>
If slots have equal version, but a secondary slot is the active one, the
next boot will switch to the primary slot.
Expose this through SMP commands by marking the primary slot as pending.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Partially reverts commit 7d2fb6c013,
it was originally thought that this commit added a method of saving
one specific key using the value that the device already has set,
but has been found to actually save the value that the user has
provided, bypassing the current value that the device has, which is
not compliant with the settings mgmt protocol, therefore remove
this change and it will need to be reworked in future to function
properly by saving one specific value from the device's current
configuration, not a user-specified value
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The long-term goal of Zephyr is to rely exclusively on PSA Crypto API for
crypto support. At the same time Mbed TLS is going to remove legacy crypto
support starting from the next relase (v4.0).
Therefore this commit removes usage of legacy Mbed TLS crypto in favor
of PSA Crypto API. Mbed TLS will still be used in case of a build where
TF-M is not enabled.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Fixes an issue in a board using ethernet that faults with the
default 512 byte size by doubling the default to 1KiB. The actual
size of the thread depends upon the device and application
configuration so needs to be fine tined for each application
anyhow
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Extend the save command to allow passing name/val pair to save a
subtree or individual setting to persistent storage.
Resolves zephyrproject-rtos#90407
Co-authored-by: Jamie <40387179+nordicjm@users.noreply.github.com>
Signed-off-by: Rami Saad <rami.saad@morgansolar.com>
It is possible to add MCUboot header through --pad-header option.
In such cases, the FLASH_LOAD_OFFSET does not point to the beginning of
the slot, but to the beginning of the executable area, thus the check
for the active slot should use ranges instead of exact values.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Uses the full hwmv2 board target for the hardware platform output,
seemingly this was missed in the hwmv2 migration and it was using
the board name only. Adds a deprecated Kconfig to restore to the
previous behaviour
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
It is essential for the overwrite mode to allow confirming the secondary
slot to provide the permanent update.
This types of updates is the only mode in which the application may be
upgraded.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Fix the incorrect usage of Kconfig symbols and revert back the default
behavior to allow for non-active slot confirmation.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
In Direct XIP with revert, it should be possible to block confirmation
of the non-active slot, so only a bootable binaries are marked as valid.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Add missing `.key` designator.
This also fixes a compile error:
> error: either all initializer clauses should be designated or none of
them should be
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Introduce a new Kconfig option CPU_CORTEX_A78 to enable support for the
Arm Cortex-A78 CPU architecture within Zephyr. This configuration can be
selected by boards or SoCs that utilize the Cortex-A78 core, enabling
architecture-specific features and optimizations as needed.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Adds support for images signed with SHA512.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Allows returning image information for the firmware loader image
slot, showing version of the application and flags
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add initial support for the Cortex-M52 Core which is an implementation
of the Armv8.1-M mainline architecture.
The support is based on the Cortex-M55 support that already exists in
Zephyr.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
We should not block erasing pending images when using ramload with
revert mode, because uploading multiple confirmed images with the same
version would brick the device (preventing future FW updates). Update
the dependencies of img_mgmt_slot_in_use to account for this.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
As struct sockaddr have now alignment of 4 bytes, net_ipaddr_copy()
gives the following error if used for sockaddr:
error: alignment 1 of ‘struct <anonymous>’ is less than 4
[-Werror=packed-not-aligned]
Just use memcpy() instead, net_ipaddr_copy() was intended to use with IP
addresses, not socket related structs.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>