Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

1.6.3.2.3.1.5 XC8 Compiler
Discusses using the XC8 compiler with the USB boot loader.
Description
1.6.3.2.3.1.5.1 Optimization Mode Requirements
Discusses compiler optimization requirements for using the USB boot loader.
Description
The currently implemented bootloader firmware may be built with the XC8 compiler v1.21 or later (in PRO mode), for both
PIC16 and PIC18 devices.
On PIC16 targets this bootloader firmware is intended to occupy the program memory region 0x000-0x8FF (14-bit word
addresses). The application firmware is supposed to occupy the 0x900-[end of flash] region of program memory.
On PIC18 targets, the bootloader firmware occupies the 0x000-0xFFF program memory region, while the application
firmware image is supposed to occupy the 0x1000-[end of flash] region of program memory.
In order to fit within the 0x000-0x8FF (or 0x000-0xFFF for PIC18) region, this bootloader project must be built with the PRO
mode optimizations enabled. If you attempt to build the bootloader firmware in either the Free or Standard modes, the code
size required for the bootloader firmware will likely be too large to fit within the reserved space for the bootloader, resulting in
one or more linker errors (with text typically referring to “cannot find space” for “such and such” section name).
It is therefore recommended to use the bootloader with the fully licensed PRO version of the XC8 compiler. If however a free
or standard version of the compiler must be used, it is potentially possible to move the bootloader/application program space
boundary. If this will be attempted, please see the Changing the Memory Footprint section.
1.6.3.2.3.1.5.2 Linking Options for PIC16 Devices
Link option modifications that are required for using XC8 on PIC16 devices for the USB boot loader.
Description
If the application firmware project needs to be programmable by this bootloader firmware, there are two linker setting
changes that are required to the application project:
1) Under the build configuration > XC8 global options > XC8 linker > Option categories: Additional options, the “Codeoffset”
must be set to 0x900
1.6 Demos MLA - USB Library Help Device - Boot Loader - HID
254

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh