AnsweredAssumed Answered

FLASH TWO CODES ON SAME CONTROLLER (STM32F7)

Question asked by Faiz Ahmed on Jan 3, 2018
Latest reply on Jan 4, 2018 by Doug Kehn

Hi,

i am trying to flash two different codes on same controller at different memory locations, at power-on condition code-1 will be executed, from that code i want to call code-2. i tried below method which is not working (ONLY CODE-1 IS GETTING EXECUTED), can anyone suggest any other method or any modifications needed to this code.

 

 

code-1: at memory location 0x8000000

int main (void)

{

      fp = (int(*)(void))0x80400000;                            //Here i am using function pointer to call another code

 

while(1)

   {

         printf(" this is code-1 \n");

         int (*fp)(void);

    }

}

 

 

code-2:at memory location 0x8040000

int main (void)

{

 

         printf(" this is code-2 \n");

 

}

Outcomes