Release Notes for MPLAB® C Compiler for PIC32 MCUs

v1.10(B)
November 2009

Table of Contents

  1. Overview
  2. GNU General Public License
  3. Devices Supported
  4. Installation
  5. Compiler Documentation
  6. What's New
  7. Migration Issues
  8. Documentation Updates
  9. Fixed Issues
  10. Limitations
  11. Feature-Limited Editions and License Upgrades
  12. Customer Support


  1. Overview

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

    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.

  2. GNU General Public License

    The MPLAB® C Compiler for PIC32 MCUs 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.

    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 COPYING located the docs subdirectory of your install directory. A general discussion of principles underlying the GPL may be found at www.gnu.org/copyleft.

    Support code provided for the header files, linker scripts, and runtime libraries are proprietary code and not covered under the GPL. See the full MPLAB C Compiler for PIC32 MCUs License Agreement for details.

  3. Devices Supported

    The following PIC32MX devices are supported:
    New items for v1.10 in green.

    Part Number Part Number
    PIC32MX320F032H -
    PIC32MX320F064H -
    PIC32MX320F128H PIC32MX320F128L
    PIC32MX340F128H PIC32MX340F128L
    PIC32MX340F256H -
    PIC32MX340F512H -
    - PIC32MX360F256L
    - PIC32MX360F512L
    Part Number Part Number
    PIC32MX420F032H -
    PIC32MX440F128H PIC32MX440F128L
    PIC32MX440F256H -
    PIC32MX440F512H -
    - PIC32MX460F256L
    - PIC32MX460F512L
    Part Number Part Number
    PIC32MX575F256H PIC32MX575F256L
    PIC32MX575F512H PIC32MX575F512L
    PIC32MX675F512H PIC32MX675F512L
    PIC32MX695F512H PIC32MX695F512L
    PIC32MX795F512H PIC32MX795F512L

    The PIC32MXGENERIC device is, as its name implies, a non-specific target that can be used to represent a generic core device.

  4. Installation

    If using MPLAB IDE, be sure to install MPLAB IDE v8.10 or later before installing these tools.

    To install the MPLAB C Compiler for PIC32 MCUs tools, perform the following steps:

    1. Locate the setup program on the 'MPLAB C Compiler for PIC32 MCUs' CD ROM.
    2. Run the setup program.
    3. 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.
    4. If the installation program indicates that it is necessary, reboot your computer to complete the installation.
    5. 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\MPLAB C32, then ensure that c:\Program Files\Microchip\MPLAB C32\bin has been added to your PATH. On some systems, the default path is c:\Program Files\Microchip\MPLAB C32 Suite.).

      From a Windows command prompt (cmd.exe), type: c:\>PATH

    To upgrade to a full standard-edition license from a lite or standard -evaluation edition license, follow the steps described in this section.

  5. Compiler Documentation

    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 Microchip's website for the latest revisions.

    Additional documentation on the GNU Assembler and Linker is available on the GNU Binutils website.

  6. What's New

    New Features in v1.10

    • Compiler licenses renamed -- The feature-limited compiler licenses have been renamed. The academic version is now the MPLAB C Compiler for PIC32 MCUs Lite edition. The evaluation version is now the MPLAB C Compiler for PIC32 MCUs Standard Evaluation edition. The full version is now the MPLAB C Compiler for PIC32 MCUs Standard edition (Part Number: SW006015). This is a name change only. See this section for more information on the features available for each edition.

    • Smart I/O -- This release introduces a new -msmart-io=[0|1|2] command-line option. This feature attempts to statically analyze format strings passed to printf, scanf, 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.

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

    • Interrupt Context-Saving Improvements -- New PIC32 devices introduced in this release (5XX, 6XX, 7XX) 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, __attribute__((interrupt([IPLn[AUTO|SOFT|SRS]]))), where n is in the range of 0..7, inclusive.

      NOTE: 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.

      Read More...

    • APPIN/APPOUT Debugging Support -- New PIC32 devices being introduced in v1.10 (5XX, 6XX, 7XX) 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 MPLAB REAL ICE emulator or an MPLAB ICD 3 debugger.

      Read More...

    • Stack Limit symbol in built-in linker script -- 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.

      Read More...

    • Predefined macro for Feature Set -- 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.

      Read More...

    New Features in v1.05

  7. New Features in v1.04

    New Features in v1.03

  8. Migration Issues

    The following changes may affect migration from older versions of the compiler.

    Migrating to Version v1.10

    • Interrupt context saving
      • IPL specifier -- 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.

        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.

        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.
          void __attribute__((interrupt(), vector(1))) myISR1 (void)) { /* code */ }
          void __ISR(_CORE_SOFTWARE_0_VECTOR) CoreSoftwareInt0Handler(void) { /* code */ }

        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:

        #pragma interrupt foo ipl3 vector 4
        void foo (void) { /* code */ }
        
        becomes
        void __attribute__((interrupt(), vector(4))) foo (void) { /* code */ }
        
    • STDIO
      • BUFSIZ -- 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.
      • STDOUT_BUFSIZ -- 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.
    • Device support
      • PIC32MX4xx devices -- 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.
    • Documentation
      • Peripheral Library documentation now provided as a help file -- 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.

    Migrating to Version v1.05

    Migrating to Version v1.04

    Migrating to Version v1.03

    Migrating to Version v1.02

  9. Documentation Updates

    Library documentation updates

    This section describes pending updates to the MPLAB® 32-Bit Language Tools Libraries documentation. These changes will be incorporated into the next full revision of the documents.

    Compiler documentation updates

    This section describes pending updates to the MPLAB C Compiler for PIC32 documentation. These changes will be incorporated into the next full revision of the documents.

  10. Fixed Issues

    The following issues have been resolved in this release

    Fixed in v1.10

    C32-267:
    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. printf("%010.2f",foo); )
    C32-266:
    A 'naked' attributed function containing a function call no longer causes a compiler crash when building with optimizations enabled.
    C32-252:
    The SoftReset() peripheral library function now works correctly on devices that do not use DMA, such as the PIC32MX320F032H.
    C32-224:
    In stdlib.h, MB_CUR_MAX is now correctly defined as 1.
    DAYHLD-10:
    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.

    Fixed in v1.05

    Fixed in v1.04

    Fixed in v1.03

    Fixed in v1.02

  11. Limitations

    The current limitations are as follows.

    Compiler

    No significant issues reported.

    Assembler

    No significant issues reported.

  12. Feature-Limited Editions and License Upgrades

    Time-Limited Standard Evaluation Edition

    Feature Limitations - Microchip provides a free time-limited Standard Evaluation edition of the MPLAB C Compiler for PIC32 MCUs. The standard evaluation edition of the compiler provides full functionality for 60 days. After the evaluation period has expired, the compiler becomes feature limited, 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.

    Installing the standard evaluation edition - To install the time-limited 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.

    Upgrading to a standard-edition license - For applications requiring additional code efficiency, as well as full support via http://support.microchip.com, 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 http://www.microchipdirect.com or contact your preferred Microchip distributor.

    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.

    Lite Edition

    Feature Limitations - Microchip provides a free Lite edition of the MPLAB C Compiler for PIC32 MCUs 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.

    Upgrading to the standard edition or standard evaluation edition - 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.

  13. Customer Support

    Microchip provides online support via our home page at:
    http://www.microchip.com

    Technical support is available through the web site at:
    http://support.microchip.com

    A forum for discussion of Microchip products and tools is available at:
    http://forum.microchip.com

    Microchip PIC32 documentation and product info is available at:
    http://www.microchip.com/pic32

    MPLAB® C Compiler for PIC32 MCUs updates and information are available at:
    http://www.microchip.com/c32