Disregard my previous scripts (unless they decide to remove the -mafrlcsj option in later builds).
There are several advantages to using the scripts, though-
1. you do not need the specs file and global option for every project (even though minimal)
2. xclm is not called every time you compile- which may mean a speedup if you compile lots of files
(XC16 does not call get_license when -mafrlcsj is set, and XC32 does not exec xclm if mchp_pic32_license_valid is already set)
In my setup at least, MPLABX is fussy about the xc include file- if I use any global option, MPLABX loses its ability to view include file symbols (cannot find include file <xc.h> error), although it compiles fine. So, when using the -scripts= global option, half the words in the c file get highlighted in red. With the script mods, it works fine as no global option is required.
For the Windows user, the specs method is easist because the command line tools in Windows are horrible compared to linux.
I have several more ways (how many do you want? tell me when to quit)
another option for XC32-
tools- options- embedded- build tools- Toolchain- select compiler
C Compiler - /opt/microchip/xc32/v1.44/bin/xc32-gcc
add another /bin in that line like so-
C Compiler - /opt/microchip/xc32/v1.44/bin/bin/xc32-gcc
(also do for xc32-g++ if using c++)
then add the -mafrlcsj global option to the project
this bypasses the xc32-gcc that is blocking the -mafrlcsj option (and then calling bin/xc32-gcc with the modified options)
(note- the new compiler path may not take effect right away, seems to lag to some degree)