<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32K中的主题 How S32K jumps to function through function address</title>
    <link>https://community.nxp.com/t5/S32K/How-S32K-jumps-to-function-through-function-address/m-p/1060851#M7124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; My development environment is S32DS.I defined a function "void IAP_main(void)" in the program bootloader, fixed his address as 0x00007C00, and the map file showed that the function address was set successfully. Now I need to jump from the program APP to “void IAP_main(void)”, but I pass the following code can not achieve:&lt;/P&gt;&lt;P&gt;(*((void (*)())0x00007C00))();or &amp;nbsp; (*((void (*)())0x00007C01))();&lt;/P&gt;&lt;P&gt;How to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;In addition, when I jump from APP to boodloader, I need to keep the peripheral state unchanged. How to initialize the interrupt vector table and stack? The starting address of the flash of the boodloader is 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2020 01:38:02 GMT</pubDate>
    <dc:creator>2974515017</dc:creator>
    <dc:date>2020-07-20T01:38:02Z</dc:date>
    <item>
      <title>How S32K jumps to function through function address</title>
      <link>https://community.nxp.com/t5/S32K/How-S32K-jumps-to-function-through-function-address/m-p/1060851#M7124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; My development environment is S32DS.I defined a function "void IAP_main(void)" in the program bootloader, fixed his address as 0x00007C00, and the map file showed that the function address was set successfully. Now I need to jump from the program APP to “void IAP_main(void)”, but I pass the following code can not achieve:&lt;/P&gt;&lt;P&gt;(*((void (*)())0x00007C00))();or &amp;nbsp; (*((void (*)())0x00007C01))();&lt;/P&gt;&lt;P&gt;How to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;In addition, when I jump from APP to boodloader, I need to keep the peripheral state unchanged. How to initialize the interrupt vector table and stack? The starting address of the flash of the boodloader is 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2020 01:38:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-S32K-jumps-to-function-through-function-address/m-p/1060851#M7124</guid>
      <dc:creator>2974515017</dc:creator>
      <dc:date>2020-07-20T01:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How S32K jumps to function through function address</title>
      <link>https://community.nxp.com/t5/S32K/How-S32K-jumps-to-function-through-function-address/m-p/1060852#M7125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can jump at a certain address by the code below:&lt;/P&gt;&lt;P&gt;typedef void (*function_pointer)(void);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function_pointer func_p = (function_pointer) 0x000007C01;&lt;BR /&gt; func_p();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your second question, you can look at the AN12218 where is this relocation used before jump into the application.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip"&gt;AN12218SW.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Vector table relocation S32_SCB-&amp;gt;VTOR = (uint32_t)APP_START_ADDRESS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 07:25:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-S32K-jumps-to-function-through-function-address/m-p/1060852#M7125</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-07-22T07:25:15Z</dc:date>
    </item>
  </channel>
</rss>

