添加RT-Thread相关环境变量,若有条件,支持RT-Thread使用scons编译

This commit is contained in:
HEYAHONG 2025-01-28 18:35:27 +08:00
parent 07ab9a7216
commit 469c9b6b0a
No known key found for this signature in database
GPG Key ID: 97E3E469FE2C920B
3 changed files with 34 additions and 0 deletions

View File

@ -104,6 +104,22 @@ cutecom-ng是一个基于Qt的串口工具,可用于串口调试。
注2:所有环境变量在cmd中可使用`set`查看在Linux或者MSYS2中可使用`env`查看。
## 第三方环境变量
### RT-Thread
当环境中有arm-none-eabi-gcc时可设置相关环境变量(由BSP支持)支持scons直接编译。
| 名称 | 说明 | 备注 |
| :------------ | :------------------------ | :----------------------- |
| RTT_CC | RT-Thread C编译器工具名称 | 由BSP中rtconfig.py使用。 |
| RTT_EXEC_PATH | RT-Thread 可执行程序路径 | 由BSP中rtconfig.py使用。 |
以上环境变量通常在以下环境有效:
- Linux
- MSYS2
# 脚本说明
## Windows

View File

@ -95,6 +95,15 @@ then
then
. "${HENVBOX_TOOLS_PATH}/${HENVBOX_TOOLS_TYPE}/config.sh"
fi
#RT-Thread 相关环境变量
which arm-none-eabi-gcc 2> /dev/null >/dev/null
[ $? -ne 0 ] || export RTT_CC=gcc
if [ -n "${RTT_CC}" ]
then
export RTT_EXEC_PATH=`which arm-none-eabi-gcc | xargs dirname`
fi
else
echo 无法完成HEnvBox配置!
fi

View File

@ -24,3 +24,12 @@ if [ -f "${HENVBOX_TOOLS_PATH}/../common/export.sh" ]
then
. "${HENVBOX_TOOLS_PATH}/../common/export.sh"
fi
#RT-Thread 相关环境变量
which arm-none-eabi-gcc 2> /dev/null >/dev/null
[ $? -ne 0 ] || export RTT_CC=gcc
if [ -n "${RTT_CC}" ]
then
export RTT_EXEC_PATH=`which arm-none-eabi-gcc | xargs dirname`
fi