1 Star 1 Fork 2

江湖个人/DoST

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
compile 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
ytulinjiajun 提交于 2018-01-30 13:22 . 第一次提交
#!/bin/bash
export PATH=$PATH:$PWD/core/gcc-arm-none-eabi-6-2017-q2-update/bin
if [ $# == 0 ]; then
if [ -d _builds/Release ]; then
echo "You are keepping to compile at last time!"
else
echo "Hello friends, my name is DoST, Welcome to enjoy to debug of ST ^_^"
echo "As firt compile project, you need to tell me ID about ST product"
echo "Example: STM32F407ZGT6"
read -p "Input ST's product ID: (Enter, STM32F407ZGT6 is a default select)" ST_ID
if [ -z $ST_ID ]; then
echo "You need to input ST's product identification, we have detect that you type Enter,so, STM32F407ZGT6 wil be choice"
ST_ID=STM32F407ZGT6
fi
cmake -C.dost.conf/dost_system_config.cmake -H. -B_builds/Release -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSTM32_CHIP=$ST_ID -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DSHOW_CORE_MESSAGE=TRUE
fi
elif [ $# == 1 ]; then
if [ $1 == "-r" ]; then
rm -rf _builds/Release
echo "Hello friends, my name is DoST, Welcome to enjoy to compile of ST ^_^"
echo "As firt compile project, you need to tell me ID about ST product"
echo "Example: STM32F407ZGT6"
read -p "Input ST's product ID: (Enter, STM32F407ZGT6 is a default select)" ST_ID
if [ -z $ST_ID ]; then
echo "You need to input ST's product identification, we have detect that you type Enter,so, STM32F407ZGT6 wil be choice"
ST_ID=STM32F407ZGT6
fi
cmake -C.dost.conf/dost_system_config.cmake -H. -B_builds/Release -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSTM32_CHIP=$ST_ID -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DSHOW_CORE_MESSAGE=TRUE
rc -J $PWD/_builds/Release/compile_commands.json
else
echo "invalid param" && exit 0
fi
else
echo "illegal parament list!" && exit 0
fi
make -C _builds/Release
make -C _builds/Release $ST_ID.bin
make -C _builds/Release $ST_ID.hex
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jzffzj/DoST.git
git@gitee.com:jzffzj/DoST.git
jzffzj
DoST
DoST
master

搜索帮助