STM32F205ZGT7 - Unable to start the application from the 0x08008000 (Sector 2 start address) address in flash memory.
Hi all, Thanks for the sharing the experience and support.
My application Info: I required to develop two independent program (Bootloader,Application )
Bootloader Address range - 0x08000000 - 0x08007FFF (Sector 0,Sector 1)
Application Address range - 0x08008000 - 0x080FFFFF (Sector 2 - Sector 11)
Implementation Plan :
Bootloader -
- Need to change the ROM end address and RAM End address in the Linker configuration (Options -> Linker -> Config -> Edit) (To maintain independent ROM and RAM section for the Bootloader and the Application)
- Bootloader read the application stored in the external flash and then place it in the Application start Address 0x08008000
Application -
- Need to change the Interrupt vector table address, ROM and RAM start and End address in the Linker configuration (Options -> Linker -> Config -> Edit).
Application code Info:
Now I am developing the application in the independent project (Bootloader project is not used to start the application). Application project Settings and flow are below
Interrupt vector table address(.intvec start) - 0x08000000
ROM address (Start - End Address) - (0x08008000 - 0x080FFFFF)
RAM address (Start - End Address) - (0x20000000 - 0x20020000)
Observation :
- code runs into HardFault_Handler in the stm32f2xx_it.c
- LED blinking application is not running
Code snap :
#define APPLICATION_ADDRESS (uint32_t)0x08008000
int main(void)
{
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4); /* execute the new program */
JumpToApplication = (pFunction) JumpAddress; /* Jump to user application */
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS); /* Initialize user application's Stack Pointer */
JumpToApplication();
HAL_Init(); /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
SystemClock_Config(); /* Configure the system clock */
< Instance to Initialize all configured peripherals >
HAL_TIM_Base_Start_IT(&htim10); < start the basic time in interrupt>
< Instance to Add the application code- LED blinking>
}
Need help for the bootloader project to avoid similar failure
