Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion install_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@ if ! [ -x "$(command -v scons)" ]; then
$RTT_PYTHON -m pip install scons
fi

./touch_env.sh
if ! [ -x "$(command -v arm-none-eabi-gcc)" ]; then
echo "Installing GNU Arm Embedded Toolchain."
brew install gnu-arm-embedded
fi

export RTT_EXEC_PATH=/usr/bin # set the default tool chain path
url=https://raw.githubusercontent.com/RT-Thread/env/master/touch_env.sh
if [ $1 ] && [ $1 = --gitee ]; then
url=https://gitee.com/RT-Thread-Mirror/env/raw/master/touch_env.sh
fi
curl $url -o touch_env.sh
chmod 777 touch_env.sh
./touch_env.sh $@
11 changes: 7 additions & 4 deletions install_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ $RTT_PYTHON -m pip list > /dev/null || {
sudo apt update
sudo apt upgrade -y

sudo apt install gcc git libncurses5-dev scons gcc-arm-none-eabi binutils-arm-none-eabi qemu qemu-system-arm -y
sudo apt install gcc git libncurses5-dev scons gcc-arm-none-eabi binutils-arm-none-eabi gdb-multiarch qemu qemu-system-arm -y

export RTT_EXEC_PATH=/usr/bin # set the default tool chain path

wget https://raw.githubusercontent.com/RT-Thread/env/master/touch_env.sh -O touch_env.sh
url=https://raw.githubusercontent.com/RT-Thread/env/master/touch_env.sh
if [ $1 ] && [ $1 = --gitee ]; then
url=https://gitee.com/RT-Thread-Mirror/env/raw/master/touch_env.sh
fi
wget $url -O touch_env.sh
chmod 777 touch_env.sh
./touch_env.sh
./touch_env.sh $@
17 changes: 15 additions & 2 deletions touch_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
DEFAULT_RTT_PACKAGE_URL=https://github.com/RT-Thread/packages.git
# you can change the package url by defining RTT_PACKAGE_URL, ex:
# export RTT_PACKAGE_URL=https://github.com/Varanda-Labs/packages.git
RTT_URL=https://github.com/RT-Thread/rt-thread.git
ENV_URL=https://github.com/RT-Thread/env.git

if [ $1 ] && [ $1 = --gitee ]; then
gitee=1
DEFAULT_RTT_PACKAGE_URL=https://gitee.com/RT-Thread-Mirror/packages.git
RTT_URL=https://gitee.com/rtthread/rt-thread.git
ENV_URL=https://gitee.com/RT-Thread-Mirror/env.git
fi

env_dir=$HOME/.env
if ! [ -d $env_dir ]; then
Expand All @@ -13,12 +22,16 @@ if ! [ -d $env_dir ]; then
mkdir $env_dir/tools
git clone $package_url $env_dir/packages/packages
echo 'source "$PKGS_DIR/packages/Kconfig"' > $env_dir/packages/Kconfig
git clone https://github.com/RT-Thread/env.git $env_dir/tools/scripts
git clone $ENV_URL $env_dir/tools/scripts
echo 'export PATH=$HOME/.env/tools/scripts:$PATH' > $env_dir/env.sh
fi

RTT_ROOT=$HOME/rt-thread
# you can download rt-thread to another directory by changing RTT_ROOT
if ! [ -d $RTT_ROOT ]; then
git clone https://github.com/RT-Thread/rt-thread.git $RTT_ROOT
git clone $RTT_URL $RTT_ROOT
if [ $gitee ]; then
cd $RTT_ROOT
git checkout master
fi
fi