<?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>8-bit MicrocontrollersのトピックRe: Code Size issue - can ansibfm.lib be pared down or replaced?</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403449#M21352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tony, yeah, that's a floating point library, but I need it because of some floating point math being performed in IEEE 754 format.&amp;nbsp; As you said, though, I could do this in integer math, but this would take a major rewrite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I am near the capacity of the 128k chip.&amp;nbsp; 42.8k+5.5k+58.5k = 107.1k.&amp;nbsp; I was sitting at 110k when I got my link errors that told me I was over size (&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background: none;"&gt;Link Error : L1102: Out of allocation space in segment ROM2 at address.....[something]&lt;/CODE&gt;) before I optimized some code.&amp;nbsp; Data size is currently 4k, so add that to the sum and the total = 111.1k.&amp;nbsp; The register memory mapping of the processor takes up the remainder of the memory I believe.&amp;nbsp; My .map and .prm files look correct from what I can tell, i.e. I am using the full paged memory of the processor (although I don't quite understand why PPAGE=3 is not available to be used, just that it is combined with another memory block.&amp;nbsp; FYI, I am using a bootloader (AN2295), which further makes this a problem (although the size of the bootloader is small).&amp;nbsp;&amp;nbsp; To address your 16k paged statement (break up files), I'm pretty confident that processor's MMU manages that seamlessly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Back to my original question, I'm hoping other developers can give advice to choose a smaller library that still allows floating point with my processor (&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;MC9S08DZ128&lt;/SPAN&gt;), somehow defeature the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;ansibfm.lib, or some other tip or trick to reduce the library size (compile time options, etc).&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2015 16:47:08 GMT</pubDate>
    <dc:creator>photoman</dc:creator>
    <dc:date>2015-09-01T16:47:08Z</dc:date>
    <item>
      <title>Code Size issue - can ansibfm.lib be pared down or replaced?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403447#M21350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, I am developing an application on an MC9S08DZ128 and have run out of user code space.&amp;nbsp; My user modules are 42793, generated code is 5450, and Libs is 58481 bytes. The only entry under "Libs" is ansibfm.lib (58481 bytes in size).&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, what is this library (I find very little documentation on it on the web).&amp;nbsp; Is there an alternative library I can use that will support floating point (How do I switch the libraries?)?&amp;nbsp; Or can I take functionality (size) out of this library at compile time using options in Codewarrior?&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This library just seems huge.&amp;nbsp; There has got to be an alternative, especially needed for those using processors with 32k flash.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any hints or tricks for paring down code?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; background-color: #fffef9;"&gt;I am using version 6.3 of Code Warrior (Classic IDE, Basic Edition).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; background-color: #fffef9;"&gt;Thanks very much for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 21:16:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403447#M21350</guid>
      <dc:creator>photoman</dc:creator>
      <dc:date>2015-08-27T21:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Code Size issue - can ansibfm.lib be pared down or replaced?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403448#M21351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to be the floating-point library, which you may not need at all as most things can be done with integer math.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot offer any advice on the CodeWarrior libraries as I don't use CW but the sizes you mention are obviously far below the total capacity of the 128K chip.&amp;nbsp; The page size, however, is only 16K.&amp;nbsp; So, I suspect you need to break up (if possible) the loading of these libraries to occur in multiple pages instead of just one (which would justify the error you're getting).&amp;nbsp; In other words, it seems this is a mapping problem, not a size one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 09:21:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403448#M21351</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2015-08-30T09:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Code Size issue - can ansibfm.lib be pared down or replaced?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403449#M21352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tony, yeah, that's a floating point library, but I need it because of some floating point math being performed in IEEE 754 format.&amp;nbsp; As you said, though, I could do this in integer math, but this would take a major rewrite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I am near the capacity of the 128k chip.&amp;nbsp; 42.8k+5.5k+58.5k = 107.1k.&amp;nbsp; I was sitting at 110k when I got my link errors that told me I was over size (&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background: none;"&gt;Link Error : L1102: Out of allocation space in segment ROM2 at address.....[something]&lt;/CODE&gt;) before I optimized some code.&amp;nbsp; Data size is currently 4k, so add that to the sum and the total = 111.1k.&amp;nbsp; The register memory mapping of the processor takes up the remainder of the memory I believe.&amp;nbsp; My .map and .prm files look correct from what I can tell, i.e. I am using the full paged memory of the processor (although I don't quite understand why PPAGE=3 is not available to be used, just that it is combined with another memory block.&amp;nbsp; FYI, I am using a bootloader (AN2295), which further makes this a problem (although the size of the bootloader is small).&amp;nbsp;&amp;nbsp; To address your 16k paged statement (break up files), I'm pretty confident that processor's MMU manages that seamlessly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Back to my original question, I'm hoping other developers can give advice to choose a smaller library that still allows floating point with my processor (&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;MC9S08DZ128&lt;/SPAN&gt;), somehow defeature the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;ansibfm.lib, or some other tip or trick to reduce the library size (compile time options, etc).&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 16:47:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403449#M21352</guid>
      <dc:creator>photoman</dc:creator>
      <dc:date>2015-09-01T16:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Code Size issue - can ansibfm.lib be pared down or replaced?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403450#M21353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(First of all, I'm sure others who've used the same library will possibly be able to help more in this regard.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK.&amp;nbsp; 128KB is all Flash and is all available for your app -- so, you still have plenty of room left.&amp;nbsp; (What hides behind registers, for example, is accessible as paged memory.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PPAGE3 simply happens to be the same as the highest 16K of the directly addressable 64K (non-paged), and because it has to hold your apps vectors (etc) it's best not to be used for paged code.&amp;nbsp; &lt;EM&gt;(You could if you wanted -- at least from assembly language.)&lt;/EM&gt;&amp;nbsp; You ISRs have to go to non-paged, although you could CALL functions in paged memory from within them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The processor's MMU will not do anything to manage your app -- it's 'your' job to organize your app into pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, your C compiler might.&amp;nbsp; But whether it's smart enough to split large libraries in multiple pages correctly I don't know.&amp;nbsp; I suspect it won't -- at least not automatically.&amp;nbsp; The reason is that CALLed (paged) functions may depend on local (BSR/JSR called) subroutines.&amp;nbsp; Reshuffling paged functions, if not done correctly, will break those dependencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, anyway, somebody who knows CW's 'skills' will be able to answer this better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 20:05:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403450#M21353</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2015-09-01T20:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Code Size issue - can ansibfm.lib be pared down or replaced?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403451#M21354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can rebuild the standard library. I'm not sure how much can be trimmed by compiler options, but that is probably the way to try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have CW Classic for S08, but CW for S12X has the library project at &amp;lt;install_folder&amp;gt;/lib/hc12c/. There's a project file for (re-)building the library, and a readme file that explains the options used for the prebuilt library versions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2015 07:46:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403451#M21354</guid>
      <dc:creator>markkurönö</dc:creator>
      <dc:date>2015-09-02T07:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Code Size issue - can ansibfm.lib be pared down or replaced?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403452#M21355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My suggestion is to not spend time trying to reduce the library (or find an alternate library), but spend the time trying to eliminate the floating point math in your code.&lt;/P&gt;&lt;P&gt;Very often FP is not really needed, it's just easier to use than integer math...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 13:57:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Code-Size-issue-can-ansibfm-lib-be-pared-down-or-replaced/m-p/403452#M21355</guid>
      <dc:creator>giacomopetrini</dc:creator>
      <dc:date>2015-09-04T13:57:01Z</dc:date>
    </item>
  </channel>
</rss>

