<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- tidy -im -wrap 110 README.html -->

<html>
<head>
  <meta name="generator" content="HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org">
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
  <style type="text/css" media="all">
5px;border-collapse:collapse;}td.confluenceTd{border:1px solid
  4px;background:#f0f0f0;text-align:center;}.wiki-textarea,.wiki-textfield{width:100%;}.preformatted{border:1px
  dashed;font-size:11px;font-family:Courier;margin:10px;line-height:13px;}.preformattedHeader{background-color:#f0f0f0;border-bottom:1px
  dashed;padding:3px;text-align:center;}.preformattedContent{background-color:#f0f0f0;padding:3px;overflow:auto;}.panel{border:1px
  dashed;margin:14px;margin-top:0;}.panelHeader{background-color:#f0f0f0;border-bottom:1pxm
  dashed;padding:3px;text-align:center;}.panelContent{background-color:#f0f0f0;padding:12px;}.code{border:1px
  dashed;font-size:11px;font-family:Courier;margin:14px;line-height:13px;}.codeHeader{background-color:#f0f0f0;border-bottom:1px
  dashed;padding:3px;text-align:center;}.codeContent{text-align:left;background-color:#f0f0f0;padding:6px;overflow:auto;}.code-keyword{color:#000091;background-color:inherit;}.code-object{color:#910091;background-color:inherit;}.code-quote{color:#009100;background-color:inherit;}.code-comment{color:#808080;background-color:inherit;}.code-xml
  .code-keyword{color:inherit;font-weight:bold;}.code-tag{color:#000091;background-color:inherit;}.linkerror{background-color:#fcc;}ul#squaretab{margin-left:0;padding-left:0;white-space:nowrap;font:bold
  8px Verdana,sans-serif;}#squaretab
  li{display:inline;list-style-type:none;}#squaretab a{padding:2px
  6px;border:1px solid #999999;}#squaretab a:link,#squaretab
  a:visited{color:#fff;background-color:#999999;text-decoration:none;}#squaretab
  a:hover{color:#ffffff;background-color:#999999;border-color:#999999;text-decoration:none;}#squaretab
  li a#current{background:white;color:black;}.panel{border:1px
  dashed;margin:10px;margin-top:0;}.panelHeader{background-color:#f0f0f0;border-bottom:1px
  dashed;padding:3px;text-align:center;}.panelContent{background-color:#f0f0f0;padding:5px;}.minitab{padding:3px
  0 3px
  8px;margin-left:0;margin-top:1px;margin-bottom:0;border-bottom:1px
  solid #bbb;font:bold 9px
  Verdana,sans-serif;text-decoration:none;float:none;}
  </style>
  <style type="text/css">
span {
        font-family: Arial;
        color: #000000;
        background: #FFFFFF;
        font-size: 10pt;
  }
  pre {
        font-family: monospace;
        color: #000000;
        background: #FFFFFF;
        font-size: 10pt;
  }
  p.Heading0, li.Heading0, div.Heading0, span.Heading0 {
        font-size:14.0pt;
        font-family:Arial;
        font-weight:bold;
  }
  h1 {
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:Arial;
        font-weight: bold;
  }
  h2 {
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:Arial;
        font-weight: bold;
  }
    h3 {
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:Arial;
        font-weight: bold;
  }
  DL, DT, OL, UL, LI, DD {
    list-style-position: outside;
  }
  pre {
    font-family: monospace;
    font-size: 10pt;
  }
  table {
    font-size: 10pt;
  }
  </style>
  <style type="text/css">
ol.c10 {list-style-type: decimal;}
  dl.c9 {font-weight: normal; font-size: 10pt;}
  li.c8 {font-weight: bold;}
  span.c7 {font-style: italic;}
  span.c6 {font-weight: bold;}
  ul.c5 {font-weight: normal; font-size: 10pt; text-align: justify;}
  span.c4 {color: green; font-size: 120%}
  ol.c3 {font-weight: normal; font-size: 10pt; text-align: justify;}
  span.c2 {color: green}
  p.c1 {font-weight: normal; font-size: 10pt; text-align: justify;}
  </style>

  <title>MPLAB C Compiler for PIC32 v2.02(a), Release Notes</title>
</head>

<body>
  <script language="JavaScript" type="text/javascript">
function shoh(id) {

        if (document.getElementById) { // DOM3 = IE5, NS6
                if (document.getElementById(id).style.display == "none"){
                        document.getElementById(id).style.display = 'block';
                } else {
                        document.getElementById(id).style.display = 'none';
                }
        } else {
                if (document.layers) {
                        if (document.id.display == "none"){
                                document.id.display = 'block';
                        } else {
                                document.id.display = 'none';
                        }
                } else {
                        if (document.all.id.style.visibility == "none"){
                                document.all.id.style.display = 'block';
                        } else {
                                filter(("img"+id),'imgout');
                                document.all.id.style.display = 'none';
                        }
                }
        }
  }
  </script>

  <h1 class="formtitle">Release Notes for MPLAB<sup>&reg;</sup> C Compiler for PIC32 MCUs</h1>

  <h2>v2.02(a)<br>
  December 2011</h2>

  <h1 class="formtitle">Table of Contents</h1>

  <ol>
    <li><a href="#Overview">Overview</a></li>

    <li><a href="#GPL">GNU General Public License</a></li>

    <li><a href="#Devices">Devices Supported</a></li>

    <li><a href="#Install">Installation</a></li>

    <li><a href="#Document">Compiler Documentation</a></li>

    <li><strong><a href="#WhatsNew">What's New</a></strong></li>

    <li><strong><a href="#Migration">Migration Issues</a></strong></li>

    <li><a href="#DocUpdate">Documentation Updates</a></li>

    <li><a href="#Fixes">Fixed Issues</a></li>

    <li><a href="#Limits">Known Issues</a></li>

    <li><a href="#FeatureLimited">Editions and License Upgrades</a></li>

    <li><a href="#Support">Customer Support</a></li>
  </ol>
  <hr>
  <br>

  <ol class="c10">
    <li class="Heading0">
      <h1><a name="Overview" id="Overview">Overview</a></h1>

      <p class="c1">The 32-Bit language tools consist of a compiler (pic32-gcc), an assembler (pic32-as), a
      linker (pic32-ld), and an archiver/ librarian (pic32-ar). Additional tools distributed with this
      release include a binary to Intel[intl] Hex converter (pic32-bin2hex) and miscellaneous binary
      utilities (pic32-strip, pic32-strings, pic32-readelf, etc). In addition, the compiler utilizes a
      license manager (pic32-lm) as part of the time-limited MPLAB C Compiler for PIC32 MCUs <a href=
      "#FeatureLimited">Standard Evaluation edition</a>.</p>

      <p class="c1">As described in the user's guides, all of the language tools are sensitive to case on the
      command line, including the case of file names. In particular, the C compiler shell (pic32-gcc)
      requires that C source files be named on the command-line with a lower-case .c extension. If an
      upper-case .C filename extension is used, the compiler assumes that the file is a C++ file, which is
      not supported. Similarly, the compiler shell passes a file with an upper-case .S filename extension
      through the C preprocessor before passing it to the assembler, but it passes a file with a lower-case
      .s extension directly to the assembler.</p>
    </li>

    <li class="Heading0">
      <h1><a name="GPL" id="GPL">GNU General Public License</a></h1>

      <p class="c1">The <i>MPLAB<sup>&reg;</sup> C Compiler for PIC32 MCUs</i> tools are written and
      distributed under the GNU General Public License (GPL) which means that its source code is freely
      distributed and available to the public.</p>

      <p class="c1">The source for the tools under the GNU GPL may be downloaded separately from the
      Microchip WWW web page. You may read the GNU GPL in the file named COPYING3.GPL located the docs
      subdirectory of your install directory. A general discussion of principles underlying the GPL may be
      found at <a href="http://www.gnu.org/copyleft" target="external">www.gnu.org/copyleft</a>.</p>

      <p class="c1">Support code provided for the header files, linker scripts, and runtime libraries are
      proprietary code and not covered under the GPL. See the full <i>MPLAB C Compiler for PIC32 MCUs</i>
      License Agreement for details.</p>
    </li>

    <li class="Heading0">
      <h1><a name="Devices" id="Devices">Devices Supported</a></h1>

      <p class="c1">The following <a href="http://www.microchip.com/pic32" target="external">PIC32MX</a>
      devices are supported:</p>

      <table align="center" border="1" cellpadding="3" cellspacing="0" summary="Supported Devices">
        <tbody>
          <tr>
            <th>Part Number</th>

            <th>Part Number</th>

            <th>Part Number</th>
          </tr>

          <tr>
            <td align="center" valign="top"><tt>PIC32MX110F016B</tt><br>
            <tt>PIC32MX110F016C</tt><br>
            <tt>PIC32MX110F016D</tt><br>
            <tt>PIC32MX120F032B</tt><br>
            <tt>PIC32MX120F032C</tt><br>
            <tt>PIC32MX120F032D</tt><br>
            <tt>PIC32MX130F064B</tt><br>
            <tt>PIC32MX130F064C</tt><br>
            <tt>PIC32MX130F064D</tt><br>
            <tt>PIC32MX150F128B</tt><br>
            <tt>PIC32MX150F128C</tt><br>
            <tt>PIC32MX150F128D</tt><br>
            <tt>PIC32MX210F016B</tt><br>
            <tt>PIC32MX210F016C</tt><br>
            <tt>PIC32MX210F016D</tt><br>
            <tt>PIC32MX220F032B</tt><br>
            <tt>PIC32MX220F032C</tt><br>
            <tt>PIC32MX220F032D</tt><br>
            <tt>PIC32MX230F064B</tt><br>
            <tt>PIC32MX230F064C</tt><br>
            <tt>PIC32MX230F064D</tt><br>
            <tt>PIC32MX250F128B</tt><br>
            <tt>PIC32MX250F128C</tt><br>
            <tt>PIC32MX250F128D</tt></td>

            <td align="center" valign="top"><tt>PIC32MX320F032H</tt><br>
            <tt>PIC32MX320F064H</tt><br>
            <tt>PIC32MX320F128H</tt><br>
            <tt>PIC32MX320F128L</tt><br>
            <tt>PIC32MX340F128H</tt><br>
            <tt>PIC32MX340F128L</tt><br>
            <tt>PIC32MX340F256H</tt><br>
            <tt>PIC32MX340F512H</tt><br>
            <tt>PIC32MX360F256L</tt><br>
            <tt>PIC32MX360F512L</tt><br>
            <tt>PIC32MX420F032H</tt><br>
            <tt>PIC32MX440F128H</tt><br>
            <tt>PIC32MX440F128L</tt><br>
            <tt>PIC32MX440F256H</tt><br>
            <tt>PIC32MX440F512H</tt><br>
            <tt>PIC32MX460F256L</tt><br>
            <tt>PIC32MX460F512L</tt></td>

            <td align="center" valign="top"><tt>PIC32MX534F064H</tt><br>
            <tt>PIC32MX534F064L</tt><br>
            <tt>PIC32MX564F064H</tt><br>
            <tt>PIC32MX564F064L</tt><br>
            <tt>PIC32MX564F128H</tt><br>
            <tt>PIC32MX564F128L</tt><br>
            <tt>PIC32MX575F256H</tt><br>
            <tt>PIC32MX575F256L</tt><br>
            <tt>PIC32MX575F512H</tt><br>
            <tt>PIC32MX575F512L</tt><br>
            <tt>PIC32MX664F064H</tt><br>
            <tt>PIC32MX664F064L</tt><br>
            <tt>PIC32MX664F128H</tt><br>
            <tt>PIC32MX664F128L</tt><br>
            <tt>PIC32MX675F256H</tt><br>
            <tt>PIC32MX675F256L</tt><br>
            <tt>PIC32MX675F512H</tt><br>
            <tt>PIC32MX675F512L</tt><br>
            <tt>PIC32MX695F512H</tt><br>
            <tt>PIC32MX695F512L</tt><br>
            <tt>PIC32MX764F128H</tt><br>
            <tt>PIC32MX764F128L</tt><br>
            <tt>PIC32MX775F256H</tt><br>
            <tt>PIC32MX775F256L</tt><br>
            <tt>PIC32MX775F512H</tt><br>
            <tt>PIC32MX775F512L</tt><br>
            <tt>PIC32MX795F512H</tt><br>
            <tt>PIC32MX795F512L</tt></td>
          </tr>
        </tbody>
      </table>

      <p class="c1">The PIC32MXGENERIC device is, as its name implies, a non-specific target that can be used
      to represent a generic core device.</p><!--
      <p class="c1">(<a name="devicefootnote1" id="devicefootnote1">1</a>) The peripheral library is not yet
      fully supported for this device.</p> -->
    </li>

    <li class="Heading0">
      <h1><a name="Install" id="Install">Installation on Windows</a></h1>

      <p class="c1">If using <a href="http://www.microchip.com/mplabide" target="external">MPLAB IDE</a>, be
      sure to install MPLAB IDE v8.10 (or later) or <a href=
      "http://ww1.microchip.com/downloads/mplab/X_Beta/index.htmlhttp://ww1.microchip.com/downloads/mplab/X_Beta/index.html"
      target="external">MPLAB X beta 7</a> (or later) before installing these tools.</p>

      <p class="c1">To install the <i>MPLAB C Compiler for PIC32 MCUs</i> tools, perform the following
      steps:</p>

      <ol class="c3">
        <li>Locate the setup program on the 'MPLAB C Compiler for PIC32 MCUs' CD ROM.</li>

        <li>Run the setup program.</li>

        <li>Follow the directions on the screen. To install the standard evaluation edition, leave the
        license-key field blank when prompted. To install the full standard edition, enter your full license
        key.</li>

        <li>If the installation program indicates that it is necessary, reboot your computer to complete the
        installation.</li>

        <li>When the installation is complete, verify that the executable directory has been correctly added
        to your PATH (i.e., if you chose to install the tools in the default directory, c:\Program
        Files\Microchip\mplabc32\&lt;<em>version</em>&gt;, then ensure that c:\Program
        Files\Microchip\mplabc32\&lt;<em>version</em>&gt;\bin has been added to your PATH.

          <p>From a Windows command prompt (cmd.exe), type: c:\&gt;PATH</p>
        </li>
      </ol>

      <p class="c1"><strong>To upgrade to a full standard-edition license</strong> from a lite or standard
      -evaluation edition license, follow the steps described in <a href="#FeatureLimited">this
      section</a>.</p>
    </li>

    <li class="Heading0">
      <h1><a name="Document" id="Document">Compiler Documentation</a></h1>

      <p class="c1">The following documents pertain to the MPLAB C Compiler for PIC32 MCUs. They may be
      installed in the compiler's doc subdirectory, but you should check <a href=
      "http://www.microchip.com/c32" target="external">Microchip's website</a> for the latest revisions.</p>

      <ul class="c5">
        <li><a href="http://bit.ly/MPLABC32Docs" target="doc"><cite>MPLAB<sup>&reg;</sup> C Compiler for
        PIC32 MCUs User's Guide</cite> (DS51686)</a></li>

        <li><a href="http://bit.ly/MPLABC32LibsDoc" target="doc"><cite>MPLAB<sup>&reg;</sup> 32-Bit Language
        Tools Libraries</cite> (DS51685)</a></li>

        <li>Microchip PIC32MX Peripheral Library - Compiled Help (CHM)<sup>1</sup></li>

        <li><a href="http://bit.ly/ASM32Doc" target="doc">MPLAB<sup>&reg;</sup> MPLAB Assembler, Linker and
        Utilities for PIC32 MCUs User&rsquo;s Guide (DS51833)</a></li>
      </ul>

      <p class="c1"><sup>1</sup> Other CHM files may be available from the main CHM file by clicking a link
      (such as for Interrupts). When you do this, a Security Warning dialog may display. Click on Open to
      view the CHM file.</p>

      <p class="c1">Additional documentation on the GNU Assembler and Linker is available on the <a href=
      "http://sourceware.org/binutils/docs-2.20" target="external">GNU Binutils v2.20 website</a>.</p>
    </li>

    <li class="Heading0">
      <h1><a name="WhatsNew" id="WhatsNew"></a>What's New</h1><a name="new202target" id="new202target"></a>

      <h2><a href="#new202target" onclick="shoh('new202');">New Features in v2.02</a></h2>

      <div style="display: block;" id="new202">
        <ul class="c5">
          <li>
            <p><strong>New device support</strong> -- This release introduces support for several new
            PIC32MX1 and MX2 devices.</p>
          </li>
        </ul>
      </div>

      <h2><a href="#new201target" onclick="shoh('new201');">New Features in v2.01</a></h2>

      <div style="display: block;" id="new201">
        <ul class="c5">
          <li>
            <p><strong>New device support</strong> -- This release introduces support for several new
            PIC32MX1 and MX2 devices.</p>
          </li>

          <li>
            <p><strong>unsupported(message) attribute</strong> -- Use the unsupported(message) attribute to
            emit a message whenever an unsupported function or variable is used.</p>

            <p><tt>__attribute__((unsupported("this feature is not supported on this device"))) void
            function(void);</tt></p>
          </li>
        </ul>
      </div>

      <h2><a href="#new200target" onclick="shoh('new200');">New Features in v2.00</a></h2>

      <div style="display: block;" id="new200">
        <ul class="c5">
          <li>
            <p><strong>Upgrade to GCC 4.5.1 technology</strong> -- The MPLAB C compiler is now based on the
            GNU Compiler Collection (GCC) v4.5.1. This new base technology introduces a new optimization
            framework that allows for significantly improved generated code efficiency, resulting in both an
            improved code-size footprint and a faster execution speed.</p>
          </li>

          <li>
            <p><strong>Upgrade to Binutils 2.20</strong> -- The MPLAB ASM32 assembler, LINK32 linker, and
            binary utilities are now based on GNU Binutils 2.20.</p>
          </li>

          <li>
            <p><strong><tt>address</tt>(<em>addr</em>) C Attribute for functions and variables</strong> --
            The <tt>address</tt> attribute specifies an absolute virtual address for the function or
            variable. Be sure to specify the address attribute using an appropriate virtual address. For data
            variables, the address is typically in the range [0xA0000000,0xA00FFFFC]. For program functions,
            the address is typically in the range [0x9D000000,0x9D0FFFFC]. A linker relocation error may
            indicate an out-of-range address.</p>

            <p>This attribute can be used in conjunction with a <tt>section</tt> attribute. This can be used
            to start a group of variables at a specific address:<br>
            <tt>int foo __attribute__((section("mysection"),address(0xA0001000)));<br>
            int bar __attribute__((section("mysection")));<br>
            int baz __attribute__((section("mysection")));<br>
            __attribute__((address(0x9D00800))) void funky (char* parm)</tt></p>

            <p>Note that the "small" data and bss (.sdata, .sbss, etc.) sections used for GP-relative
            addressing are mapped in the built-in linker script. This is because "small" data variables must
            be grouped together so that they are within range of the more efficient GP-relative addressing
            mode. <em>To avoid conflict with these linker-script mapped sections, choose high addresses for
            your absolute-address variables.</em></p>

            <p><a href="#addressforvariables" onclick="shoh('new200_ADDRVAR_READMORE');">Read More...</a></p>

            <div style="display: none;" id="new200_ADDRVAR_READMORE">
              <ul>
                <li>
                  <p><strong>Notes</strong></p>

                  <ul>
                    <li>
                      <p><tt><strong>GP-Relative addressing</strong></tt> -- The compiler will not use
                      gp-relative addressing for variable attributed with an absolute address. This means
                      that the compiler may generate slightly less efficient code to access these
                      variables.</p>
                    </li>

                    <li>
                      <p><tt><strong>Error checking</strong></tt> -- There is no error checking on the
                      address. The section will be located at the specified address regardless of the
                      memory-region ranges specified in the linker script or the actual ranges on the target
                      device. The application code is responsible for ensuring that the address is valid for
                      the target device.</p>
                    </li>

                    <li>
                      <p><tt><strong>Common</strong></tt> -- Variables with the address attribute will not be
                      located in the standard common section.</p>
                    </li>
                  </ul>
                </li>
              </ul>
            </div>
          </li>

          <li>
            <p><strong><tt>space</tt>(<em>space</em>) C Attribute for Variables</strong> -- Normally, the
            compiler allocates variables in general data space. Use the space attribute to direct the
            compiler to allocate a variable in a specific memory space. In this release, the compiler accepts
            two space attributes: <tt>prog</tt> and <tt>data</tt>. The <tt>prog</tt> space tells the
            toolchain to allocate the variable to the program memory space (the memory region named
            kseg0_program_memory in the linker script). The <tt>data</tt> space tells the toolchain to
            allocate the variable to the data memory space (region kseg1_data_mem).</p>

            <p>Note that when combining the space attribute with the address attribute, the section will be
            placed at the address specified in the address attribute, but the generated code will use the
            specified space attribute. The application code must ensure that the combination makes sense for
            the application.</p><tt>unsigned int foo __attribute__((space(prog))) = 1;<br>
            unsigned int vb __attribute__((space(data))) = 2;<br>
            unsigned int baz __attribute__((space(data)));<br></tt>
          </li>

          <li>
            <p><strong><tt>ramfunc</tt> C Attribute for Functions</strong> -- This new attribute places a
            function into data memory. Previous releases relied on a magic section name, .ramfunc, and
            data-memory mapping in the linker script. The new ramfunc attribute places the function at the
            highest appropriately aligned address. Note that due to ramfunc alignment and placement
            requirements, the address attribute should not be used with the ramfunc attribute. The presence
            of a ramfunc section causes the linker to emit the symbols necessary for the crt0.S startup code
            to initialize the bus matrix appropriately. Use this new attribute along with the far/longcall
            attribute.</p>

            <p><tt>__attribute__((ramfunc,section(".ramfunc"),far,unique_section)) unsigned int myramfunct
            (void)<br>
            {<br>
            &nbsp;&nbsp;// code<br>
            }<br></tt></p>

            <p>A macro in the sys/attribs.h header file makes the attributes simple to use:<br>
            <tt>#include &lt;sys/attribs.h&gt;<br>
            __longramfunc__ unsigned int myramfunct (void)<br>
            {<br>
            &nbsp;&nbsp;// code<br>
            }<br></tt></p>
          </li>

          <li>
            <p><strong><tt>persistent</tt> C Attribute for Variables</strong> -- The new <tt>persistent</tt>
            attribute specifies that the variable should not be initialized or cleared at startup. Use a
            variable with the <tt>persistent</tt> attribute to store state information that will remain valid
            after a device reset. The persistent attribute causes the compiler to place the variable in
            special .bss-like section that does not get cleared by the default startup code. Because the
            section is always in data space, this attribute is not compatible with the space() attribute.</p>

            <p><tt>int last_mode __attribute__((persistent));</tt></p>
          </li>

          <li>
            <p><strong><tt>-mtext=</tt>"<em>scn-name</em>" Compiler Command-line Option</strong> --
            Specifying <tt>-mtext=</tt><em>scn-name</em> will cause text (program code) to be placed in a
            section named <em>scn-name</em> rather than the default .text section. No white spaces should
            appear around the =. This command can be useful when developing a bootloader.</p>

            <p><tt>pic32-gcc bootloader.c -mtext="MySectionName,address(0x9D001000)"
            -mprocessor=32MX795F512L</tt></p>
          </li>

          <li>
            <p><strong>New <tt>.section</tt> Assembly-code Directive</strong> -- The .section directive now
            accepts a list of attributes rather than a set of quoted flags. Quoted section flags are now
            deprecated.</p>

            <p><a href="#linkerallocation" onclick="shoh('new200_ASMSECTIONDIRECTIVE_READMORE');">Read
            More...</a></p>

            <div style="display: none;" id="new200_ASMSECTIONDIRECTIVE_READMORE">
              <p>Syntax: <strong><tt>.section</tt> <em>name</em> <tt>[</tt><em>,
              attr1</em><tt>[</tt><em>,...,attr</em><sub>n</sub><tt>]]</tt></strong><br></p>

              <p>Currently supported section-type attributes:</p>

              <ul>
                <li>code - Executable code or constant data in program memory</li>

                <li>data - Initialized storage in data memory</li>

                <li>bss - Uninitialized storage in data memory</li>

                <li>persist - Persistent storage in data memory</li>

                <li>ramfunc - Executable code in data memory</li>
              </ul>

              <p>Currently supported modifier attributes:</p>

              <ul>
                <li>address(<em>a</em>) - Locate at absolute address <em>a</em></li>

                <li>info - Do not allocate or load</li>
              </ul>
            </div>
          </li>

          <li>
            <p><strong>Linker Allocation Algorithm</strong> -- In order to effectively make use of memory
            with the presence of absolute sections, the linker now uses a best-fit allocator. Note that many
            standard sections, previously mapped in the default built-in linker script, are now handled by
            the best-fit allocator. Please see the <a href="#Migration">Migration Issues</a> topic below for
            important information regarding application-specific linker scripts and startup code.</p>

            <p>Linker allocation steps</p>

            <ol>
              <li>Mapping input sections to output sections</li>

              <li>Assigning output sections to regions</li>

              <li>Allocating unmapped sections</li>
            </ol>

            <p><a href="#linkerallocation" onclick="shoh('new200_LINKERALLOCATON_READMORE');">Read
            More...</a></p>

            <div style="display: none;" id="new200_LINKERALLOCATON_READMORE">
              <p>Steps 1 and 2 are performed by the sequential memory allocator. Input sections which appear
              in the linker script are assigned to specific memory regions in the target devices. Addresses
              within a memory region are allocated sequentially, beginning with the lowest address and
              growing upwards.</p>

              <p>Step 3 is performed by a best-fit memory allocator. Input sections that do not appear in the
              linker script are assigned to memory regions according to their attributes. The best-fit
              allocator makes efficient use of any remaining memory, including gaps between output sections
              that may have been left by the sequential allocator.</p>

              <p>Ramfunc attributed sections are allocated by the best-fit allocator in step 3. Sections
              designated with the ramfunc attribute should not appear in the linker script as there are
              special location and alignment requirements for executable code in RAM.</p>

              <p><strong>Absolute sections</strong> - When specifying an absolute section (using either the C
              or assembly address attribute), the application code must take care not to use the same memory
              as a section mapped in the linker script. This would result in a linker error.</p>

              <p>To help avoid this situation, the default linker script no longer maps most standard
              sections such as the .text, .data, .bss, or .ramfunc section. By not mapping these sections in
              the linker script, we allow these sections to be allocated using the new best-fit allocator
              rather than the sequential allocator.</p>

              <p>The exception is the "small" data sections used for gp-relative addressing. Because these
              sections must be grouped together, they are mapped in the linker script. A future toolchain
              release may allow the "small" data sections to be allocated by the best-fit allocator.</p>
            </div>
          </li>

          <li>
            <p><strong>Data Initialization using a Template and Updated Startup Code</strong> -- The linker
            now generates a data-initialization template (.dinit section) that the startup code uses to
            initialize variables in data sections. In previous releases, initialized data sections were
            sequentially allocated so a simple block copy was sufficient. However, since this release
            supports variables at absolute addresses, a new data-initialization template is required to
            initialize non-contiguous data sections.</p>

            <p>The linker places the initialization template in the .dinit section. The crt0.S startup code
            has been updated to initialize data using the new template rather than a block copy. <strong>The
            old startup code will not initialize data properly using this version of the language
            tools.</strong></p>
          </li>

          <li>
            <p><strong>Stack and heap allocation</strong> -- The stack and heap are now dynamically
            generated. Previous releases used output sections specified in the linker script to allocate the
            stack and heap. The linker now finds the largest available gap in memory and uses that gap for
            the heap and stack.</p>

            <p>As in earlier versions, the <tt>_min_stack_size</tt> and <tt>_min_heap_size</tt> linker
            symbols define the minimum size of the stack and the size of the heap. The size specified for the
            heap is the exact size to be allocated while the size allocated for the stack is the minimum size
            allocated.</p>

            <p>The linker-generated memory usage report now displays these dynamically allocated stack and
            heap areas. Because the stack expands in size to use the entire gap, the total is not added in to
            the total data memory usage. Only the minimum stack size specified by the application is added to
            the total.</p><tt>pic32-gcc sourcecode.c
            -Wl,--defsym,_min_stack_size=2048,--defsym,_min_heap_size=1024</tt>

            <p><tt>pic32-gcc object1.o object2.o -Wl,--defsym,_min_heap_size=1024,--report-mem
            -omyproject.elf</tt></p>
          </li>
        </ul>
      </div>

      <h2><a href="#new112target" onclick="shoh('new112');">New Features in v1.12</a></h2>

      <div style="display: none;" id="new112">
        <ul class="c5">
          <li>
            <p><strong>Default short double type</strong> -- The compiler now uses a 32-bit double type by
            default. This change makes the PIC32 compiler more consistent with the compiler for PIC24 MCUs
            and dsPIC DSCs. You can restore the 64-bit double type using the <tt>-fno-short-double</tt>
            compiler option.</p>
          </li>

          <li>
            <p><strong>Standard C Library</strong> -- This release introduces a new version of Lib C that
            features a generally smaller footprint than previous the lib C. Microchip is in the process of
            standardizing on one lib C implementation across all first-party compilers. This standardization
            will smooth your migration path both up and down the Microchip MCU product line, allowing you to
            more easily move between MCU product lines as your application requirements evolve. The compiler
            uses the new lib C by default. See the <a href="#Migration">Migration Issues</a> topic for more
            information.</p>
          </li>

          <li>
            <p><strong>Smart IO v2</strong> -- Previous compiler releases detected floating-point and
            non-floating point conversion specifiers in calls to formatted IO functions. The toolchain then
            linked either a full function or an integer-only function as appropriate for your
            application.</p>

            <p>Version 2 of the smart-IO feature now differentiates between additional types of conversion
            specifiers. This allows the toolchain to provide a more finely tuned implementation of the
            formatted IO function that closely matches your application's requirements thereby resulting in
            in additional code-size improvements.</p>
          </li>

          <li>
            <p><strong>stdout to UART 1</strong> -- The C32 stdio library also now support C30-style UART
            output. By default stdin/out goes to UART2 for use on the Explorer 16 board or other boards that
            may use UART2. The application may now use <tt>__C32_UART = 1;</tt> to have stdin/out redirected
            to use UART1 instead. Currently, the mechanism supports only UART1 and UART2.</p>

            <p>For stdout, the application may provide an application-specific implementation of write(),
            _mon_write(), or _mon_putc(). Likewise for stdin, the application may provide an application-
            specfic implementation of read() or _mon_getc(). The default source files for these functions are
            provided in pic32-libs\libc\stubs. You may wish to extend or customize the code by adding a copy
            to your project.</p>
          </li>
        </ul>
      </div>

      <h2><a href="#new111btarget" onclick="shoh('new111b');">New Features in v1.11(b)</a></h2>

      <div style="display: none;" id="new111b">
        <ul class="c5">
          <li>
            <p><strong>Part-Support Update</strong> -- The v1.11(b) release is a part-support update only.
            The part-support files (header files, linker scripts, processor libraries) for several devices
            have been updated. In addition, this release contains updated peripheral libraries. See the
            peripheral-library documentation for further details.</p>
          </li>
        </ul>
      </div>

      <h2><a href="#new111target" onclick="shoh('new111');">New Features in v1.11(a)</a></h2>

      <div style="display: none;" id="new111">
        <ul class="c5">
          <li>
            <p><strong>Builtin functions for CP0 register access</strong> -- This release introduces a few
            new compiler builtin functions that simplify access to the PIC32 coprocessor 0 (CP0) registers.
            Combine these new builtin functions with macros defined in the cp0defs.h and p32xxxx.h header
            files for easy access to the various CP0 registers.</p>

            <p>In earlier compiler releases, the p32xxxx.h header file defined _mfc0/_mtc0 preprocessor
            macros that utilized extended inline assembly to generate the mfco and mtc0 instructions. These
            _mfc0 and _mtc0 macros are updated to utilize the new builtin funtions instead of inline
            assembly.</p>

            <p>NOTE: To access these CP0 registers, the compiler must generate assembly instructions (mfc0
            &amp; mtc0) that are supported in only the mips32 ISA mode. Therefore, when calling one of these
            functions from a mips16 function, the compiler must generate extra code to switch from mips16
            mode back to the base mips32 mode before executing the instruction and then back to mips16 mode
            after executing the instruction.</p>

            <p><a href="#new111_CP0_builtinfunctions" onclick="shoh('new111_CP0_builtinfunctions');">Read
            More...</a></p>

            <div style="display: none;" id="new111_CP0_builtinfunctions">
              <ul>
                <li>
                  <dl class="c9">
                    <dt><tt><strong>unsigned int __builtin_mfc0(reg,sel)</strong></tt></dt>

                    <dd>
                      Returns the value from the CP0 register <tt>reg,sel</tt>. (Move From Coprocessor 0.)
                      Both <tt>reg</tt> and <tt>sel</tt> must be immediate values.

                      <p>Example 1:<br>
                      <tt>val = <strong>__builtin_mfc0 (12,0)</strong>;</tt></p>

                      <p>Example 2:<br>
                      <tt>#include &lt;cp0defs.h&gt;<br>
                      void funct (void) {<br>
                      &nbsp;&nbsp; unsigned int val;<br>
                      &nbsp;&nbsp; val = <strong>__builtin_mfc0
                      (_CP0_STATUS,_CP0_STATUS_SELECT)</strong>;<br>
                      }</tt></p>
                    </dd>
                  </dl>
                </li>

                <li>
                  <dl class="c9">
                    <dt><tt><strong>void __builtin_mtc0(reg,sel,value)</strong></tt></dt>

                    <dd>
                      Move <tt>value</tt> into the CP0 register<tt>reg,sel</tt>. (Move To Coprocessor 0.)
                      Both <tt>reg</tt> and <tt>sel</tt> must be immediate values.

                      <p>Example 1:<br>
                      <tt><strong>__builtin_mtc0 (12,0,0x00100000u)</strong>;</tt></p>

                      <p>Example 2:<br>
                      <tt>#include &lt;cp0defs.h&gt;<br>
                      void funct (void) {<br>
                      &nbsp;&nbsp; unsigned int val;<br>
                      &nbsp;&nbsp; /* code here */<br>
                      &nbsp;&nbsp; <strong>__builtin_mtc0 (_CP0_STATUS,_CP0_STATUS_SELECT,val)</strong>;<br>
                      }</tt></p>
                    </dd>
                  </dl>
                </li>

                <li>
                  <dl class="c9">
                    <dt><tt><strong>unsigned int __builtin_mxc0(reg,sel,value)</strong></tt></dt>

                    <dd>
                      Exchange/Swap <tt>value</tt> and the CP0 register <tt>reg,sel</tt>. Move <tt>value</tt>
                      to the CP0 register <tt>reg,sel</tt> and return the previous value. Both <tt>reg</tt>
                      and <tt>sel</tt> must be immediate values.

                      <p>Example 1:<br>
                      <tt>oldval = <strong>__builtin_mxc0 (12,0,0x00100000u)</strong>;</tt></p>

                      <p>Example 2:<br>
                      <tt>#include &lt;cp0defs.h&gt;<br>
                      void funct (void) {<br>
                      &nbsp;&nbsp; unsigned int newval, oldval;<br>
                      &nbsp;&nbsp; /* code here */<br>
                      &nbsp;&nbsp; oldval = <strong>__builtin_mxc0
                      (_CP0_STATUS,_CP0_STATUS_SELECT,newval)</strong>;<br>
                      }</tt></p>
                    </dd>
                  </dl>
                </li>

                <li>
                  <dl class="c9">
                    <dt><tt><strong>unsigned int __builtin_bcc0(reg,sel,clr)</strong></tt></dt>

                    <dd>
                      Bit clear non-zero bits from <tt>clr</tt> in the CP0 register <tt>reg,sel</tt> and
                      return the previous value of the CP0 register. Both <tt>reg</tt> and <tt>sel</tt> must
                      be immediate values.

                      <p>Example:<br>
                      <tt>#include &lt;cp0defs.h&gt;<br>
                      void funct (void) {<br>
                      &nbsp;&nbsp; unsigned int clear, oldval;<br>
                      &nbsp;&nbsp; /* code here */<br>
                      &nbsp;&nbsp; oldval = <strong>__builtin_bcc0
                      (_CP0_STATUS,_CP0_STATUS_SELECT,clear)</strong>;<br>
                      }</tt></p>

                      <p>This is equivalent to<br>
                      <tt>&nbsp;&nbsp; oldval = __builtin_mfc0 (_CP0_STATUS,_CP0_STATUS_SELECT);<br>
                      &nbsp;&nbsp; __builtin_mtc0 (_CP0_STATUS,_CP0_STATUS_SELECT, oldval &amp;
                      ~(clear));</tt><br>
                      but the bcc0 builtin may generate more efficient code, especially when called from
                      mips16 mode.</p>
                    </dd>
                  </dl>
                </li>

                <li>
                  <dl class="c9">
                    <dt><tt><strong>unsigned int __builtin_bsc0(reg,sel,set)</strong></tt></dt>

                    <dd>
                      Bit set non-zero bits from <tt>set</tt> in the CP0 register <tt>reg,sel</tt> and return
                      the previous value of the CP0 register. Both <tt>reg</tt> and <tt>sel</tt> must be
                      immediate values.

                      <p>Example:<br>
                      <tt>#include &lt;cp0defs.h&gt;<br>
                      void funct (void) {<br>
                      &nbsp;&nbsp; unsigned int set, oldval;<br>
                      &nbsp;&nbsp; /* code here */<br>
                      &nbsp;&nbsp; oldval = <strong>__builtin_bsc0
                      (_CP0_STATUS,_CP0_STATUS_SELECT,set)</strong>;<br>
                      }</tt></p>

                      <p>This is equivalent to<br>
                      <tt>&nbsp;&nbsp; oldval = __builtin_mfc0 (_CP0_STATUS,_CP0_STATUS_SELECT);<br>
                      &nbsp;&nbsp; __builtin_mtc0 (_CP0_STATUS,_CP0_STATUS_SELECT, oldval | (set));</tt><br>
                      but the bsc0 builtin may generate more efficient code, especially when called from
                      mips16 mode.</p>
                    </dd>
                  </dl>
                </li>

                <li>
                  <dl class="c9">
                    <dt><tt><strong>unsigned int __builtin_bcsc0(reg,sel,clr,set)</strong></tt></dt>

                    <dd>
                      Bit clear non-zero bits from <tt>clr</tt> and bit set non-zero bits from <tt>set</tt>
                      in the CP0 register <tt>reg,sel</tt>. Return the previous value of the CP0 register.
                      Both <tt>reg</tt> and <tt>sel</tt> must be immediate values.

                      <p>Example:<br>
                      <tt>#include &lt;cp0defs.h&gt;<br>
                      void funct (void) {<br>
                      &nbsp;&nbsp; unsigned int clr, set, oldval;<br>
                      &nbsp;&nbsp; /* code here */<br>
                      &nbsp;&nbsp; oldval = <strong>__builtin_bcsc0
                      (_CP0_STATUS,_CP0_STATUS_SELECT,clr,set)</strong>;<br>
                      }</tt></p>

                      <p>This is equivalent to<br>
                      <tt>&nbsp;&nbsp; oldval = __builtin_mfc0 (_CP0_STATUS,_CP0_STATUS_SELECT);<br>
                      &nbsp;&nbsp; __builtin_mtc0 (_CP0_STATUS,_CP0_STATUS_SELECT, (oldval &amp; ~(clr)) |
                      (set));</tt><br>
                      but the bcsc0 builtin may generate more efficient code, especially when called from
                      mips16 mode.</p>
                    </dd>
                  </dl>
                </li>
              </ul>
            </div>
          </li>

          <li>
            <p><strong>Upgrade to binutils v2.19</strong> -- The MPLAB Assembler, Linker, and Utilities for
            PIC32 MCUs are now based on GNU Binutils v2.19. This platform upgrade includes a few new features
            and bug fixes.</p>

            <ul>
              <li>
                <strong>Assembler</strong>

                <ul>
                  <li>Macros with a variable number of arguments are now supported. See the <a href=
                  "http://sourceware.org/binutils/docs-2.20/as/Macro.html#Macro">Binutils documentation</a>
                  for more information.</li>

                  <li>A redefinition of a macro now results in an error.</li>

                  <li>The assembler sources are now released under version 3 of the GNU General Public
                  License.</li>
                </ul>
              </li>

              <li>
                <strong>Linker</strong>

                <ul>
                  <li>Added a new linker command-line switch, <tt>--sort-section name|alignment</tt>, to sort
                  sections by section name or maximum alignment.</li>

                  <li>Added <tt>SORT_BY_NAME</tt> and <tt>SORT_BY_ALIGNMENT</tt> to the linker script
                  language to permit sorting sections by section name or section maximum alignment.</li>

                  <li>New switch: <tt>--print-gc-sections</tt> to list any sections removed by garabge
                  collection.</li>

                  <li>Addded a new command-line option '<tt>--default-script=FILE</tt>' or '<tt>-dT
                  FILE</tt>' which specifies a replacement for the built-in, default linker script.</li>

                  <li>Linker scripts support a new <tt>INSERT</tt> command that makes it easier to augment
                  the default script.</li>

                  <li>Linker-script input-section filespecs may now specify a file within an archive by
                  writing "archive:file".</li>

                  <li>The <tt>--sort-common</tt> switch now has an optional argument which specifies the
                  direction of sorting.</li>

                  <li>The Linker sources are now released under version 3 of the GNU General Public
                  License.</li>
                </ul>
              </li>

              <li>
                <strong>Binary Utilities</strong>

                <ul>
                  <li>pic32-readelf can now display address ranges from .debug_range sections. This happens
                  automatically when a DW_AT_range attribute is encountered. The command line switch
                  <tt>--debug-dump=Ranges</tt> (or <tt>-wR</tt>) can also be used to display the contents of
                  the .debug_range section.</li>

                  <li>pic32-objcopy recognizes two new options, <tt>--strip-unneeded-symbol</tt> and
                  <tt>--strip-unneeded-symbols</tt>, namely for use together with the wildcard matching the
                  original <tt>--strip-symbol</tt>/<tt>--strip-symbols</tt> provided, but retaining any
                  symbols matching but needed by relocations.</li>

                  <li>Added <tt>-g</tt>/<tt>--section-groups</tt> to pic32-readelf to display section
                  groups.</li>

                  <li>Added <tt>--globalize-symbol &lt;name&gt;</tt> and <tt>--globalize-symbols
                  &lt;filename&gt;</tt> switches to pic32-objcopy to convert local symbols into global
                  symbols.</li>

                  <li>Added <tt>-t</tt>/<tt>--section-details</tt> to pic32-readelf to display section
                  details</li>

                  <li>Added <tt>-W</tt>/<tt>--dwarf</tt> to pic32-objdump to display the contents of the
                  DWARF debug sections.</li>

                  <li>Added <tt>-wL</tt> switch to dump decoded contents of .debug_line.</li>

                  <li>Added <tt>-F</tt> switch to pic32-objdump to include file offsets in the
                  disassembly.</li>

                  <li>Added <tt>-c</tt> switch to pic32-readelf to allow string dumps of archive symbol
                  index.</li>

                  <li>Added <tt>-p</tt> switch to pic32-readelf to allow string dumps of sections.</li>

                  <li>The Binutils sources are now released under version 3 of the GNU General Public
                  License.</li>
                </ul>
              </li>
            </ul>
          </li>

          <li>
            <p><strong>RIPL Interrupt Priority Level specifier</strong> -- The v1.10 release introduced new
            Interrupt Priority Level specifiers. It also introduced a new default IPL behavior when the IPL
            specifier was omitted from the interrupt attribute. (See <a href="#ISR_Context_improvements"
            onclick="shoh('new106'); shoh('new106_IPL_READMORE');">New Features in v1.10</a> below for more
            information.)</p>

            <p>The v1.11 release introduces an explicit specifier (RIPL) for this default behavior. You may
            use this RIPL specifier in either the interrupt pragma or the interrupt attribute to tell the
            compiler to use the runtime Requested Interrupt Priority Level from the CAUSE register as the new
            IPL.</p>

            <ul>
              <li>Example 1:

                <p><tt>#pragma interrupt Timer1IntHandler RIPL vector 4</tt></p>
              </li>

              <li>Example 2:

                <p><tt>void <strong>__attribute__((interrupt(RIPL), vector(1)))</strong> myISR (void)) { /*
                code */ }</tt></p>
              </li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#new106target" onclick="shoh('new106');">New Features in v1.10</a></h2>

      <div style="display: none;" id="new106">
        <ul class="c5">
          <li>
            <p><strong>Compiler licenses renamed</strong> -- The compiler license editions have been renamed.
            The academic version is now the <strong>MPLAB C Compiler for PIC32 MCUs Lite edition</strong>.
            The evaluation version is now the <strong>MPLAB C Compiler for PIC32 MCUs Standard Evaluation
            edition</strong>. The full version is now the <strong>MPLAB C Compiler for PIC32 MCUs Standard
            edition</strong> (Part Number: <a target="external" href=
            "http://www.microchipdirect.com/productsearch.aspx?Keywords=SW006015">SW006015</a>). This is a
            name change only. See <a href="#FeatureLimited">this section</a> for more information on the
            features available for each edition.</p>
          </li>

          <li>
            <strong>Smart I/O</strong> -- This release introduces a new
            <strong><tt>-msmart-io=[0|1|2]</tt></strong> command-line option. This feature attempts to
            statically analyze format strings passed to <tt>printf</tt>, <tt>scanf</tt>, and the 'f' and 'v'
            variations of these functions. Uses of non floating-point format arguments will be converted to
            use an integer-only variation of the library function. For many applications, this feature can
            reduce program-memory usage.

            <p><tt>-msmart-io=0</tt> disables this option, while <tt>-msmart-io=2</tt> causes the compiler to
            be optimistic and convert function calls with variable or unknown format arguments.
            <tt>-msmart-io=1</tt> is the safe default and will convert only when the compiler can prove that
            floating-point support is not required.</p>
          </li>

          <li>
            <strong><a name="ISR_Context_improvements" id="ISR_Context_improvements">Interrupt Context-Saving
            Improvements</a></strong> -- New PIC32 devices introduced in this release (PIC32MX5, PIC32MX6,
            PIC3MX7) allow us to select, via configuration fuses, which priority will use the shadow register
            set. (Refer to the device datasheet to determine if your PIC32 device supports this feature.)
            This means that we must specify which context-saving mechanism to use for each interrupt service
            routine. We specify the mechanism as part of the IPL specifier passed in the interrupt attribute,
            <strong><tt>__attribute__((interrupt([IPLn[AUTO|SOFT|SRS]])))</tt></strong>, where n is in the
            range of 0..7, inclusive.

            <p><strong>NOTE</strong>: An incorrect <tt>IPL<em>n</em></tt> value can cause incorrect nesting
            of interrupts, which could result in a stack overflow and eventually a bus-error exception. If
            you experience a bus-error exception related to an interrupt, double check that your
            <tt>IPL<em>n</em></tt> value matches the IPL value set for the interrupt source.</p>

            <p><a href="#ISR_Context_improvements" onclick="shoh('new106_IPL_READMORE');">Read
            More...</a></p>

            <div style="display: none;" id="new106_IPL_READMORE">
              <ul>
                <li>
                  <p><strong>IPL Specifiers</strong></p>

                  <ul>
                    <li>
                      <p><tt><strong>IPL<em>n</em>AUTO</strong></tt> -- The compiler supports an
                      <tt>IPL<em>n</em>AUTO</tt> IPL specifier that uses the runtime value in <tt>SRSCTL</tt>
                      to determine whether it should use software or SRS context saving. The interrupt
                      context-saving code generated for this specifier has a slightly higher latency,
                      compared to <tt>IPL<em>n</em>SOFT</tt> or <tt>IPL<em>n</em>SRS</tt>, due to the
                      instructions required to test the <tt>SRSCTL</tt> value. Example:<br>
                      <tt>void <strong>__attribute__((interrupt(IPL6AUTO), vector(1)))</strong> myISR (void))
                      { /* code */ }</tt></p>
                    </li>

                    <li>
                      <p><strong><tt>IPL<em>n</em>SOFT</tt></strong> -- The compiler will use software
                      context saving for the <tt>IPL<em>n</em>SOFT</tt> specifier. Application code is
                      responsible for applying the correct <em>n</em> interrupt-source priority value to the
                      matching handler routine. Example:<br>
                      <tt>void <strong>__attribute__((interrupt(IPL6SOFT), vector(1)))</strong> myISR (void))
                      { /* code */ }</tt></p>
                    </li>

                    <li>
                      <p><tt><strong>IPL<em>n</em>SRS</strong></tt> -- The compiler will generate interrupt
                      prologue and epilogue code utilizing shadow-register context saving for
                      <tt>IPL<em>n</em>SRS</tt>. This IPL specifier results in the shortest interrupt
                      context-saving latency. However, when using <tt>IPL<em>n</em>SRS</tt>, you must
                      configure the corresponding interrupt source to use a shadow register set. On some
                      devices, the shadow register set is tied to IPL7. On other devices, the shadow register
                      set is configurable in a device configuration register (DEVCFG). Example:<br>
                      <tt>void <strong>__attribute__((interrupt(IPL6SRS), vector(1)))</strong> myISR (void))
                      { /* code */ }</tt><br></p>
                    </li>

                    <li>
                      <p><strong><tt>single</tt></strong> -- For single-vector interrupt mode, use
                      <tt>single</tt> as the IPL parameter passed to the interrupt attribute. Example:<br>
                      <tt>void <strong>__attribute__((interrupt(single), vector(1)))</strong> myISR (void)) {
                      /* code */ }</tt></p>
                    </li>

                    <li>
                      <p><strong><em>Default</em></strong> -- The compiler defaults to selecting the IPL
                      value and shadow-register usage at runtime when the IPL specifier is omitted from the
                      interrupt() attribute. Omitting the IPL specifier results in slightly larger interrupt
                      context-saving latency. <em>For mult-vector interrupt mode where the requested IPL
                      value may change at runtime, use this default behavior</em>. Example:<br>
                      <tt>void <strong>__attribute__((interrupt(), vector(1)))</strong> myISR (void)) { /*
                      code */ }</tt></p>
                    </li>
                  </ul>
                </li>

                <li>
                  <p><strong>Updated __ISR Macro</strong> -- The IPL specifier argument to the
                  <tt>__ISR()</tt> macro, defined in <tt>&lt;sys/attribs.h&gt;</tt>, is now optional. With
                  the IPL specifier omitted, the compiler defaults to selecting the IPL value and
                  shadow-register usage at runtime.</p>

                  <ul>
                    <li>
                      <p><strong>Example 1</strong><br>
                      <tt>void <strong>__ISR(_CORE_SOFTWARE_0_VECTOR, IPL3SRS)</strong>
                      CoreSoftwareInt0Handler(void)</tt><br>
                      This example creates an interrupt handler function for the core software interrupt 0
                      that has an interrupt priority level of three. The compiler places a dispatch function
                      at the associated vector location. To reach this function, the core software interrupt
                      flag and enable bits must be set, and the interrupt priority should be set to a level
                      of three. The device configuration fuses must assign Shadow Register Set 1 to interrupt
                      priority level three. The compiler generates code that assumes that register context
                      will be saved in SRS1.</p>
                    </li>

                    <li>
                      <p><strong>Example 2</strong><br>
                      <tt>void <strong>__ISR(_CORE_SOFTWARE_0_VECTOR)</strong>
                      CoreSoftwareInt0Handler(void)</tt><br>
                      This example creates an interrupt handler function for the core software-interrupt 0
                      and uses the interrupt priority level from the runtime-requested IPL value. The
                      compiler generates code that determines, at runtime, whether context should be saved on
                      the stack by software or context was already saved in a shadow register set.</p>
                    </li>
                  </ul>
                </li>

                <li>
                  <p><strong>Latency improvements</strong> -- The interrupt context saving code has also been
                  modified to improve latency. For instance, the HI/LO register saving code, when required,
                  now appears later in the ISR prologue. This helps reduce stalls when an interrupt occurs
                  during a DIV (divide) instruction.</p>
                </li>
              </ul>
            </div>
          </li>

          <li>
            <strong><a name="APPIOReadMore" id="APPIOReadMore">APPIN/APPOUT Debugging Support</a></strong> --
            New PIC32 devices being introduced in v1.10 (PIC32MX5, MX6, MX7) support the APPIN/APPOUT
            debugging feature. This PIC32 feature allows the target application to write text or data to an
            MPLAB IDE window without halting the target device. Similarly, you may use the display window to
            send text or data back to the target PIC32 device. This feature requires an <a href=
            "http://www.microchip.com/realice" target="external">MPLAB REAL ICE</a> emulator or an <a href=
            "http://www.microchip.com/icd3" target="external">MPLAB ICD 3</a> debugger.<br>

            <p><a href="#APPIOReadMore" onclick="shoh('new106_APPIOReadMore');">Read More...</a></p>

            <div style="display: none;" id="new106_APPIOReadMore">
              <ul>
                <li><strong><tt>-mappio-debug</tt></strong> -- Use this command-line option to enable the
                APPIN/APPOUT debugging library functions for the ICD 3 debugger and REAL ICE emulator. This
                feature allows you to use the DBPRINTF and related functions and macros. Enable this option
                only when using a target PIC32 device that supports the APPIN/APPOUT feature.</li>

                <li>
                  <strong>Example Code</strong> --

                  <div class="code panel" style="border-width: 1px; margin: 2px;">
                    <div class="codeContent panelContent">
                      <pre class="codeContent">
<tt>#include &lt;p32xxxx.h&gt;
int main (void)
{
    int num;
    char buf[256] ={0};
    DBINIT();

    while(1)
    {
      DBPRINTF ("Hello there!\n");
      DBPRINTF ("Enter a string\n");
#if defined(__APPIO_DEBUG)
      DBSCANF ("%s", &amp;buf[0]);
#elif defined(PIC32_STARTER_KIT)
      DBGETS  (&amp;buf[0],128);
#endif
      DBPRINTF ("Entered \"%s\"\n\n", &amp;buf[0]);

      printf ("Prints to UART2 by default or APPO when enabled\n");
    }
  return 0;
}</tt>
</pre>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </li>

          <li>
            <strong><a name="SPLIMReadMore" id="SPLIMReadMore">Stack Limit symbol in built-in linker
            script</a></strong> -- The default linker script now provides an _SPLIM symbol that you can use
            from code to help detect a stack overflow at runtime. This symbol is associated with the lowest
            address of the space reserved for the stack.

            <p><a href="#SPLIMReadMore" onclick="shoh('new106_SPLIMReadMore');">Read More...</a></p>

            <div style="display: none;" id="new106_SPLIMReadMore">
              <ul>
                <li>
                  <strong>Example Code</strong> --

                  <div class="code panel" style="border-width: 1px; margin: 2px;">
                    <div class="codeContent panelContent">
                      <pre class="codeContent">
<tt>#include &lt;stddef.h&gt;
#define _STACK_DEBUG 1
#if (_STACK_DEBUG)
#define stackcheck() _stackcheck(__FILE__, __LINE__)

static inline __attribute__((always_inline))
ptrdiff_t _stackcheck(const char *filename, unsigned int linenum)
{
  extern void _SPLIM; /* From linker script */

  register void* stackptr __asm__("$sp");

  /* Compare the current stack pointer with the Stack Pointer Limit symbol, _SPLIM */
  if ((ptrdiff_t)stackptr &lt;= (ptrdiff_t)&amp;_SPLIM)
    {
        /* Handle stack overflow */
        while(1);
    }
  return ((ptrdiff_t)stackptr - (ptrdiff_t)&amp;_SPLIM);
}
#else
#define stackcheck() (void)0
#endif

unsigned char foo(unsigned char var);
volatile unsigned int testval;

int main (void)
{
    unsigned char array[0x7A50];
    testval = 0;

    array[0] = 1;
    foo (array[0]);

    testval = 1;
    while(1);
}
unsigned char
foo(unsigned char var)
{
    stackcheck();
    return var+1;
}</tt>
</pre>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </li>

          <li>
            <strong><a name="FeatureSetMacro" id="FeatureSetMacro">Predefined macro for Feature
            Set</a></strong> -- The compiler predefines a macro based on the features available for the
            selected device. These macros are intended to be used when writing code to take advantage of
            features available on newer devices while maintaining compatibility with older devices.

            <p><a href="#FeatureSetMacro" onclick="shoh('new106_FeatureSetMacroReadMore');">Read
            More...</a></p>

            <div style="display: none;" id="new106_FeatureSetMacroReadMore">
              <ul>
                <li><strong>Examples</strong><br>
                PIC32MX<strong>795</strong>F512L would use <tt>__PIC32_FEATURE_SET__ == 795</tt>, and<br>
                PIC32MX<strong>340</strong>F128H would use <tt>__PIC32_FEATURE_SET__ == 340</tt>.<br>
                <br></li>

                <li>
                  <strong>Example Code</strong> --

                  <div class="code panel" style="border-width: 1px; margin: 2px;">
                    <div class="codeContent panelContent">
                      <pre class="codeContent">
<tt>#if ((__PIC32_FEATURE_SET__ &gt;= 500) &amp;&amp;
     (__PIC32_FEATURE_SET__ &lt;= 799))
   { /* do stuff for 5XX, 6XX, 7XX families */ }
#elif ((__PIC32_FEATURE_SET__ &gt;= 300) &amp;&amp;
       (__PIC32_FEATURE_SET__ &lt;= 499))
   { /* do stuff for 3XX, 4XX families */ }
#elif ((__PIC32_FEATURE_SET__ &gt;= 800) &amp;&amp;
       (__PIC32_FEATURE_SET__ &lt; 1000))
   { /* do stuff for some future family */ }
#endif
</tt>
</pre>
                    </div>
                  </div><br>
                  <br>
                </li>
              </ul>
            </div>
          </li>
        </ul>
      </div>

      <h2><a href="#new105" onclick="shoh('new105');">New Features in v1.05</a></h2>

      <div style="display: none;" id="new105">
        <ul class="c5">
          <li><strong>Student Edition renamed Evaluation Version</strong> -- The student edition has been
          renamed the evaluation version. This release also introduces a new academic version. For more
          information on the edition, see <a href="#FeatureLimited">this section.</a> <font color="red">(Note
          that the licenses have been renamed again for the v1.10 release.)</font></li>

          <li><strong>Improved 16- and 32-bit FFT functions in the DSP Library</strong> -- The FFT functions
          have been significantly improved and optimized for the PIC32 instruction set. See the 32-bit
          Language Tools Libraries document (DS51685) for more information. Please visit <a href=
          "http://www.microchip.com/c32">Microchip's website</a> for the revision C of this document
          (DS51685C).</li>

          <li><strong>Binary Constants</strong> -- A sequence of binary digits preceded by 0b or 0B (the
          numeral '0' followed by the letter 'b' or 'B') is taken to be a binary integer. The binary digits
          consist of the numerals '0' and '1'. Note that this binary-constant syntax may not be accepted by
          other C compilers.</li>

          <li>
            <strong>Linker Memory-Usage Report</strong> -- This optional, informational report allows you to
            easily determine the program- and data-memory usage of your application. It allows you to see how
            much space is used by the project being linked and how much space is available on the target
            device. The memory-usage report appears on stdout and in the optional map file.

            <ul>
              <li>Using this feature with <strong>MPLAB IDE 8.30 and earlier</strong> -- On the linker's tab
              of the project build options, select to <strong>Use Alternate Settings</strong>. Add the
              <strong><tt>--report-mem</tt></strong> option to the Alternate Settings field. The memory-usage
              report will appear in the output window after a project build. (This option will appear as a
              checkbox in later MPLAB IDE releases.)</li>

              <li>Using this feature on the <strong>command prompt</strong> -- Add the <tt>--report-mem</tt>
              option to the linker's command line. If you are calling the linker via the compilation driver,
              use the driver's <tt>-Wl</tt> option to pass the <tt>--report-mem</tt> option to the linker.
              The memory-usage report will appear on stdout.</li>
            </ul>
          </li>

          <li>
            <strong>Improved malloc implementation</strong> -- This release contains a new
            malloc/free/realloc implementation based on the implementation written by Doug Lea and released
            to the public domain. <em>(Note that C32 v1.12 introduces another implementation.)</em>

            <ul>
              <li>This is not the fastest, most space-conserving, most portable, or most tunable malloc ever
              written. However it is among the fastest while also being among the most space-conserving,
              portable and tunable. Consistent balance across these factors results in a good general-purpose
              allocator.</li>

              <li>For a high-level description, see <a href=
              "http://g.oswego.edu/dl/html/malloc.html">http://g.oswego.edu/dl/html/malloc.html</a></li>

              <li>This implementation is also provided with the <a href=
              "http://sourceware.org/newlib/">Newlib</a> C Library.</li>
            </ul>
          </li>

          <li><strong>Instruction Macros</strong> -- The p32xxxx.h include file now contains a Nop() macro
          that issues a superscalar SSNOP instruction.</li>

          <li><strong><tt>gettimeofday()</tt> weak stub</strong> -- The time.h <tt>clock()</tt> and
          <tt>time()</tt> functions require a user-provided <tt>gettimeofday()</tt> helper function. The
          compiler's library now provides a weak stub implementation that allows the project link to complete
          without error, but you should provide your own implementation appropriate for your
          application.</li>

          <li><strong>Microchip DSP Compatibility Wrapper functions</strong> -- This release provides new DSP
          wrapper functions intended to ease the migration from the Microchip DSP library for dsPIC DSCs to
          the general DSP library for PIC32 MCUs. See the 32-Bit Language Tools Libraries (DS51685C) document
          for more information on these new wrapper functions.</li>

          <li><strong>Updated peripheral-library documentation</strong> -- The 32-bit peripheral library
          document is now distributed as a compiled help file (*.chm) rather than a PDF file.</li>

          <li><strong>Support for PWP configuration bits</strong> -- The config pragma now supports enabling
          the Program Write Protect bits. See the <em>PIC32MX Config Settings</em> help file for information
          on the setting name and available values for each device.</li>
        </ul>
      </div>
    </li>

    <li style="list-style: none; display: inline">
      <h2><a href="#new104" onclick="shoh('new104');">New Features in v1.04</a></h2>

      <div style="display: none;" id="new104">
        <ul class="c5">
          <li>
            <strong>General DSP Library</strong> -- The DSP Library supports a variety of signal processing
            functions that have applicability in speech compression, echo cancellation, noise cancellation,
            channel equalization, audio decoding, and many other DSP and media applications. The library is
            highly optimized for the PIC32 MCU instruction set.

            <ul>
              <li>The DSP Library expects Q-type fixed-point arguments and produces Q-type results. The MPLAB
              C Compiler for PIC32 MCUs does not currently support converting float or double types to
              Q-types.</li>

              <li>See the 32-Bit Language Tools Libraries (DS51685) for documentation on the DSP Library
              functions.</li>

              <li>In the near future, a "dsPIC DSC DSP Algorithm Library" compatibility layer will be
              available. This compatibility layer makes the PIC32 DSP Library backwards compatible with the
              existing dsPIC DSC DSP Algorithm Library.</li>
            </ul>
          </li>

          <li>
            <strong>Vector attribute accepts parenthesized list of vector numbers</strong> -- The interrupt
            vector attribute now accepts a parenthesized list of one or more interrupt vector numbers. This
            means that you can now more easily generate multiple dispatch functions that target a single
            interrupt service routine as shown in the example below.

            <div class="code panel" style="border-width: 1px; margin: 10px;">
              <div class="codeContent panelContent">
                <tt>#include &lt;p32xxxx.h&gt;<br>
                #include &lt;sys/attribs.h&gt;<br>
                void __ISR((_TIMER_1_VECTOR,_TIMER_2_VECTOR,_TIMER_3_VECTOR),ipl6) TimerISR(void);</tt>
              </div>
            </div>
          </li>

          <li><strong>Interrupt service routines forced to nomips16</strong> -- The compiler will now force
          functions marked with the interrupt attribute to be nomips16. The compiler will emit a warning if
          it overrides the mips16 attribute or command-line default. Previous compiler releases stopped
          compilation with an error and required users to manually add the nomips16 attribute. Note that you
          should use the __ISR macro from the sys/attribs.h header rather than manually specify the interrupt
          attribute.</li>

          <li><strong>Trigonometric function refactorization</strong> -- A few trigonometric functions have
          been refactored for a smaller code-size footprint.</li>
        </ul>
      </div>

      <h2><a href="#new103" onclick="shoh('new103');">New Features in v1.03</a></h2>

      <div style="display: none;" id="new103">
        <ul class="c5">
          <li><strong>Optimized math library</strong> -- The floating-point math library provided with the
          compiler has been significantly optimized to take full advantage of the PIC32 MCU instruction set.
          The improved library provides the greatest benefit for the more complex operations, offering a
          greater than 5x performance improvement over the 1.02 library for many operations and an even more
          significant improvement for some operations. In addition, single-precision math library functions
          are now available, giving users a choice between double- and single-precision operations. See
          math.h for more information.</li>
        </ul>

        <ul class="c5">
          <li><strong>Evaluation Version</strong> -- The new evaluation edition provides
          <strong>standard-edition functionality for 60 days</strong>. After the evaluation version has
          expired, these additional features are disabled. See <a href="#FeatureLimited">this section</a> for
          further details. <font color="red">(Note that this license has been renamed to the "Standard
          Evaluation Edition" for the v1.10 release.)</font></li>
        </ul>

        <ul class="c5">
          <li><strong><tt>__C32_VERSION__</tt> predefined macro</strong> -- The C compiler defines the
          constant <tt>__C32_VERSION__</tt>, giving a numeric value to the version identifier. This macro can
          be used to construct applications that take advantage of new compiler features while still
          remaining backward compatible with older versions. The value is based upon the major and minor
          version numbers of the current release. For example, release version 1.03 will have a
          <tt>__C32_VERSION__</tt> definition of 103. This macro can be used, in conjunction with standard
          preprocessor comparison statements, to conditionally include/exclude various code constructs.</li>
        </ul>

        <ul class="c5">
          <li>
            <strong><tt>__ISR_SINGLE__</tt> and <tt>__ISR_SINGLE_AT_VECTOR__</tt> convenience macros</strong>
            -- The sys/attribs.h header file now provides two new macros intended to simplify the use of the
            single-vector interrupt mechanism. See the sys/attribs.h header file for more information.

            <ul>
              <li>The <tt>__ISR_SINGLE__</tt> macro specifies a function as an interrupt-service routine in
              single-vector mode. This will place a jump at the single-vector location to the interrupt
              handler.</li>

              <li>The <tt>__ISR_SINGLE_AT_VECTOR__</tt> macro places the entire single-vector interrupt
              handler at the vector 0 location. The user is responsible for ensuring that the vector spacing
              is set to accommodate the size of the handler.</li>
            </ul>
          </li>
        </ul>
      </div>
    </li>

    <li class="Heading0">
      <h1><a name="Migration" id="Migration"></a>Migration Issues</h1>

      <p class="c1">The following changes may affect migration from older versions of the compiler.</p>

      <h2><a href="#Migration" onclick="shoh('migrate200');">Migrating to Version v2.00</a></h2>

      <div style="display: block;" id="migrate200">
        <ul class="c5">
          <li class="c8">Compiler</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <p><strong>Custom Startup Code</strong> -- This release of the toolchain introduces data
                initialization using a .dinit template and associated startup code. Previous releases relied
                on a block copy in the startup code that copied from the .data section located in program
                memory to the .data section allocated in data memory. If your project uses custom startup
                code and initialized data, replace the block copy in your custom startup code with
                initialization code utilizing the .dinit template. A copy of the updated default startup code
                is located in the /pic32-libs/libc/startup/crt0.S file installed with the compiler.</p>
              </li>

              <li>
                <p><strong>Placement of the <tt>mips16</tt>/<tt>nomips16</tt> Function Attribute</strong> --
                The <tt>mips16</tt> and <tt>nomips16</tt> function attributes are now declaration attributes
                rather than type attributes. This means that they should be placed at the beginning of a
                declaration rather than on the type. The compiler will emit a warning message if the
                attribute should be moved.</p>

                <p><tt><strong>__attribute__((mips16))</strong> unsigned int *funct1 (void) { /* code */
                }</tt></p>
              </li>
            </ul>
          </li>

          <li class="c8">Linker</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <p><strong>Custom Linker Script</strong> -- To make effective use of absolute sections and
                the new best-fit allocator, <strong>standard program-memory and data-memory sections should
                not be mapped in the linker script</strong>. The built-in linker script no longer maps most
                standard sections such as the .text, .data, .bss, or .ramfunc section. By not mapping these
                sections in the linker script, we allow these sections to be allocated using the new best-fit
                allocator rather than the sequential allocator. Sections that are unmapped in the linker
                script can flow around absolute sections whereas sections that are linker-script mapped are
                grouped together and allocated sequentially, potentially causing conflicts with absolute
                sections.</p>

                <p>Note that the "small" data and bss (.sdata, .sbss, etc.) sections are still mapped in the
                built-in linker script. This is because "small" data variables must be grouped together so
                that they are within range of the more efficient GP-relative addressing mode. To avoid
                conflict with these linker-script mapped sections, choose high addresses for your
                absolute-address variables.</p>

                <p><strong>New debug information should be mapped to 0 in the linker script.</strong> The
                linker script should map the new .debug_ranges, .debug_pubtypes, and .gnu.attributes sections
                in the linker script so that they do not get allocated to program or data memory. You can do
                this by adding two lines to your custom linker script. In the existing linker script, find
                the output-section command within the SECTIONS block where the other .debug sections are
                mapped. Add the two lines for .debug_ranges and .debug_pubtypes.</p>

                <p><tt>/* SGI/MIPS DWARF 2 extensions */<br>
                .debug_weaknames 0 : { *(.debug_weaknames) }<br>
                .debug_funcnames 0 : { *(.debug_funcnames) }<br>
                .debug_typenames 0 : { *(.debug_typenames) }<br>
                .debug_varnames 0 : { *(.debug_varnames) }<br>
                <font color="navy"><em>.debug_pubtypes 0 : { *(.debug_pubtypes) }</em><br>
                <em>.debug_range &nbsp;&nbsp; 0 : { *(.debug_ranges) }</em><br>
                <em>.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }</em></font><br>
                /DISCARD/ : { *(.rel.dyn) }<br>
                /DISCARD/ : { *(.note.GNU-stack) }<br></tt></p>

                <p><strong>A copy of the updated built-in linker script is located in
                /pic32mx/lib/ldscripts/elf32pic32mx.x</strong>.</p>
              </li>
            </ul>
          </li>

          <li class="c8">Libraries</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <p><strong>Peripheral Freeze (FRZ) bits</strong> -- The peripheral-library functions no
                longer modify the debug freeze bit for the corresponding peripheral. Use an in-circuit
                debugger or emulator to configure the peripheral to freeze when debugging, if required.</p>
              </li>
            </ul>
          </li>

          <li class="c8">Installer</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <p><strong>Default install location</strong> -- The installer now always defaults to
                installing in a standard installation path. If you do not wish to have multiple versions of
                the toolchain installed on your machine, uninstall the previous versions.</p>

                <dl>
                  <dt><strong>Windows</strong></dt>

                  <dd>C:\Program Files\Microchip\mplabc32\&lt;<em>version</em>&gt;</dd>

                  <dt><strong>Linux</strong></dt>

                  <dd>/opt/microchip/mplabc32/&lt;<em>version</em>&gt;</dd>

                  <dt><strong>Mac OS X</strong></dt>

                  <dd>/Applications/microchip/mplabc32/&lt;<em>version</em>&gt;</dd>
                </dl>
              </li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate112" onclick="shoh('migrate112');">Migrating to Version v1.12</a></h2>

      <div style="display: none;" id="migrate112">
        <ul class="c5">
          <li class="c8">Compiler</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <p><strong>Default double type</strong> -- As indicated above in the "What's New section, in
                order to improve the migration path between C30 and C32, this release changes the default
                size of the <tt>double</tt> type from 64 bits to 32 bits. The <tt>long double</tt> type
                remains 64 bits. You may also restore default double size to 64 bits by passing the
                -fno-short-double option to the compiler.</p>

                <p><strong>Warning:</strong> This change means that the compiler will generate code that is
                not binary compatible with code generated using the 64-bit double. All object files in a
                project should be generated with the same double size.</p>
              </li>
            </ul>
          </li>

          <li class="c8">Libraries</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <p><strong>Standard C Library</strong> -- This release features a new lib C that can reduce
                the footprint of applications that make use of these library functions. There are significant
                differences in the implementation of functions such as printf() and malloc(). In addition,
                lldiv_t and strtok_r() are not yet supported in this library.</p>

                <p>For customers wishing to continue to use the version of lib C provided by earlier versions
                of MPLAB C32, the compiler option <tt>-legacy-libc</tt> makes this easy to manage. Be sure to
                pass the <tt>-legacy-libc</tt> option to pic32-gcc when both compiling and linking. In MPLAB
                IDE v8, find a checkbox for this option in the project build options, under the library
                selection category of the linker tab.</p>
              </li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate111" onclick="shoh('migrate111');">Migrating to Version v1.11</a></h2>

      <div style="display: none;" id="migrate111">
        <ul class="c5">
          <li class="c8">Linker</li>

          <li style="list-style: none">
            <ul class="c5">
              <li>
                <strong>Allocation of orphan sections</strong> -- Orphan sections are sections present in the
                input files which are not explicitly placed into the output file by the linker script. The
                linker will still copy these sections into the output file, but it has to guess as to where
                they should be placed. The linker uses a simple heuristic to do this. It attempts to place
                orphan sections after non-orphan sections of the same attribute, such as code vs data,
                loadable vs non-loadable, etc. If there is not enough room to do this then it places at the
                end of the file.

                <p>If an orphaned section's name is representable as a C identifier then the linker will
                automatically PROVIDE two symbols: __start_SECNAME and __end_SECNAME, where SECNAME is the
                name of the section. These indicate the start address and end address of the orphaned section
                respectively. Note: most section names are not representable as C identifiers because they
                contain a `.' character.</p>

                <p>Note: In previous releases, the linker allocated orphan sections at a high address, after
                all other sections had been allocated. This is no longer the case and applications should not
                rely on orphan sections being uninitialized.</p>
              </li>
            </ul>
          </li>
        </ul>

        <ul class="c5">
          <li class="c8">Default Linker Script</li>

          <li style="list-style: none">
            <ul class="c5">
              <li><strong>New .persist section</strong> -- The default linker script now provides a .persist
              section between the .stack section and the .ramfunc section. This section is not initialized or
              zeroed on startup. If your project used a custom section for this purpose, you can now utilize
              this new .persist section that is specifically mapped outside of the .bss and .data
              sections.<br>
              <br>
              Example:<br>
              <tt>unsigned int __attribute__((section(".persist"))) flag;</tt></li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate106" onclick="shoh('migrate106');">Migrating to Version v1.10</a></h2>

      <div style="display: none;" id="migrate106">
        <ul class="c5">
          <li class="c8">Interrupt context saving

            <ul class="c5">
              <li>
                <strong>IPL specifier</strong> -- In prior compiler releases, the interrupt service-routine
                prologue code determined the IPL value from the runtime RIPL value. This meant that the IPL
                specifier value in the interrupt attribute or interrupt pragma did not have to exactly match
                the actual IPL value for the interrupt source. The interrupt service routine worked
                correctly, even when there was a discrepancy in the IPL value.

                <p>The interrupt prologue code generated by this release of the compiler uses the IPL value
                as specified in the interrupt attribute or interrupt pragma. An incorrect IPLn value can
                cause incorrect nesting of interrupts, which could result in a stack overflow and eventually
                a bus-error exception. If you experience a bus-error exception related to an interrupt,
                double check that your IPLn value matches the IPL value set for the interrupt source.</p>

                <p>Some applications may require an interrupt priority that changes at runtime. In this case,
                omit the IPL specifier from the interrupt attribute as shown in the examples below. e.g.<br>
                <tt>&nbsp;&nbsp;void __attribute__((interrupt(), vector(1))) myISR1 (void)) { /* code */
                }</tt><br>
                <tt>&nbsp;&nbsp;void __ISR(_CORE_SOFTWARE_0_VECTOR) CoreSoftwareInt0Handler(void) { /* code
                */ }</tt></p>

                <p>Currently, the interrupt pragma does not support interrupt priority levels that change at
                runtime. In this case, convert the interrupt pragma to an interrupt attribute as described
                above. For instance:</p>

                <div class="code panel" style="border-width: 1px; margin: 2px;">
                  <div class="codeContent panelContent">
                    <pre class="codeContent">
<tt>#pragma interrupt foo ipl3 vector 4
void foo (void) { /* code */ }</tt>
</pre>
                  </div>
                </div>becomes

                <div class="code panel" style="border-width: 1px; margin: 2px;">
                  <div class="codeContent panelContent">
                    <pre class="codeContent">
<tt>void __attribute__((interrupt(), vector(4))) foo (void) { /* code */ }</tt>
</pre>
                  </div>
                </div>
              </li>
            </ul>
          </li>

          <li class="c8">STDIO

            <ul class="c5">
              <li><strong>BUFSIZ</strong> -- The input buffer size has been reduced from 1024 to 64 bytes.
              Use the setvbuf() function to specify another buffer if your application requires a buffer of
              another size.</li>

              <li><strong>STDOUT_BUFSIZ</strong> -- The stdout default-buffer size has been reduced from 128
              bytes to 32 bytes. Use the setvbuf() function to specify another buffer if your application
              requires a buffer of another size.</li>
            </ul>
          </li>

          <li class="c8">Device support

            <ul class="c5">
              <li><strong>PIC32MX4xx devices</strong> -- The UPLLIDIV configuration fuse settings were
              incorrectly named DIV_7 and DIV_8 for several PIC32MX4XX devices. They are now correctly named
              DIV_10 and DIV_12, respectively. Code using the older names will fail to compile. Update your
              code to use the new setting names.</li>
            </ul>
          </li>

          <li class="c8">Documentation

            <ul class="c5">
              <li><strong>Peripheral Library documentation now provided as a help file</strong> -- The
              peripheral library documentation is now provided as a CHM file rather than a PDF file. Older
              versions of the compiler installer added a link to the PDF file in MPLAB IDE's online help. To
              remove this outdated link, run the uninstall facility in Windows Add/Remove Programs to
              completely uninstall the compiler. Then re-run the v1.10 compiler installer.</li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate105" onclick="shoh('migrate105');">Migrating to Version v1.05</a></h2>

      <div style="display: none;" id="migrate105">
        <ul class="c5">
          <li class="c8">DSP Library

            <ul class="c5">
              <li><strong>FFT setup functions</strong> -- The FFT setup functions, mips_fft16_setup() and
              mips_fft32_setup(), are now deprecated. The FFT functions now load precalculated coefficients
              so these setup functions are no longer required. Please visit <a href=
              "http://www.microchip.com/c32">Microchip's website</a> for the revision C of the 32-bit
              Libraries document (DS51685C).</li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate104" onclick="shoh('migrate104');">Migrating to Version v1.04</a></h2>

      <div style="display: none;" id="migrate104">
        <ul class="c5">
          <li class="c8">Device-support files

            <ul class="c5">
              <li><strong>Device specific IRQ macro definitions</strong> -- The IRQ macro definitions, such
              as <tt>_CORE_TIMER_IRQ</tt>, have moved from the ppic32mx.h header file to the device-specific
              header file (e.g. proc/p32mx460f512l.h). This change should not affect most applications
              because they should include the generic p32xxxx.h file.</li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate103" onclick="shoh('migrate103');">Migrating to Version v1.03</a></h2>

      <div style="display: none;" id="migrate103">
        <ul class="c5">
          <li class="c8">Peripheral Library

            <ul class="c5">
              <li>Modified SYSTEMConfigXXX functions to use revised flash speed of 30 MHz. If you are
              currently using a SYSTEMConfigXXX function, your application will automatically use the new
              flash-speed specification.</li>
            </ul>
          </li>

          <li class="c8">Examples

            <ul class="c5">
              <li>Modified all plib_examples to use SYSTEMConfig() function. This function allows users to
              selectively configure certain parameters only.</li>
            </ul>
          </li>
        </ul>
      </div>

      <h2><a href="#migrate102" onclick="shoh('migrate102');">Migrating to Version v1.02</a></h2>

      <div style="display: none;" id="migrate102">
        <ul class="c5">
          <li>
            <span class="c6">Processor Header files</span>

            <ul>
              <li>Removed Extended Mode (XM bit) in DMA controller</li>
            </ul>
          </li>

          <li class="c8">Peripheral Library - See the <span class="c7">Microchip PIC32MX Peripheral
          Library</span> compiled help (*.chm) for details<br>

            <ul class="c5">
              <li>DMA Extended mode is removed. The maximum transfer length is now 256 bytes, even for memory
              copy and CRC functions.</li>

              <li>Symbols DMA_OPEN_NORM and DMA_OPEN_EXT used in the DmaChnOpen() call were removed. A new
              symbol, DMA_OPEN_DEFAULT was added.<br></li>

              <li>A new function, DmaGetMaxTcferSize() was added, to return the maximum supported size of a
              transfer, variant dependent. Right now, only 256 bytes transfer size supported.<br></li>

              <li>DmaChnSetExtTxfer() was removed, no longer relevant.<br></li>

              <li>DMA_CTL_EXT_EN was removed from the low level access routines</li>

              <li>SYSTEMConfig() function was added to enable user-specified configuration for a given system
              frequency.</li>
            </ul>
          </li>
        </ul>
      </div>
    </li>

    <li class="Heading0">
      <h1><a name="DocUpdate" id="DocUpdate"></a>Documentation Updates</h1>

      <h2>Library documentation updates</h2>

      <p class="c1">This section describes pending updates to the <cite>MPLAB<sup>&reg;</sup> 32-Bit Language
      Tools Libraries</cite> documentation. These changes will be incorporated into the next full revision of
      the documents.</p>

      <ul class="c5">
        <li><strong>BUFSIZ</strong> -- The BUFSIZ definition in stdio.h has been reduced to 32.</li>
      </ul>

      <h2>Compiler documentation updates</h2>

      <p class="c1">This section describes pending updates to the <em>MPLAB C Compiler for PIC32</em>
      documentation. These changes will be incorporated into the next full revision of the documents.</p>

      <ul class="c5">
        <li><strong>Address and Space C attributes</strong> -- The address and space attributes will be added
        to the compiler user's guide. For now, please see the <a href="#WhatsNew">What's New</a> and <a href=
        "#Migration">Migration Issues</a> sections of this file.</li>

        <li><strong>C Startup Code</strong> -- Changes related to .dinit data initialization template will be
        added to the compiler user's guide. For now, please see the <a href="#WhatsNew">What's New</a> and
        <a href="#Migration">Migration Issues</a> sections of this file.</li>

        <li><strong>Binary Constants</strong> -- A sequence of binary digits preceded by <tt>0b</tt> or
        <tt>0B</tt> (the numeral '0' followed by the letter 'b' or 'B') is taken to be a binary integer. The
        binary digits consist of the numerals '0' and '1'. For example, the (decimal) number 255 can be
        written as <tt>0b11111111</tt>. Like other integer constants, a binary constant may be suffixed by
        the letter 'u' or 'U', to specify that it is unsigned. A binary constant may also be suffixed by the
        letter 'l' or 'L', to specify that it is long. Similarly, the suffix 'll' or 'LL' denotes a long long
        binary constant. Note that this binary-constant syntax may not be accepted by other C compilers.</li>

        <li><strong><tt>__VERSION__</tt> predefined macro</strong> -- The <tt>__VERSION__</tt> macro expands
        to a string constant describing the compiler in use. Do not rely on its contents having any
        particular form, but it should contain at least the release number. Use the <tt>__C32_VERSION__</tt>
        macro for a numeric version number.</li>

        <li><strong>Interrupt-vector macros</strong> -- Each processor-support header file (e.g.
        \pic32mx\include\proc\p32mx360f512l.h) provides a macro for each interrupt-vector number. When used
        in conjunction with the <tt>__ISR()</tt> macro provided by the sys\attribs.h header file, these
        macros help make an interrupt service routine easier to write and maintain. Example: <tt>void __ISR
        (<em>_TIMER_1_VECTOR</em>, ipl7) Timer1Handler (void);</tt></li>
      </ul>

      <h2>Assembler/Linker/Utilities documentation updates</h2>

      <p class="c1">This section describes pending updates to the <em>MPLAB Assembler, Linker and Utilities
      for PIC32 MCUs User's Guide (DS51833)</em> documentation. These changes will be incorporated into the
      next full revision of the documents.</p>

      <ul class="c5">
        <li><strong><tt>.section</tt> Assembler Directive</strong> -- The new .section directive with
        attributes will be documented in the user's guide. For now, please see the <a href="#WhatsNew">What's
        New</a> and <a href="#Migration">Migration Issues</a> sections of this file.</li>

        <li><strong>Linker Allocation Algorithm</strong> -- The improved allocation algorithm featuring
        best-fit allocation will be documented in the user's guide. For now, please see the <a href=
        "#WhatsNew">What's New</a> and <a href="#Migration">Migration Issues</a> sections of this file.</li>
      </ul>
    </li>

    <li class="Heading0">
      <h1><a name="Fixes" id="Fixes">Fixed Issues</a></h1>

      <p class="c1">The following issues have been resolved in this release</p>

      <h2><a href="#Fixes" onclick="shoh('fixed202');">Fixed in v2.02</a></h2>

      <div style="display: block;" id="fixed202">
        <dl class="c9">
          <dt>C32-507:</dt>

          <dd>The compiler now generates Interrupt Service Routine code that uses registers $v0/$v1 to save
          the HI/LO accumulator pair.</dd>

          <dt>C32-504:</dt>

          <dd>Formatted IO functions now properly scan and merge support for all of the conversion specifiers
          used in the project.</dd>
        </dl>
      </div>

      <h2><a href="#Fixes" onclick="shoh('fixed201');">Fixed in v2.01</a></h2>

      <div style="display: block;" id="fixed201">
        <dl class="c9">
          <dt>C32-491:</dt>

          <dd>The watchdog timer (WDT) should now clear correctly on devices when the WDT Enable config bit
          is set using the config pragma. MPLAB C32 v2.00 incorrectly set some unimplemented bits to '0'
          rather than '1', which could cause problems with the WDT.</dd>

          <dt>C32-490:</dt>

          <dd>The single-precision atan2(y,x) function now returns the correct -Pi/2 value for the boundary
          condition (y&lt;0 &amp;&amp; x==0)</dd>

          <dt>C32-489:</dt>

          <dd>Compatibility issues related to the BigInt_helper_C32.S assembly code file in the Microchip
          TCP/IP stack have been resolved.</dd>

          <dt>C32-487:</dt>

          <dd>The _UART2_BASE_ADDRESS definition in the PIC32MX3 and MX4 device-support header files have
          been corrected. This caused the UART2 peripheral library functions to write to unimplemented
          locations rather than the correct Special Function Register addresses.</dd>

          <dt>C32-483:</dt>

          <dd>The C runtime startup code now correctly clears global uninitialized variables allocated to the
          "common" section.</dd>

          <dt>C32-480:</dt>

          <dd>The malloc free() function now handles a NULL pointer more gracefully. In previous releases,
          calling free() with a NULL pointer could cause heap corruption. In addition, the malloc() function
          now uses a smaller block size. This results in more efficient heap usage for most embedded
          applications.</dd>

          <dt>BIN32-79:</dt>

          <dd>The linker no longer marks the .sdata section as LOADable. In the MPLAB C32 v2.00 release, the
          .sdata section appeared in the hex file causing a problem for some hex file consumers.</dd>

          <dt>BIN32-77:</dt>

          <dd>The linker no longer causes a segmentation fault on projects that use the .rel.dyn section.
          Dynamic relocations are not yet supported.</dd>

          <dt>BIN32-76:</dt>

          <dd>The linker no longer emits symbols causing the bus matrix to be initialized when ram functions
          do not exist in the project. MPLAB C32 v2.00 always initialized the bus matrix, potentially causing
          runtime problems for projects using a custom linker script with a data section that did not end on
          a 2K aligned address.</dd>
        </dl>
      </div>

      <h2><a href="#Fixes" onclick="shoh('fixed200');">Fixed in v2.00</a></h2>

      <div style="display: block;" id="fixed200">
        <dl class="c9">
          <dt>C32-412:</dt>

          <dd>Peripheral library function-like macros related to 32-bit timers TMR23 and TMR45 are restored.
          In the v1.12 release, these macros were unavailable and caused a link error for application code
          that attempted to use them. These macros are now again available on appropriate devices.</dd>

          <dt>C32-391:</dt>

          <dd>Some errors related to smart-io version 2 are now corrected. In the v1.12 release, some uses of
          formatted IO functions could cause a linker error along the lines of "undefined reference to
          `_fprintf_s' ". This error has been corrected for v2.00.</dd>

          <dt>C32-390:</dt>

          <dd>Library functions asprintf() and vasprintf() should now link correctly.</dd>

          <dt>BIN32-73:</dt>

          <dd>A potential linker hang/crash related to smart IO has been corrected.</dd>
        </dl>
      </div>

      <h2><a href="#fixed112" onclick="shoh('fixed112');">Fixed in v1.12</a></h2>

      <div style="display: none;" id="fixed112">
        <dl class="c9">
          <dt>C32-350:</dt>

          <dd>The compiler now always preserves the $ra register when a function calls the __builtin_mfc0 or
          __builtin_mtc0 function.</dd>

          <dt>C32-347:</dt>

          <dd>The stack pointer is now always aligned to 8, even with the existence of a .ramfunc section. In
          earlier compiler releases, a function utilizing the <tt>__longramfunc__</tt> macro could cause the
          stack pointer to become misaligned. This could then potentially cause stack corruption if the
          application later called a vararg function and passed a 64-bit wide parameter such as a long double
          or a long long. The default linker script provided with this release corrects this potential
          issue.</dd>

          <dt>C32-353:</dt>

          <dd>In the v1.11 and v1.11(B) releases, some processor header files contained an SFR union with an
          empty nested struct. This extraneous empty struct has been removed.</dd>
        </dl>
      </div>

      <h2><a href="#fixed111" onclick="shoh('fixed111');">Fixed in v1.11</a></h2>

      <div style="display: none;" id="fixed111">
        <dl class="c9">
          <dt>C32-318:</dt>

          <dd>IPLnSOFT interrupts nested in IPLnSRS interrupts now preserve the stack pointer across register
          sets. Previously, nested interrupts with shadow register set 1 assigned to a lower priority ISR
          (e.g. IPL1SRS) could cause stack pointer corruption. The most common symptom of stack corruption is
          a general exception after returning from the ISR. Thanks to A. Chen for reporting this issue via
          <a href="http://support.microchip.com">http://support.microchip.com</a></dd>

          <dt>C32-314:</dt>

          <dd>The default general-exception context-saving code now allocates sufficient stack space for the
          number of general registers that it saves. The previous default code did not allocate sufficient
          space and resulted in stack corruption following a general exception. This made recovering from a
          general exception impossible when using the default context-saving code.</dd>

          <dt>C32-312:</dt>

          <dd>The compiler no longer generates an extraneous instruction a function epilogue for
          non-interrupt function where no additional stack space needs to be deallocated. The v1.10 release
          incorrectly generated a useless <tt>addiu sp,sp,0</tt> instruction. Thanks to Slawek Piotrowski for
          reporting this issue on the Microchip <a href=
          "http://www.microchip.com/forums/tm.aspx?m=469338&amp;mpage=1&amp;key=&amp;#469338&quot;">web
          forum</a>.</dd>

          <dt>C32-300:</dt>

          <dd>The compiler now maintains an 8-byte alignment for the stack pointer for all functions
          including interrupt service routines. In prior compiler releases, when a function taking a variable
          number of arguments was called from an interrupt service routine and an 8-byte variable was passed
          as an argument, the generated code could cause a general exception. Thanks to Leon van Snippenberg
          of AVIX for reporting this issue.</dd>

          <dt>C32-298:</dt>

          <dd>A constant infinite loop within an IPLxAUTO interrupt service routine no longer causes an
          internal compiler error.</dd>

          <dt>C32-297:</dt>

          <dd>The CP0 access macros in cp0defs.h no longer cause an exception when used in a mips16 function.
          These access macros now use the new CP0 builtin functions described in the <a href=
          "#new111target">New Features in v1.11</a> section above.</dd>

          <dt>C32-292:</dt>

          <dd>The compiler now properly ignores the -mips16 and higher-level optimization options when they
          are passed together to a compiler operating with a limited-functionality license such as a
          lite-mode license or an expired standard evaluation license. Previous releases emitted a correct
          warning followed by an incorrect error.</dd>

          <dt>BIN32-44:</dt>

          <dd>The pic32-size utility now reports the size of COMMON section correctly as part of the bss
          section usage.</dd>
        </dl>
      </div>

      <h2><a href="#fixed110" onclick="shoh('fixed110');">Fixed in v1.10</a></h2>

      <div style="display: none;" id="fixed110">
        <dl class="c9">
          <dt>C32-267:</dt>

          <dd>The '0' (zero-fill) flag for the output-format conversion specifiers (used with the printf
          functions), now properly causes zero filling when used with floating-point conversions. (e.g.
          <tt>printf("%010.2f",foo);</tt> )</dd>

          <dt>C32-266:</dt>

          <dd>A 'naked' attributed function containing a function call no longer causes a compiler crash when
          building with optimizations enabled.</dd>

          <dt>C32-252:</dt>

          <dd>The SoftReset() peripheral library function now works correctly on devices that do not use DMA,
          such as the PIC32MX320F032H.</dd>

          <dt>C32-224:</dt>

          <dd>In stdlib.h, MB_CUR_MAX is now correctly defined as 1.</dd>

          <dt>DAYHLD-10:</dt>

          <dd>The UPLLIDIV configuration fuse settings were incorrectly named DIV_7 and DIV_8 for several
          PIC32MX4XX devices. They are now correctly named DIV_10 and DIV_12, respectively.</dd>
        </dl>
      </div>

      <h2><a href="#fixed105" onclick="shoh('fixed105');">Fixed in v1.05</a></h2>

      <div style="display: none;" id="fixed105">
        <dl class="c9">
          <dt>C32-064:</dt>

          <dd>Code generated using -Os -mips16 and a very large number of common subexpressions now compiles
          correctly.</dd>

          <dt>C32-232:</dt>

          <dd>Interrupt context-saving code now preserves the assembler temporary ($at) register. While the
          compiler does not use this register for standard C code, the general DSP library or the optimized
          math library use this register.</dd>

          <dt>Peripheral Library:</dt>

          <dd>
            The peripheral-library source files listed below contain fixes and improvements. See the updated
            peripheral-library documentation for further details.

            <ul>
              <li>pic32mx/include/peripheral/int.h</li>

              <li>pic32mx/include/peripheral/incap.h</li>

              <li>pic32mx/include/peripheral/nvm.h</li>

              <li>pic32mx/include/peripheral/dma.h</li>

              <li>pic32mx/include/peripheral/ports.h</li>

              <li>pic32mx/include/peripheral/uart.h</li>

              <li>pic32mx/include/peripheral/i2c.h</li>

              <li>pic32mx/include/peripheral/outcompare.h</li>

              <li>pic32mx/include/peripheral/cmp.h</li>

              <li>pic32mx/include/peripheral/timer.h</li>

              <li>pic32mx/include/peripheral/reset.h</li>

              <li>pic32mx/include/peripheral/pcache.h</li>

              <li>pic32mx/include/peripheral/system.h</li>

              <li>pic32mx/include/peripheral/bmx.h</li>

              <li>pic32-libs/peripheral/nvm/source/nvm_operation_lib.c</li>

              <li>pic32-libs/peripheral/i2c/source/idle_i2c2_lib.c</li>
            </ul>
          </dd>

          <dt>C32-42:</dt>

          <dd>The compiler now emits a more useful diagnostic message when multiple -mprocessor options
          appear on the command line.</dd>
        </dl>
      </div>

      <h2><a href="#fixed104" onclick="shoh('fixed104');">Fixed in v1.04</a></h2>

      <div style="display: none;" id="fixed104">
        <dl class="c9">
          <dd>No significant fixed issues for this release</dd>
        </dl>
      </div>

      <h2><a href="#fixed103" onclick="shoh('fixed103');">Fixed in v1.03</a></h2>

      <div style="display: none;" id="fixed103">
        <dl class="c9">
          <dt>BIN32-30:</dt>

          <dd>Assertion statements in the linker scripts now correctly compare the size of an exception
          vector to the vector spacing.</dd>

          <dt>C32-179:</dt>

          <dd>The gmtime() library function now links without error. In previous releases, the linker would
          complain about an undefined reference to 'offtime_r'</dd>

          <dt>C32-172:</dt>

          <dd>The config pragma now defaults the DEVCFG0 MSb to zero.</dd>

          <dt>C32-171:</dt>

          <dd>The first call to getchar() now calls _mon_getc(). The previous implementation treated the
          initial STDIN character as an ungetc() pushed-back character.</dd>

          <dt>C32-164:</dt>

          <dd>The device-specific header files now use '__asm__' rather than 'asm' when mapping each SFR
          struct to it's symbol name. Previous versions of these files did not compile when building with the
          compiler's -ansi option.</dd>

          <dt>C32-147:</dt>

          <dd>The interrupt attribute now properly accepts an uppercase IPLx value. Earlier compiler versions
          could reject the uppercase IPLx with an internal error.</dd>
        </dl>
      </div>

      <h2><a href="#fixed102" onclick="shoh('fixed102');">Fixed in v1.02</a></h2>

      <div style="display: none;" id="fixed102">
        <dl class="c9">
          <dt>C32-119:</dt>

          <dd>Removed pipeline interlock in ISR handling</dd>

          <dt>C32-141:</dt>

          <dd>Large <tt>malloc()</tt> calls no longer generate a general exception vector instead of
          returning a NULL pointer.</dd>

          <dt>C32-144:</dt>

          <dd>Interrupt macro now sets <tt>nomips16</tt></dd>

          <dt>C32-145:</dt>

          <dd>Include C startup code source is now provided in the standard distribution</dd>

          <dt>C32-151:</dt>

          <dd>IPL7 prologue code now sets incorrect bits in status register</dd>
        </dl>
      </div>
    </li>

    <li class="Heading0">
      <h1><a name="Limits" id="Limits">Known Issues</a></h1>

      <p class="c1">The current known issues are as follows.</p>

      <h2>Compiler</h2>

      <dl class="c9">
        <dt>C32-345</dt>

        <dd>The compiler will "terminate in an unusual way" if the Windows TEMP environment variable is set
        to an invalid directory. You can correct your TEMP environment variable in the Windows Control Panel
        (Control Panel -&gt; System -&gt; Advanced -&gt; Environment Variables). TEMP should point to an
        appropriate directory for temporary files.</dd>

        <dt>C32-463</dt>

        <dd>The compiler may terminate with an internal error when a mips16 attributed function is inlined in
        a non-mips16 function or vice versa. This can happen at optimization levels -O2 or -O3. To get around
        this problem, combine the noinline attribute with your mips16 and/or nomips16 function attribute. The
        noinline attribute prevents the function from being inlined into another function of a different ISA
        mode.</dd>
      </dl>

      <h2>Assembler</h2>

      <dl class="c9">
        <dt>BIN32-68</dt>

        <dd>The assembler may emit an error, 'Macro used $at after".set noat"', for a macro/synthesized
        instruction even when the synthesized instruction does not use the $at register. A workaround is to
        replace the macro instruction with the actual instructions.</dd>
      </dl>

      <h2>Linker</h2>

      <dl class="c9">
        <dt>BIN32-58</dt>

        <dd>
          The linker may emit an unfriendly error message when it encounters a case where it cannot switch
          ISA modes between mips16 and mips32 in a function call. The error message is "jump to stub routine
          which is not jal". This condition can occur when a mips32 function's final statement is a call to a
          mips16 function and compiler optimizations are enabled.

          <p>Example:<br>
          <tt>extern void bar (void);<br>
          void foo (void);<br>
          void foo (void)<br>
          {<br>
          &nbsp; &nbsp; bar();<br>
          }</tt><br>
          The file containing <tt>bar()</tt> was compiled with <tt>-mips16</tt> and the file containing
          <tt>foo()</tt> was compiled with <tt>-O2</tt> but not <tt>-mips16</tt>. This means that the call to
          <tt>bar()</tt> must change ISA modes. Also, the call to <tt>bar()</tt> is the last statement in the
          <tt>foo()</tt> function.</p>

          <p>Possible workarounds include</p>

          <ol>
            <li>Use the mips16/nomips16 function attribute to make the caller function and the callee
            function the same ISA mode. Usually, this means applying the <tt>__attribute__((mips16))</tt> or
            <tt>__attribute__((nomips16))</tt> to the caller function to make it match the callee. This
            eliminates the need for a mode switch when calling the function.

              <p>The example above becomes:<br>
              <tt>extern void bar (void);<br>
              void __attribute__((mips16)) foo (void);<br>
              void __attribute__((mips16)) foo (void)<br>
              {<br>
              &nbsp; &nbsp; bar();<br>
              }</tt></p>
            </li>

            <li>If your particular instance of this problem is caused by the tail sibling-call optimization,
            use the <tt>-fno-optimize-sibling-calls</tt> option when compiling the caller function. In MPLAB
            IDE v8.xx, you can add this option to your project's alternate settings. This will prevent the
            compiler converting your 'jal' call into a 'j' branch, which cannot change ISA modes.</li>
          </ol>A future release of the linker will emit a more friendly and useful error message.
        </dd>
      </dl>

      <h2>Libraries and Device-Support Files</h2>

      <dl class="c9">
        <dt>C32-319</dt>

        <dd>
          GenericTypeDefs.h defines common data types (such as BYTE, BOOL, UINT16, etc.) that may conflict
          with definitions in non-Microchip code when using Microchip libraries. When conflicts occur, it
          will cause compilation errors in the Microchip-provided libraries or in the non-Microchip libraries
          (depending on which library first defines the data type).

          <p>Possible workaround:<br>
          Remove conflicting definitions from source code.</p>
        </dd>

        <dt>C32-479</dt>

        <dd>
          When combining the <tt>-fno-short-double</tt> and <tt>-mno-float</tt> compiler options and calling
          a <tt>scanf()</tt> or related function, the linker may emit an error indicating undefined
          references to <tt>_dstrtod</tt> and <tt>strtof</tt>. You are not likely to see this issue because
          combining -fno-short-double, which requests a 64-bit double type, with -mno-float, which disables
          floating-point support, is not common.

          <p>Possible workaround:<br>
          Remove the either the -fno-short-double or -mno-float option.</p>
        </dd>
      </dl>

      <h2>Documentation</h2>

      <div style="display: block;">
        <dl class="c9">
          <dd>
            <h3>MPLAB C Compiler for PIC32 MCUs User's Guide (DS1686B)</h3>
          </dd>

          <dd>Section 5.6 Function Calling Convention - This section states that "The Stack Pointer is always
          aligned on a <strong>4</strong>-byte boundary." This statement is incorrect. The Stack Pointer is
          always aligned on an <strong>8</strong>-byte boundary.</dd>
        </dl>
      </div>
    </li>

    <li class="Heading0">
      <h1><a name="FeatureLimited" id="FeatureLimited">Editions and License Upgrades</a></h1>

      <h2>Standard Evaluation Edition</h2>

      <p class="c1">Microchip provides a <em>free</em> Standard Evaluation edition of the <strong><em>MPLAB C
      Compiler for PIC32 MCUs</em></strong>. The standard evaluation edition of the compiler provides
      <strong>additional functionality for 60 days</strong>. After the evaluation period has expired, the
      compiler becomes reverts to the lite edition, and optimization features associated with levels -O2,
      -O3, and -Os are disabled. In addition, MIPS16 code generation is disabled. The compiler continues to
      accept the -O1 and -O0 optimization levels indefinitely.</p>

      <p class="c1"><strong>Installing the standard evaluation edition</strong> - To install the standard
      evaluation edition of the compiler, run the standard evaluation-edition installer and follow the
      on-screen instructions. If the installer asks for a license key, leave the field blank and
      continue.</p>

      <p class="c1"><strong>Upgrading to a standard-edition license</strong> - For applications requiring
      additional code efficiency, as well as full support via <a target="external" href=
      "http://www.microchip.com/support">http://www.microchip.com/support</a>, users are encouraged to
      upgrade to a full standard-edition compiler license. For further information on upgrading to a full
      standard-edition license (Part Number: SW006015), visit <a target="external" href=
      "http://www.microchipdirect.com/productsearch.aspx?Keywords=SW006015">http://www.microchipdirect.com</a>
      or contact your preferred Microchip distributor.</p>

      <p class="c1">Once you've obtained a standard-edition license key, run the Upgrader tool
      (pic32-upgrader\upgrader.exe) as a Windows administrator. After you enter your license key and press
      the Upgrade button, the license manager should then report the license upgrade status.</p>

      <h2>Lite Edition</h2>

      <p class="c1">Microchip provides a <em>free</em> Lite edition of the <strong><em>MPLAB C Compiler for
      PIC32 MCUs</em></strong> intended for use in projects where code efficiency is not critical. This
      edition of the compiler does not support optimization features associated with levels -O2, -O3, and
      -Os. In addition, this edition does not support MIPS16 code generation.</p>

      <p class="c1"><strong>Upgrading to the standard edition or standard evaluation edition</strong> - To
      take advantage of the advanced optimization and MIPS16 code generation features, you can upgrade to a
      standard edition or a 60-day standard evaluation edition. To upgrade to a full or 60-day standard
      evaluation edition, uninstall the lite edition using the normal Windows Add/Remove Programs feature.
      Next, install the standard edition or the standard evaluation edition by running the appropriate
      installer and following the on-screen instructions.</p>
    </li>

    <li class="Heading0">
      <h1><a name="Support" id="Support">Customer Support</a></h1>

      <p class="c1">Microchip provides online support via our home page at:<br>
      <a target="external" href="http://www.microchip.com">http://www.microchip.com</a></p>

      <p class="c1">Technical support is available through the web site at:<br>
      <a target="external" href="http://www.microchip.com/support">http://www.microchip.com/support</a></p>

      <p class="c1">A forum for discussion of Microchip products and tools is available at:<br>
      <a target="external" href="http://www.microchip.com/forums">http://www.microchip.com/forums</a></p>

      <p class="c1">Microchip PIC32 documentation and product info is available at:<br>
      <a target="external" href="http://www.microchip.com/pic32">http://www.microchip.com/pic32</a></p>

      <p class="c1">MPLAB<sup>&reg;</sup> C Compiler for PIC32 MCUs updates and information are available
      at:<br>
      <a target="external" href="http://www.microchip.com/c32">http://www.microchip.com/c32</a></p>
    </li>
  </ol>
</body>
</html>
