Unverified Commit fec7042d authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski Committed by GitHub
Browse files

Synch up to the mcu-tools/mcuboot rev 4030aac5

Synch up to the https://github.com/mcu-tools/mcuboot/commit/4030aac5944e5105f45bfcb02b7e0065810a8aeb



- Switched zephyr port from using FLASH_AREA_ macros to FIXED_PARTITION_ macros
- Made flash_map_backend.h compatible with a C++ compiler
- Enabled watchdog feed by default
-  Allowed to get the flash write alignment basing on the zephyr,flash DT chosen node property

Merged using GH web gui.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parents 21e56a1b 4030aac5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,12 +40,12 @@ jobs:
    runs-on: ubuntu-latest
    # Docker image from the zephyr upstream. Includes SDK and other required tools
    container:
      image: zephyrprojectrtos/ci:v0.21.0
      image: zephyrprojectrtos/ci:v0.24.2
      options: '--entrypoint /bin/bash'
      volumes:
        - /home/runners/zephyrproject:/github/cache/zephyrproject
    env:
      ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.2
      ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.15.0

    steps:
      - name: Set versions when workflow_dispatch
+1 −0
Original line number Diff line number Diff line
@@ -2814,6 +2814,7 @@ boot_remove_image_from_flash(struct boot_loader_state *state, uint32_t slot)
    rc = flash_area_open(area_id, &fap);
    if (rc == 0) {
        flash_area_erase(fap, 0, flash_area_get_size(fap));
        flash_area_close(fap);
    }

    return rc;
+8 −0
Original line number Diff line number Diff line
@@ -26,6 +26,10 @@

#include <inttypes.h>

#ifdef __cplusplus
extern "C" {
#endif
  
/****************************************************************************
 * Public Types
 ****************************************************************************/
@@ -419,4 +423,8 @@ int flash_area_id_to_multi_image_slot(int image_index, int area_id);

int flash_area_id_from_image_offset(uint32_t offset);

#ifdef __cplusplus
}
#endif

#endif /* __BOOT_NUTTX_INCLUDE_FLASH_MAP_BACKEND_FLASH_MAP_BACKEND_H */
+33 −0
Original line number Diff line number Diff line
@@ -32,6 +32,27 @@

#include "flash_map_backend/flash_map_backend.h"

/****************************************************************************
 * Pre-processor Definitions
 ****************************************************************************/

/* Should we perform board-specific driver initialization?  There are two
 * ways that board initialization can occur:  1) automatically via
 * board_late_initialize() during bootupif CONFIG_BOARD_LATE_INITIALIZE
 * or 2).
 * via a call to boardctl() if the interface is enabled
 * (CONFIG_BOARDCTL=y).
 * If this task is running as an NSH built-in application, then that
 * initialization has probably already been performed otherwise we do it
 * here.
 */

#undef NEED_BOARDINIT

#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT)
#  define NEED_BOARDINIT 1
#endif

/****************************************************************************
 * Private Functions
 ****************************************************************************/
@@ -79,6 +100,18 @@ int main(int argc, FAR char *argv[])
  struct boot_rsp rsp;
  fih_int fih_rc = FIH_FAILURE;

#ifdef NEED_BOARDINIT
  /* Perform architecture-specific initialization (if configured) */

  boardctl(BOARDIOC_INIT, 0);

#ifdef CONFIG_BOARDCTL_FINALINIT
  /* Perform architecture-specific final-initialization (if configured) */
  
  boardctl(BOARDIOC_FINALINIT, 0);
#endif
#endif

  syslog(LOG_INFO, "*** Booting MCUboot build %s ***\n", CONFIG_MCUBOOT_VERSION);

  FIH_CALL(boot_go, fih_rc, &rsp);
+4 −4
Original line number Diff line number Diff line
@@ -556,10 +556,10 @@ endchoice

config BOOT_WATCHDOG_FEED
	bool "Feed the watchdog while doing swap"
	default y if SOC_FAMILY_NRF
	imply NRFX_WDT
	imply NRFX_WDT0
	imply NRFX_WDT1
	default y
	imply NRFX_WDT if SOC_FAMILY_NRF
	imply NRFX_WDT0 if SOC_FAMILY_NRF
	imply NRFX_WDT1 if SOC_FAMILY_NRF
	help
	  Enables implementation of MCUBOOT_WATCHDOG_FEED() macro which is
	  used to feed watchdog while doing time consuming operations.
Loading