<?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>topic Vector Table in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167430#M3115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have various functions called Boot, SMBus_Init, SMBus_Process, etc. Unless I know the size of each function I can not stack them one top of another and keep track of the exact location where each function starts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know a better way of doing this is to use a jump table and know how to do it in SiLabs IDE. I was wondering if you guys know a way of doing this in CodeWarrior. Right now it is in SiLabs IDE format.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CSEG&amp;nbsp;&amp;nbsp;&amp;nbsp; AT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x007B&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXTRN&amp;nbsp;&amp;nbsp; CODE (Boot)&amp;nbsp; // tells the linker that Boot is an external function - go look for it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXTRN&amp;nbsp;&amp;nbsp; CODE (SMBus_Init)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXTRN&amp;nbsp;&amp;nbsp; CODE (SMBus_Process)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AJMP&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Boot // jump to Boot. Instruction stored at x7b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AJMP&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SMBus_Init&amp;nbsp; //jump to SMBus_Init. Instruction stored at 0x7d. Jump instructions take 2 code &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //spaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AJMP&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SMBus_Process // jump to SBus_Process. Instruction stored at 0x7f&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you give me a hint on how to do this in CodeWarrior, I can make constant function pointer calls to envoke my functions from outside the bootloader project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef void (* ConstFunctPtr)(void);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ConstFunctPtr FunctPtr;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FunctPtr = (ConstFunctPtr)(HARD_CODED_ADDRESS_LOCATION);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FunctPtr();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can think of a way to get around this but am not entierly happy with myself. One way of doing this would be creating one lined functions for making calls and stacking them on top of another. Then in the linker I could put these one lined functions at fixed addresses probably separating them by 4-5 address locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void CallBoot(void){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boot();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks guys/gals! And thanks for all your help in the past as well!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2008 23:23:30 GMT</pubDate>
    <dc:creator>NeedHelp</dc:creator>
    <dc:date>2008-06-24T23:23:30Z</dc:date>
    <item>
      <title>Vector Table</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167430#M3115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have various functions called Boot, SMBus_Init, SMBus_Process, etc. Unless I know the size of each function I can not stack them one top of another and keep track of the exact location where each function starts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know a better way of doing this is to use a jump table and know how to do it in SiLabs IDE. I was wondering if you guys know a way of doing this in CodeWarrior. Right now it is in SiLabs IDE format.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CSEG&amp;nbsp;&amp;nbsp;&amp;nbsp; AT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x007B&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXTRN&amp;nbsp;&amp;nbsp; CODE (Boot)&amp;nbsp; // tells the linker that Boot is an external function - go look for it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXTRN&amp;nbsp;&amp;nbsp; CODE (SMBus_Init)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXTRN&amp;nbsp;&amp;nbsp; CODE (SMBus_Process)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AJMP&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Boot // jump to Boot. Instruction stored at x7b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AJMP&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SMBus_Init&amp;nbsp; //jump to SMBus_Init. Instruction stored at 0x7d. Jump instructions take 2 code &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //spaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AJMP&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SMBus_Process // jump to SBus_Process. Instruction stored at 0x7f&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you give me a hint on how to do this in CodeWarrior, I can make constant function pointer calls to envoke my functions from outside the bootloader project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef void (* ConstFunctPtr)(void);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ConstFunctPtr FunctPtr;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FunctPtr = (ConstFunctPtr)(HARD_CODED_ADDRESS_LOCATION);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FunctPtr();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can think of a way to get around this but am not entierly happy with myself. One way of doing this would be creating one lined functions for making calls and stacking them on top of another. Then in the linker I could put these one lined functions at fixed addresses probably separating them by 4-5 address locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void CallBoot(void){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boot();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks guys/gals! And thanks for all your help in the past as well!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2008 23:23:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167430#M3115</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-06-24T23:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Vector Table</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167431#M3116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Humm. I think this will be investigated by Technical team.&lt;/DIV&gt;&lt;DIV&gt;The better way will be to log it directly in the Technical support system.&lt;BR /&gt;Please use Freescale on line support web page.&lt;BR /&gt;&amp;nbsp; - Go to following URL: &lt;A href="http://www.freescale.com/TechSupport" rel="nofollow" target="_blank"&gt;http://www.freescale.com/TechSupport&lt;/A&gt;&lt;BR /&gt;&amp;nbsp; - Click on Submit a Service Request. You will come to a login page.&lt;BR /&gt;&amp;nbsp; - You can submit your request through the web from there.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 17:01:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167431#M3116</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-06-25T17:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Vector Table</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167432#M3117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thank you Pascal, the Service Request team is working on my request.&lt;BR /&gt;G'day mate.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:41:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Vector-Table/m-p/167432#M3117</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-06-26T20:41:43Z</dc:date>
    </item>
  </channel>
</rss>

