Skip to content

Instantly share code, notes, and snippets.

@linknum23
Last active July 2, 2018 17:59
Show Gist options
  • Save linknum23/1c2a46667cefbc11daba2e97523144c7 to your computer and use it in GitHub Desktop.
Save linknum23/1c2a46667cefbc11daba2e97523144c7 to your computer and use it in GitHub Desktop.
upgrade microchip x32 peripheral libraries without peripheral libraries executable ( assumes 1.40 is installed and has peripheral libraries )
#!/bin/bash
read -p "compiler version: " version
if [ ! -e /opt/microchip/xc32/v$version ] ; then
echo "directory /opt/microchip/xc32/v$version not found"
echo "not an installed version"
return 2>/dev/null || exit
fi
mkdir -p /opt/microchip/xc32/v${version}/pic32-libs/include/lega-c
cp -v -a /opt/microchip/xc32/v1.40/pic32-libs/peripheral /opt/microchip/xc32/v${version}/pic32-libs/
cp -v /opt/microchip/xc32/v1.40/pic32-libs/include/plib.h /opt/microchip/xc32/v${version}/pic32-libs/include/
cp -v /opt/microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h /opt/microchip/xc32/v${version}/pic32-libs/include/lega-c/
cp -v /opt/microchip/xc32/v1.40/pic32mx/include/plib.h /opt/microchip/xc32/v${version}/pic32mx/include/
cp -v /opt/microchip/xc32/v1.40/pic32mx/include/lega-c/plib.h /opt/microchip/xc32/v${version}/pic32mx/include/lega-c/
cp -v -a /opt/microchip/xc32/v1.40/pic32mx/include/peripheral /opt/microchip/xc32/v${version}/pic32mx/include/
@linknum23
Copy link
Author

TODO: this did not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment