cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F205ZGT7 - Unable to start the application from the 0x08008000 (Sector 2 start address) address in flash memory.

DA.1115
Associate II

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 -

  1. 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)
  2. Bootloader read the application stored in the external flash and then place it in the Application start Address 0x08008000

Application -

  1. 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 :

  1. code runs into HardFault_Handler in the stm32f2xx_it.c
  2. 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

3 REPLIES 3

You need to change SCB->VTOR to the application's vector table address (i.e. 0x08008000) before you jump into the application (and enable interrupts there).

JW

Piranha
Chief II

Implement much better and simpler approach described in my comment there:

https://community.st.com/s/question/0D50X0000AFpTmUSQV/using-nvicsystemreset-in-bootloaderapplication-jumps

berendi
Principal

Find out the address of the reset handler function of the application. Look into the map file, or try to generate it if it isn't there.

Verify the value of JumpToApplication.

Set a breakpoint on JumpToApplication(); and step into it in disassembler/instruction debug mode. Observe where it lands, compare the address with the address from the map file, and the instructions there with the application reset handler.

2. LED blinking application is not running

Is it the expected behaviour, or do you expect it to run? If you expect it to run, can you explain why?

(I'm out to buy a shotgun)