1 Star 0 Fork 39

Blues Jiang/ART-Pi-smart

forked from RT-Thread/ART-Pi-smart 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
smart-env.sh 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
bernard 提交于 2022-06-15 23:42 . Update smart version.
#!/bin/bash
# usage:
# source smart-env.sh [arch]
# example: source smart-env.sh # arm
# example: source smart-env.sh aarch64 # aarch64
# supported arch list
supported_arch="arm aarch64 riscv64 i386"
def_arch="unknown"
# find arch in arch list
if [ -z $1 ]
then
def_arch="arm" # default arch is arm
else
for arch in $supported_arch
do
if [ $arch = $1 ]
then
def_arch=$arch
break
fi
done
fi
# set env
case $def_arch in
"arm")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=arm-linux-musleabi-
cp userapps/configs/def_config_arm userapps/.config
;;
"aarch64")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=aarch64-linux-musleabi-
cp userapps/configs/def_config_aarch64 userapps/.config
;;
"riscv64")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=riscv64-unknown-linux-musl-
;;
"i386")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/i386-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=i386-unknown-linux-musl-
;;
*) echo "unknown arch!"
return 1
esac
# export RTT_EXEC_PATH
export PATH=$PATH:$RTT_EXEC_PATH
echo "Arch => ${def_arch}"
echo "CC => ${RTT_CC}"
echo "PREFIX => ${RTT_CC_PREFIX}"
echo "EXEC_PATH => ${RTT_EXEC_PATH}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/bluesjiang/ART-Pi-smart.git
git@gitee.com:bluesjiang/ART-Pi-smart.git
bluesjiang
ART-Pi-smart
ART-Pi-smart
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385