2 Replies Latest reply on Feb 12, 2018 10:17 PM by xiaopingyang_1543386

    How to jump to the function  using the address of it?

    xiaopingyang_1543386

      Hi  Sir ,

           Now I have a question , How to jump to the function  using the address of it?

          In my project ,I find out  the address one of  a function in the map file. for example ,  

          void Test(void)

          {

             static  unsigned char i=0;

           

          }

         the address of it is  0x00001000,

        

         I  try the code as follows:

           (*(void(*)(void))((uint32)0x00001000))();

       

       

         but it jump  to

       

      #ifdef CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK

                      CyBoot_IntDefaultHandler_Exception_EntryCallback();

                  #endif /* CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK */

       

       

                  while(1)

                  {

       

       

                  }

      I  cannot find out why.

      Please help me!

      Thanks a lot.