1 Star 0 Fork 0

yangwu / rtenv-in-docker

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
analyzer_in.sh 1.16 KB
Copy Edit Web IDE Raw Blame History
yangwu authored 2020-03-31 23:46 . already working
#!/bin/bash
# assume rt-thread source code is in
if [ -z "$RTT_ROOT" ]
then
echo "(You may set RTT_ROOT environment variable to avoid asking.)"
echo Where is the RTT_ROOT in HOST env:
read RTT_ROOT
fi
# docker need absolute path
if [ `uname` = Darwin ]; then
RTT_ROOT=$(grealpath "$RTT_ROOT")
else
RTT_ROOT=$(realpath "$RTT_ROOT")
fi
if [ -z "$RTT_BSP" ]
then
echo "(You may set RTT_BSP environment variable to avoid asking.)"
echo "(If your bsp is outside the RTT_ROOT, modify docker run cmd to map it under.)"
echo Where is the BSP relative to RTT_ROOT:
read RTT_BSP
fi
# For your reference
#TOOLCHAIN=/opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin
#TOOLCHAIN=/opt/gcc/gcc-arm-none-eabi-5_4-2016q3/bin
# -v `pwd`/scripts:/home/rtt/ \
# -v `pwd`/gcc:/opt/gcc \
# -e RTT_EXEC_PATH=$TOOLCHAIN \
# scan-view-9 default on localhost:8181
docker run --name rtenv --rm -it --privileged \
-p 8181:8181 \
-v $RTT_ROOT:/home/rtt/rt-thread \
pinxue/rtenv:clang6_opt_gcc \
bash -c "cd rt-thread/$RTT_BSP && scan-build -v -v -v -o build/clang-analyzer-report --use-cc=arm-none-eabi-gcc --use-c++=arm-none-eabi-g++ scons --clang-analyzer $1 $2 $3 $4 $5 $6 $7 $8 $9"

Comment ( 0 )

Sign in for post a comment

Shell
1
https://git.oschina.net/kongfu_yang/rtenv-in-docker.git
git@git.oschina.net:kongfu_yang/rtenv-in-docker.git
kongfu_yang
rtenv-in-docker
rtenv-in-docker
master

Search