1 What is the MPLAB® Code Configurator 16-Bit Bootloader Library?

MCC 16-bit Bootloader allows customers to configure and use the bootloader and the application associated with the bootloader. This library allows user to configure:

  1. Bootloader firmware: The bootloader is firmware that first runs when the device comes out of reset. It verifies that the application on the device is valid before running the application. The bootloader may also check for a signal to update the firmware. This could be as simple as checking the value of a GPIO pin or checking for a specific type of traffic on the UART indicating that there is new application firmware to needs to be installed.
  2. Application firmware: The application is what runs after the bootloader has executed.
  3. Unified Bootloader Host Application: A PC utility to transfer the new application firmware from an external PC or device to the targeted device. This could be over a UART, USB, SPI or other port. This release only supports the UART interface. (Refer to 16-bit Bootloader from https://www.microchip.com/16-bit-bootloader )

1.1 Operating Environment

  1. MPLAB® X IDE 6.05 or later
  2. PIC24-dsPIC33-PIC32MM Library Version 1.169.2 or later for Classic mode
  3. Melody Version 2.3.1 or later for Melody mode
  4. MPLAB® Compiler
    1. MPLAB® XC16 Compiler 2.00 or later with MPLAB® X IDE 6.05 or later
    2. MPLAB® XC-DSC Compiler 3.00 or later with MPLAB® X IDE 6.15 or later
  5. MPLAB® Code Configurator Plugin Version 5.4.14 or later
  6. Unified Bootloader Host Application 1.19.0 or later

1.2 Installing the MPLAB® Code Configurator 16-Bit Bootloader Library

MPLAB® Code Configurator needs to be installed as below.

To install MPLAB® Code Configurator

  1. In the MPLAB® X IDE, select Plugins from the Tools menu
  2. Select the Available Plugins tab
  3. Check the box for the MPLAB® Code Configurator, and click on Install

To install and load different library version when connected to internet

  1. Open MPLAB® Code Configurator
  2. In the Versions tab under PIC24\dsPIC33\PIC32MM MCUs or 16-bit Bootloader will find the multiple library version (loaded version is indicated by the green dot)
  3. Right Click on the required version of the library as specified in System Requirements and select Mark for load
  4. Click on Load Selected Libraries button to load the library

To install the 16-bit Bootloader when not connected to internet

  1. In the MPLAB® X IDE, select Options from the Tools menu
  2. Select Plugins tab
  3. Click on Install Library
  4. Add the required version(s) of the library as specified in the System Requirements.

1.3 What's New?

1.25.0

  • Fix Checksum alignment for larger devices
  • Fix error in private ECDSA key .pem file - missing public key compression field
  • Improve post build commands for Linux
  • Remove commented out code in boot_verify_not_blank.c
  • Remove unused variables in boot_process.c
  • Add notification for unused memory space in the bootloader
  • Add warning when the bootloader size is less than the minimum size required
  • Update postBuild files to compile with MPLAB® XC-DSC 3.00 compiler
  • Move help documentation and release notes to SDL online documentation database

1.24.0

  • Fix error where auto-sign radio button in the application did not re-load properly after MCC reset
  • Fix error where notifications did not re-populate after MCC reset in Classic mode
  • Add support and associated documentation for CAN-TP communication
  • Add hex file warning in output window when building in debug mode
  • Improve readability of post-build files
  • Remove extraneous Hexmate warnings for Checksum, CRC32, and SHA256 verification schemes
  • Update post-build step to be more OS independent
  • Remove temporary files in ECDSA post-build
  • Update boot_image.h to be more dynamic

1.23.0

  • Fix error where the bootloader would not build when CodeProtect was disabled and ECDSA verification was selected.
  • Fix error where the bootloader "Load Flash Memory Module" notification appears when flash is already loaded.
  • Fix error where an invalid section in the configuration flash page was generated on devices that do not have configuration data.
  • Fix issue where the application memory overlapped with the bootloader memory, resulting in a linker error.
  • Automatically add linker commands when CodeGuard is enabled.
  • Automate the setting of post-build commands when a build script is required.
  • Add support for custom post-build commands in addition to default commands when Checksum, CRC, SHA, or ECDSA is selected.
  • Add support for TA100 and handle ID key storage.
  • Add ability for the bootloader to determine available public key storage locations based on the currently selected secure element.

1.22.1

  • Fix include path to allow bootloader to work with CryptoAuthentication Library versions 3.3.3 and later.

1.22.0

  • Add ECDSA support for Melody devices.

1.21.0

  • Fix issue where space in path name of project could cause post build script failures.
  • Switch Melody mode support from UART peripheral library (PLIB) to UART driver allowing customers to customize the UART properties in the UART driver.

1.20.0

  • Fix an issue where an odd aligned result buffer would cause an address error exception for SHA or ECDSA verifications.
  • Adds support for Melody mode with the below limitations when compared to the Classic mode. These limitations will be resolved in later releases.
    • No support for ECDSA verification.
    • No support for configuring the UART settings via the MCC UI. A default of 9600 baud is used. Users must manually edit the baud rate in the UART firmware files after they are generated.

1.19.1

  • Fix error where estimated verification time would not update when system clock was updated
  • Fix error where estimated verification time would not update when verification range was updated
  • Fix errors in scripts that prevented them from working on Linux/Mac operation systems correctly
  • Fix issue that prevented applications larger than address 0xFFFF to be loaded corrected
  • Fix issue where ECDSA signature was being injected into the wrong flash location by scripts when the CodeGuard(tm) Flash Security Module was enabled
  • Fix issue where verification end address was allowed to be outside of the application end address
  • Update path fields in UI to show paths based on the users current OS path delimiters rather than the path delimiters of the OS that created the project

1.19.0

  • Add support for multiple application images stored in memory.
  • Add support for using ATECC608 key storage slots for ECDSA verification via the ATECC608
  • Add support for expanded application header. Includes default support for a semantic versioning (semver) based version number.

1.18.4

  • Fix link error when SHA or ECDSA verification used in projects that use a lot of RAM
  • Fix error that prevented from successfully loading applications larger than 64KB in flash
  • Fix error that prevented loading last available word in the last available page of memory
  • Fix incorrect error code returned on a bad address
  • Fix issue where undo-redo does not update the notifications/warnings properly
  • General usability improvements

1.18.3

  • Add the ability for the Bootloader to optionally verify that the application image is correct and authentic using elliptical curve digital signature algorithm (ECDSA) via the ATECC608 secure element.
  • Add support for the CodeGuard Flash Security Module in the bootloader. This allows devices with this module to configure the boot segment as a read-only section of memory to protect the bootloader from modification.

1.4 Known Issues

ID Description Workaround
CC16BOOT-4027 Bootloader project does not build correctly on dual-core devices. It gives a linking error message to the effect of: "unresolvable symbol `__program_secondary' referenced in expression" If the issue is seen on the version of the compiler in use, then use the following steps to work around the issue:
  1. Locate the linker file for the device in use and copy it into the top level folder of your MPLAB X project. Linker files can be found in the compiler folder. For example, the location of the linker file for the dsPIC33CH512MP506 on a Windows machine might be C:\Program Files\Microchip\xc16\v2.00\support\dsPIC33C\gld\p33CH512MP506.gld. NOTE to get the one that DOES NOT end with "S1". The *S1.gld is the linker file for the secondary core.
  2. Open the copy of the linker file that is now located in your project folder and scroll to the very bottom of the file. At the bottom you will find the following lines:
    #if __XC16_VERSION__ >= 1070
        __program_slave = __program_secondary;
        __stop_slave = __stop_secondary;
    #endif
    Comment out or delete these lines.
CC16BOOT-5048 The MCC 16-bit Bootloader is not compatible with MCC Core version 5.5.0 affecting automatic signature generation for Bootloader Application users that are attempting to call a signing tool to sign their application. Use MCC Core Version 5.5.1 or greater. Users of MCC Core Version 5.4.14 or earlier will remain unaffected.
CC16BOOT-4806 The MCC 16-bit Bootloader is not compatible with HexMate version 2.41. There is an error with the post-build step stating it cannot determine start address. Use HexMate version 2.42 or greater. Users of earlier versions of HexMate should remain unaffected.
CC16BOOT-6398 An application project may have issues working with interrupt functions defined with a “weak” attribute. By default, the ADC and PWM modules in MCC generate using a “weak” attribute on their interrupt handlers. In this case, the interrupt may go to the interrupt handler or the default interrupt handler depending on the link order of the files in the project. There are two methods of working around this issue.
  1. Remove the keyword “weak” from all interrupt handlers in the application project. Search for the keyword “__interrupt__” and verify that none of the defined handler functions also has the “weak” attribute set.
  2. Create a custom linker script for the application project and remove the hardware_interrupt_table.S, interrupt.S, and user_interrupt_table.S. This custom linker file will need to define:
    1. An entry at the reset vector that directs the code flow to the application reset vector.
    2. A table that redirects all of the hardware IVT/AIVT entries to the remapped interrupt table in the application.
    3. An interrupt remapping table at the interrupt remapping table address with an entry for each interrupt forwarded and a “GOTO __interrupt_Handler” in each entry if the interrupt handler is defined or a “GOTO __DefaultInterruptHandler” when the interrupt handler function is not defined.
The specifics in how to create such a linker file is beyond the scope of this documentation. The 1st workaround is the suggested workaround where possible. If the 1st workaround is not possible, please contact Microchip support if required for an example in how to create these linker files. Please reference the associated issue number in the support ticket to ensure that it is directed to the correct team.
CC16BOOT-6411, CCSCRIP-5195 The MCC 16-bit Bootloader version 1.25.0 and lower is not compatible with MCC Melody Core version 2.7.0. This version of the MCC Melody Core causes the 16-bit Bootloader:Bootloader library to hang during loading in MCC and will prevent the 16-bit Bootloader:Application library from generating code. Use MCC Melody Core version 2.7.1 or greater. Users of earlier version of MCC Melody Core should remain unaffected.

1.5 FAQ

For frequently asked questions, please refer to the FAQ post on the (MCC Forum)

1.6 Related Hardware and Documentation Support

Microchip Web Site

Microchip provides online support via our web site at http://www.microchip.com. This web site is used to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information:

  • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software
  • General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups/forums (http://forum.microchip.com), Microchip consultant program member listing
  • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives

Additional Support

Users of Microchip products can receive assistance through several channels:

  • Distributor or Representative
  • Local Sales Office
  • Field Application Engineering (FAE)
  • Technical Support

Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is available on our web site.

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