Adds a new field which is set to the estimated size of the
upgrade slot data, this is used to know how much space should
be reserved in an update image to determine if an update will
fit or not
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
New arguments in zcbor_new_state are set to NULL/0 because they are
only needed when using the zcbor_unordered_map API.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Fixes an issue whereby slot sizes were checked but the check was
not done properly. This also adds debug log messages to show the
sector configuration including if slot sizes are not optimal
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds debug level logging which shows the offset of where a
sector swap status write is occurring at
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue whereby a device might not have a write or erase
entry for the flash controller in devicetree. In the case whereby
the other slot has this information, use that instead. In the case
whereby neither slot has this information, use default values and
show a warning to the user
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Prevents enabling the option to save encrypted TLVs if encryption
support is not enabled, as it is required to make use of this
functionality.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds MCUboot's estimated overhead footer size to the application's
cache when using sysbuild, this allows that information to be
propagated to applications which can use the information to reduce
the available size for an application, preventing the MCUboot
error of image too large to swap.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add support for ESP32xx_luatos_core targets to build
as Zephyr application.
This target is simular to esp32 devkitm,
copy conf file from esp32xx_devkitm
Signed-off-by: YuLong Yao <feilongphone@gmail.com>
The static declaration of 'led0' was moved to 'io.c' which broke
building with the 'MCUBOOT_INDICATION_LED' enabled:
mcuboot/boot/zephyr/main.c:380:22: error:
'led0' undeclared (first use in this function)
380 | gpio_pin_set_dt(&led0, 1);
| ^~~~
This adds simple function 'io_led_set()' for changing LED's value.
Fixes: 433b8480 ("zephyr: Move IO functions out of main to separate file")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This fixes below error when building with 'MCUBOOT_INDICATION_LED' and
'LOG' enabled:
In file included from zephyr/include/zephyr/logging/log.h:11,
from zephyr/include/zephyr/usb/usb_device.h:43,
from bootloader/mcuboot/boot/zephyr/io.c:26:
mcuboot/boot/zephyr/io.c: In function 'io_led_init':
zephyr/include/zephyr/logging/log_core.h:151:20: error:
'__log_level' undeclared (first use in this function)
151 | (_level <= __log_level) && \
| ^~~~~~~~~~~
Fixes: 433b8480 ("zephyr: Move IO functions out of main to separate file")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This fixes below warning when building with 'MCUBOOT_INDICATION_LED'
enabled:
mcuboot/boot/zephyr/main.c:410:5:
warning: implicit declaration of function 'led_init';
did you mean 'io_led_init'? [-Wimplicit-function-declaration]
410 | led_init();
| ^~~~~~~~
| io_led_init
Fixes: 433b8480 ("zephyr: Move IO functions out of main to separate file")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Adds a new operation style in which the secondary slot has an
image which is used to update the primary image only.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue whereby MCUboot is configured in single application
slot mode with serial recovery with encryption and an encrypted
image has been loaded, if valid this will have been decrypted, so
should not be treated as encrypted
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Prevents an issue which occurs when the MCUboot configuration is
changed which then selects multiple conflicting symbols
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue whereby when an echo command is sent in serial
recovery mode, if it is disabled, there would just be no response
at all, which is invalid operation
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes USB configurations so that they build out of the box, this
previously falsely built successfully but would not run
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a build failure if the main thread priority is not preemptible
and USB CDC ACM serial recovery is used, this is because if this is
the case, USB events will never be able to be processed and serial
recovery cannot ever enumerate
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This prevents MCUboot from successfully building if console and
serial recovery (USB CDC) are both enabled and they both point to
the same device
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Use the default MCUBoot PEM key file in hello-world project settings.
Without it the application is not verified by MCUBoot.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Align parameter should be optional:
- it has a default value.
- it is not used for non-swap update modes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
- Assert should be checked only for SWAP update modes.
- Allow platforms with page size >32 Bytes (e.g. LPC) to use
MCUBoot, at least for non-SWAP update modes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>