25 lines
744 B
Bash
25 lines
744 B
Bash
function check_rustup {
|
|
if type rustup >/dev/null; then
|
|
rustup --version
|
|
echo "rustup is installed!"
|
|
return 0
|
|
else
|
|
echo "rustup not found"
|
|
echo "starting to install rustup.."
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
return 4
|
|
fi
|
|
}
|
|
|
|
check_rustup
|
|
echo "updateing rustup.."
|
|
rustup update
|
|
echo "installing llvm-tools.."
|
|
rustup component add llvm-tools
|
|
rustup component add rustfmt
|
|
#rustup target add thumbv6m-none-eabi # Cortex-M0 and Cortex-M0+
|
|
#rustup target add thumbv7m-none-eabi # Cortex-M3
|
|
#rustup target add thumbv7em-none-eabi # Cortex-M4 and Cortex-M7 (no FPU)
|
|
#rustup target add thumbv7em-none-eabihf # Cortex-M4F and Cortex-M7F (with FPU)
|
|
|