How to make Application(2cores) work with Bootloader for STM32H757 Eval board
I have flashed bootloader code at 0x08000000 location.
Also, I have flashed application (2 cores) out of which
M7 core resides at 0x08040000 location &
M4 core resides at 0x08100000 location.
Now, in debug mode, the bootloader and the application is working together, i.e after reset bootloader code will be executed and from their application is booted. In order to verify the run state of application I toggle 1 LED in M7 core and 1 LED in M4 core. So, both are happening.
But, In free run mode, its not working the same. Instead after bootloader execution, its not jumping to application.
I am clueless why this is happening.
Following are my configurations done,
Bootloader_main.c:
static void goto_application(void)
{
printf("Gonna Jump to Application\n");
void (*app_reset_handler)(void) = (void*)(*((volatile uint32_t*) (0x08040000 + 4U)));
//__set_MSP(*(volatile uint32_t*) 0x08040000);
// Turn OFF the Green Led to tell the user that Bootloader is not running
HAL_GPIO_WritePin(LED_GREEN_BL_GPIO_Port, LED_GREEN_BL_Pin, GPIO_PIN_RESET ); //Green LED OFF
app_reset_handler(); //call the app reset handler
}
Application_CM7_STM32H757XIHX_FLASH.ld file:
/* Memories definition */
MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08040000, LENGTH = 512K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
Application_CM4_STM32H757XIHX_FLASH.ld file:
MEMORY
{
FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 1024K
RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 288K
}
system_stm32h7xx_dualcore_boot_cm4_cm7.c
#elif defined(CORE_CM7)
#define VECT_TAB_OFFSET 0x00040000U
Let me know if I am missing anything in this.
