Netcruzer Library API  V2.03
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Building Projects

Introduction

All source code for Netcruzer boards is available for free, and can be downloaded via the Netcruzer Download.

For pre build binary versions of the latest firmware, click here.

Required Software

All firmware and projects can be built with free software tools available from Microchip. The Netcruzer Download contains MPLAB X projects, that can be built using MPLAB X and a free version of the XC16 Compiler. The MPLAB X IDE has a fantastic code editor, and is based on the Netbeans IDE. Both these tools can be downloaded for free, and is all that is required to build Netcruzer projects.

Building the project

After downloading and installing MPLAB X IDE, and the XC16 Compiler, open the desired project from within MPLAB X. All Netcruzer projects have a "MPLAB.X" folder, which contains the MPLAB X IDE project. From within MPLAB X IDE, select <File><Open Project> from the menu, and navigate to this folder to open the project.

All MPLAB X projects have configurations for different target boards. The desired configuration is set in the toolbar menu (top left) via a combo box. The name of the configuration describes the compiler, target board, and board revision the code will be built for. For example, to build a project for the SBC66EC Revision 2 board, using the XC16 compiler, select "XC16-SBC66EC-R2" (or similar name). Next, click "Build All" on the toolbar. This will create a hex file that can be uploaded to the selected Netcruzer board as described here.

Compiling projects for use with the USB Bootloader

By default, all MPLAB projects have been configured to build a hex file that is suitable for uploading to Netcruzer boards using the Netcruzer USB Bootloader, or a PIC programmer. Nothing has to be changed! This section contains details of how this is done.

To generated this type of hex file, a special linker script is included in the MPLAB X project. The required linker scripts are located in the ".../src/netcruzer/linker_files" folder of the Netcruzer Download. The files starting with "app_hid_boot_" have to be used. For example, to compile code for the SBC66EC board, the "app_hid_boot_p24FJ256GB206.gld" linker file must be used. The SBC66EC uses the PIC24FJ256GB206 Microcontroller.

When building a project for a board with a bootloader, it basically means that in stead of starting from address 0, the code starts from address 0x1C00. The bootloader lives in the code space 0x0 to 0x1BFF.

Because of the way the bootloader is implemented, the generated hex files can also be uploaded to the board using a PIC programmer, and programming it as normal from address 0. Doing this will of course erase the Netcruzer Bootloader that was located in the Microcontroller at address 0x0 to 0x1BFF. The bootloader can be restored using a PIC programmer, and is available here. For normal users it is recommended only using the Netcruzer USB Bootloader to update the firmware.

Compiled projects included in download

Compiled (binary) versions of firmware and projects are contained in the "./bin" folder of the Netcruzer Download.