bluetoothlover_doc
bluetoothlover_doc copied to clipboard
RT-THREAD scons命令汇总
参考链接 https://www.rt-thread.org/document/site/#/development-tools/build-config-system/SCons
scons --target=cmake
Scons --target=makefile
Avaible targets: mdk, mdk4, mdk5, iar, vs, vs2012, vsc, cb, ua, cdk, makefile, eclipse, ses, cmake, cmake-armclang, xmake, codelite, esp-idf, zig
scons --verbose
使用指令 scons --buildlib=xxx,其中 xxx 为 Group 的名字。
Local Options:
--dist make distribution
--dist-ide, --dist-rtstudio
make distribution for RT-Thread Studio IDE
--project-path=PROJECT-PATH
set project output path
--project-name=PROJECT-NAME
set project name
--cscope Build Cscope cross reference database. Requires cscope installed.
--clang-analyzer Perform static analyze with Clang-analyzer. Requires Clang installed.It is recommended to use with scan-build like this:`scan-build scons --clang-analyzer`If things goes well, scan-build will instruct you to
invoke scan-view.
--buildlib=BUILDLIB building library of a component
--cleanlib clean up the library by --buildlib
--target=TARGET set target project: mdk/mdk4/mdk5/iar/vs/vsc/ua/cdk/ses/makefile/eclipse/codelite/cmake
--cmsispack=CMSISPACK set pack: <cmsispack path>
--strict Compiling project with strict mode and ALL warning will be errors
--verbose print verbose information during build
--cc-prefix=EXEC-PREFIX, --exec-prefix=EXEC-PREFIX
set RTT_CC_PREFIX temperately
--cc-path=EXEC-PATH, --exec-path=EXEC-PATH
set RTT_EXEC_PATH temperately
--stackanalysis thread stack static analysis
--genconfig Generate .config from rtconfig.h
--useconfig=USECONFIG make rtconfig.h from config file.
--global-macros=GLOBAL-MACROS
attach global macros in the project. e.g. scons --global-config=RT_USING_XX,RT_USING_YY or scons --global-config="RT_USING_XX, RT_USING_YY"
--reset-project-config reset the project configurations to default
--guiconfig, --pyconfig Python GUI menuconfig for RT-Thread BSP
--defconfig, --pyconfig-silent
Don`t show Python GUI menuconfig window
--menuconfig make menuconfig for RT-Thread BSP
--cdb make compile_commands.json
scons --genconfig 根据rtconfig.h生成.config
scons --pyconfig UI显示
保存最小配置
scons --useconfig=fat.config 根据.config生成rtconfig.h
scons --global-macros=RT_USING_PIN 编译的时候加宏
scons --stackanalysis 线程分析
TODO:
-fstack-usage -fdump-rtl-dfinish
rtconfig.py
CFLAGS = DEVICE + ' -Dgcc -fstack-usage -fdump-rtl-dfinish'
https://gitee.com/rtthread/rt-thread/pulls/29
scons --reset-project-config 编译默认scons 配置
scons --defconfig
== scons --pyconfig-silent
编译不显示UI
scons --cdb
生成
compile_commands.json 文件
name: ToolsCI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
branches:
- master
paths-ignore:
- documentation/**
- '**/README.md'
- '**/README_zh.md'
- '**/*.c'
- '**/*.h'
- '**/*.cpp'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test:
runs-on: windows-latest
name: Tools
strategy:
fail-fast: false
env:
TEST_BSP_ROOT: bsp/stm32/stm32f407-atk-explorer
steps:
- uses: actions/checkout@v4
- name: Install Tools
shell: powershell
run: |
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_windows.ps1 -O install_windows.ps1
set-executionpolicy remotesigned
.\install_windows.ps1
scons --version
https://blog.csdn.net/wenbo13579/article/details/126881034?spm=1001.2014.3001.5502