AnsweredAssumed Answered

Bootloader/App no work

Question asked by brenga_isse.marcelo on Aug 24, 2010
Latest reply on Sep 7, 2010 by brenga_isse.marcelo
Hello all 
   
Am I with problems to create bootloader in the microcontroller STR711FR2, somebody can help me??   
   
I have 2 projects created in IAR (v5.41) that now are totally independent: 
 
The first is my application that works perfectly when I download in start address os FLASH (0x40000000), the initialization file (71x_init.s) and vectors (71x_vect.s) I use supplied by ST (MCD Application Team, version 4.0) attached. 
 
The second project is the bootloader, that works perfectly when I download in start address of FLASH (0x40000000), the init/vects are same. The bootloader receives data from serial port (.bin file of the application) and write data in the flash in sectors 2,3,4,5,6 and 7 (the bootloader is in the sector 0 and 1), I created a function for jump from bootloader to application (function below), however when I execute the function the application doesn't work!  
 
When I debug the bootloader, I am sure that the recording of the flash (sectors 2,3...) it is correct and executing step by step the function Exec_App () I see that is jumping for the address of the application (0x40004000) correctly, however in the execution of the first instruction of init.s of the application, the PC is moved for the area of the bootloader... 
 
What should I make to work the bootloader and application? should it use the remap? how?    
   
__noreturn __arm void Exec_App(void)   
{   
 asm (" mov r0, #0x40000000 ");   
 asm (" add r0, r0, #0x4000 ");   
 asm (" mov pc, r0 ");   
}   
   
   
Regards, 
Marcelo Brenga Isse

Attachments

Outcomes