<?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 ROM_4000 &amp; option: -OnB=b in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/ROM-4000-option-OnB-b/m-p/922676#M7615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We&amp;nbsp;have some projects that use mc9s12dg256, mc9s12xdt512 and mc9s12xeq512 controllers.&lt;/P&gt;&lt;P&gt;In the ROM area 4000, are stored data that are device configuration parameters.&lt;/P&gt;&lt;P&gt;All data in ROM 4000 are accessible through pointers.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;004000'L&amp;nbsp; &amp;nbsp;00 18 06 ED 0B 94 10 3B ....&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the pointer for ROM 4000:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;const struct Index_Struct&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;unsigned int General_Param;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;unsigned int Keyboard;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;unsigned int Fonts;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;}* const Index = (const struct Index_Struct *) (0x7F4000);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The data are&amp;nbsp;&lt;SPAN&gt;accessible through the pointer:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;Fonts_Address = (*Index).Fonts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Key_Address = (*Index).Keyboard;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the data sheet, if ROM 4000 is used, we have to compile the project with&amp;nbsp;option: -OnB=b.&lt;/P&gt;&lt;P&gt;In this case the ROM 4000 is used only for constant data, no firmware is located.&lt;/P&gt;&lt;P&gt;Should we compile the project with&amp;nbsp;&lt;SPAN&gt;option: -OnB=b?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am asking because our projects use the ROM 4000 for constant data, we do not use this option but the projects works properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jul 2019 09:37:00 GMT</pubDate>
    <dc:creator>Eric_t</dc:creator>
    <dc:date>2019-07-01T09:37:00Z</dc:date>
    <item>
      <title>ROM_4000 &amp; option: -OnB=b</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/ROM-4000-option-OnB-b/m-p/922676#M7615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We&amp;nbsp;have some projects that use mc9s12dg256, mc9s12xdt512 and mc9s12xeq512 controllers.&lt;/P&gt;&lt;P&gt;In the ROM area 4000, are stored data that are device configuration parameters.&lt;/P&gt;&lt;P&gt;All data in ROM 4000 are accessible through pointers.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;004000'L&amp;nbsp; &amp;nbsp;00 18 06 ED 0B 94 10 3B ....&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the pointer for ROM 4000:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;const struct Index_Struct&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;unsigned int General_Param;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;unsigned int Keyboard;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;unsigned int Fonts;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;}* const Index = (const struct Index_Struct *) (0x7F4000);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The data are&amp;nbsp;&lt;SPAN&gt;accessible through the pointer:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;Fonts_Address = (*Index).Fonts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Key_Address = (*Index).Keyboard;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the data sheet, if ROM 4000 is used, we have to compile the project with&amp;nbsp;option: -OnB=b.&lt;/P&gt;&lt;P&gt;In this case the ROM 4000 is used only for constant data, no firmware is located.&lt;/P&gt;&lt;P&gt;Should we compile the project with&amp;nbsp;&lt;SPAN&gt;option: -OnB=b?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am asking because our projects use the ROM 4000 for constant data, we do not use this option but the projects works properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 09:37:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/ROM-4000-option-OnB-b/m-p/922676#M7615</guid>
      <dc:creator>Eric_t</dc:creator>
      <dc:date>2019-07-01T09:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: ROM_4000 &amp; option: -OnB=b</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/ROM-4000-option-OnB-b/m-p/922677#M7616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;-OnB=b Disable Branch JSR to BSR optimization. The "Branch JSR to BSR Optimization" uses a BSR instead of a JSR to call a function, if the offset is small enough and known at compilation time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The difference of JSR and BSR is the way they call functions. If your code doesn't related with function call, personally I think -OnB=b is not necessary.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;But I strongly recommend you follow the suggestion of CW ROM 4000 usage to add&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;-OnB=b. It's no harm.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 10:07:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/ROM-4000-option-OnB-b/m-p/922677#M7616</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2019-08-06T10:07:07Z</dc:date>
    </item>
  </channel>
</rss>

