Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCUBoot: Multi memory load feature #1742

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DOAR-Infineon
Copy link
Contributor

@DOAR-Infineon DOAR-Infineon commented Jul 10, 2023

Implement multi memory boot feature

In the current implementation, the ability to launch several applications using different memory modes has been added.
Use cases: multi core and ram app boot alongside with flash based applications

MCUBOOT_MULTI_MEMORY_LOAD
--- Feature: partial multi-image boot for RAM based applications
--- Feature: partial multi-image boot for Flash applications

These changes were made to make MCUBoot able to work with flash and ram images independently.
The use case that we need to support, a multi image configuration:

Application_1 boots from RAM
Application_2 boots from FLASH
Application_N boots from FLASH
Example:

image_boot_config_t image_boot_config[BOOT_IMAGE_NUMBER] = {
    {
        .mode = IMAGE_BOOT_MODE_RAM,
        .address = 0x08012000,
        .size = 0x00010000,
    },
    {
        .mode = IMAGE_BOOT_MODE_FLASH,
        .address = 0x10002000,
        .size = 0x00008000,
    },
};

/* Perform MCUboot */
for (uint32_t id = 0U; id < (uint32_t)BOOT_IMAGE_NUMBER; id++) {
    BOOT_LOG_INF("Processing img id: %d", id);
#if !defined(MCUBOOT_RAM_LOAD) || defined(MCUBOOT_MULTI_MEMORY_LOAD)
    if (image_boot_config[id].mode == IMAGE_BOOT_MODE_FLASH) {
        FIH_CALL(boot_go_for_image_id, fih_rc, &rsp[id], id);
    } else
#endif
    {
#if defined(MCUBOOT_RAM_LOAD)
        FIH_CALL(boot_go_for_image_id_ram, fih_rc, &rsp[id], id);
#endif
    }
}

@DOAR-Infineon DOAR-Infineon marked this pull request as ready for review July 11, 2023 09:50
Signed-off-by: INFINEON\DovhalA <Artem.Dovhal@infineon.com>
@d3zd3z
Copy link
Member

d3zd3z commented Dec 14, 2023

What is the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants