-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup_sdk.sh
executable file
·26 lines (23 loc) · 1.27 KB
/
setup_sdk.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#
# project toolchain setup
# Copyright (C) 2022 YuzukiTsuru <[email protected]>. All rights reserved.
#
echo '=======================Setup Toolchain======================='
rm -rf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 -O gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
echo '=======================Unarchive Toolchain======================='
echo '=======================Please Wait======================='
tar jxf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
rm -rf tools/gcc-arm-none-eabi-10.3-2021.07
rm -rf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
echo '=======================Add Toolchain======================='
mv gcc-arm-none-eabi-10.3-2021.07/ tools/
echo '=======================Add Toolchain path======================='
cp gcc.mk.in gcc.mk
sed -i 's/~\/tools\/gcc-arm-none-eabi-8-2019-q3-update\/bin/#REPLACE-WITH-PATH\/tools\/gcc-arm-none-eabi-10.3-2021.07\/bin/g' gcc.mk
sed -i 's?#REPLACE-WITH-PATH?'`pwd`'?' gcc.mk
echo '=======================Set Tools======================='
chmod 777 tools/mkimage
chmod 777 tools/phoenixMC
echo '=======================ALL Done!======================='