Tool/software:
Hi team,
I develop sbl_ospi of mcu_plus_sdk_am243x.
If booting fails, I'm considering a method to boot from another section.
Currently, if authentication fails, the boot section is changed as follows.
However, since Bootloader_parseMultiCoreAppImage() is usually used only once,
I am concerned that using it multiple times may cause problems with variable initialization, etc.
Is there any problem using it like this?
/* Initialize PRU Cores if applicable */ Bootloader_Config *cfg = (Bootloader_Config *)bootHandle; bootConfig = (Bootloader_Config *)bootHandle; bootConfig->scratchMemPtr = gAppimage; if(TRUE == cfg->initICSSCores) { status = Bootloader_socEnableICSSCores(BOOTLOADER_ICSS_CORE_DEFAULT_FREQUENCY); DebugP_assert(status == SystemP_SUCCESS); } /* If booting from 0x100000 fails, switch to 0x200000 */ uint32_t BootSelect=0; if(BootSelect==0){ ((Bootloader_FlashArgs *)(cfg->args))->appImageOffset = 0x100000; DebugP_log("Change boot section to 0x100000\r\n"); status = Bootloader_parseMultiCoreAppImage(bootHandle, &bootImageInfo); if(status != SystemP_SUCCESS){ BootSelect = 1; } } if(BootSelect==1){ ((Bootloader_FlashArgs *)(cfg->args))->appImageOffset = 0x200000; DebugP_log("Change boot section to 0x200000\r\n"); status = Bootloader_parseMultiCoreAppImage(bootHandle, &bootImageInfo); if(status != SystemP_SUCCESS){ } }
Best regard
Oyama