2.4.2 Define the Compiler Settings
To build at91bootstrap, we will use the XC32 toolchain, Microchip’s official C/C++ compiler suite for 32-bit MPU devices. The XC32 toolchain is fully supported within MPLAB X IDE and is based on the GNU Arm Embedded Toolchain, making it compatible with the build system used by at91bootstrap. Using XC32 ensures proper integration with the IDE, simplifies configuration, and provides a consistent toolset for compiling and debugging bootloader code for the SAM9X60-Curiosity board.
Select the XC32 compiler to build the at91bootstrap project by defining the CROSS_COMPILE environment variable as follows:
CROSS_COMPILE=<install_path>/xc32/<version>/bin/bin/pic32c-
Go to Project→ Properties→ Makefile. Copy the XC32 installation path and update it in the Build, Debug, and Clean command fields. Then click Apply→ OK.
Examples:
Build/Debug build command:
make CROSS_COMPILE=<install_path>/xc32/<version>/bin/bin/pic32c-
Clean command:
make mplabclean CROSS_COMPILE=<install_path>/xc32/<version>/bin/bin/pic32c-
