Commit Graph

204 Commits

Author SHA1 Message Date
LaterComer 4c5b203c0b
[tools/env]统一tools中env相关的接口,优化env部分路径拼接 (#9185)
* 统一tools中env相关的接口到env_utility.py文件,并同步调整ci

* 移除非本提交的文件

---------

Co-authored-by: Meco Man <920369182@qq.com>
2024-07-31 00:52:25 +08:00
Kai d266ed6c43
[tool][cmake] Let cmake generator get more param from `rtconfig.py` (#9139)
let cmake generator get more param from `rtconfig.py`

* support getting c/cpp standard from c/cpp compilation flags
* support getting post action and conv it to cmake variable
* add a custom cmake file for user custom settings
* support setting project name from `--project-name=` option
2024-07-06 16:05:35 +08:00
LaterComer c09d7e1e49
删除tools/kconfiglib文件夹,采用pip安装kconfiglib
* 删除tools/kconfiglib文件夹,采用pip安装kconfiglib

* workflows/action_utest.yml添加安装kconfiglib
2024-06-30 22:55:41 +08:00
Bernard Xiong 73153ac06a
[tools] fix the issue of cc detection failure in Windows (#8914) 2024-05-08 10:50:45 +08:00
bernard c4e7a0e5e3 [tools] Add --cdb to make compile_commands.json. 2024-05-03 20:17:23 -04:00
bernard 582d11faad [tools] fix EXEC_PATH exists, but the CC does not. 2024-04-20 14:39:28 -04:00
Bernard Xiong b76dca8f4f
[tools] Add toolchain detection in sdk packages (#8827) 2024-04-21 00:53:17 +08:00
LaterComer 6311bcaf24
将scons --menuconfig/--pyconfig/--pyconfig-silent统一调用kconfiglib 2024-04-18 20:48:32 -04:00
Yuqiang Wang 10aa4b9da1
[libc] Fix the MPU's rtconfig.h file identification problem in the script (#8436) 2023-12-28 17:18:58 +08:00
zhkag 4bd5c31dac [tools] format the options
- format command options
    - rename the --add_rtconfig as --global-macros
2023-12-06 15:35:04 +08:00
1ridic 1d0924c12a
[tools] Enable prebuilding action (#8133) 2023-10-23 14:06:46 +08:00
liYangYang 9afd38455d
[tools] 增加vscode pyocd下载命令 scons --target=vsc --pack=xxx 2023-10-22 10:58:16 -04:00
Meco Man c19c907b62 [env] remove --dist-strip command 2023-09-15 08:52:48 -04:00
Meco Man 290678b665 [tools][gcc] remove legacy functions
- GenerateGCCConfig
- GenCconfigFile
2023-08-21 01:24:46 -04:00
GUI 6f119d4ce9
AArch64: support public linker scripts (#7831)
Signed-off-by: GuEe-GUI <GuEe-GUI@github.com>
2023-07-25 21:31:44 +08:00
Meco Man 65238275ac [tools] --project-name= can use name with space 2023-07-23 22:54:27 -04:00
Bernard Xiong df839d5fdb
[building] Fix the deque issue for Env['CPPDEFINES'] (#7541) 2023-05-22 00:50:44 +08:00
朱天龙 (Armink) f458d63d5f [tools] Add `--add-rtconfig` args for scons when you want to add macro definitions build time. 2023-04-06 23:29:45 +08:00
朱天龙 (Armink) 00a6d1a1c5 [tools] update the comment for old gen cconfig.h code. 2023-04-05 08:54:43 -04:00
Meco Man b310541471 [env] add scons --strict
此commit意图在脚本中增加 scons --strict命令,使用该命令编译工程时,会自动将CFLAGS CXXFLAGS设置为 Werrors,即较为严格的编译模式,任何警告都会当做错误来处理。

该命令主要用于CI,在CI执行bsp编译时,可以使用 scons --strict命令。现在QEMU的rtconfig.py 为了CI检查,直接将CFLAGS加上了Werrors,导致正常编译过程中也把警告当做了错误,对日常使用该bsp造成了影响。
2023-01-12 01:43:44 -05:00
Man, Jianting (Meco) 8abaf17772
[tools] attach #6764 (#6799) 2023-01-02 12:46:45 +08:00
Man, Jianting (Meco) 8c7e0b71ce
[tool] 增加scons --dist --project-path=xxxx命令 (#6713)
* [tools] 所有dist都打zip包

* 完善scons --dist/dist-ide --project-name  --project-path命令
2022-12-19 01:12:08 -05:00
Man, Jianting (Meco) 4dd0e67056
[tools][musl] add scons --exec-prefix= 用于设置编译工具的前缀 (#6646)
* [tools][musl] add scons --exec-prefix= 用于设置编译工具的前缀

可以通过如下命令在qemu直接调用musl工具链:
scons --exec-path=C:\xxx\arm-linux-musleabi_for_i686-w64-mingw32\bin --exec-prefix=arm-linux-musleabi-

* comment out GenCconfigFile

* 解决部分env变量提前预载之后重载变量的问题
2022-12-06 22:30:28 -05:00
Meco Man 88e5657082 [tools] 支持通过--project-name=xxx设置生成的工程文件名称
默认为project.xx 与原来保持一致
相关:https://club.rt-thread.org/ask/article/f998b21633f90916.html
2022-11-30 21:33:23 -05:00
Man, Jianting (Meco) 055267f049
[compiler] 增加SConscript依赖标志 AddDepend (#6534)
* [compiler] 增加SConscript依赖标志 AddDepend

* RT_USING_NEWLIB->RT_USING_NEWLIBC RT_USING_ARM_LIBC->RT_USING_ARMLIBC

* 删除过时的板载测试例程

* [gd32] 移除无用的反汇编文件

* [bsp]移除老旧bsp中对RT_USING_NEWLIBC的手动宏定义
2022-10-25 00:01:37 -04:00
Meco Man 6b60aab136 [dist-ide] 优化导出RTThread Studio工程命令
- 导出rtstudio工程时,多增加一级目录,防止BSP本地Sconscript和导出的工程的Sconscript粘接 导致编译出错
- 增加命令别名 --dist-rtstudio 该命令和 --dist-ide命令执行一致,方便用户理解,--dist-ide IDE表示的内容过于宽泛
2022-10-08 22:33:28 -04:00
YangZhongQing b9cd2b6016 build: EndBuilding need_exit after GenTargetProject
User choice IDE build, after GenTargetProject there's no need to do the rest.
并且,既然用户指定了IDE,接下来的命令行编译却仍然是使用arm-none-eabi-gcc,为什么不是用IDE的编译器呢?(也许是个bug)
2022-09-29 21:03:38 -04:00
Meco Man c38259d336 [tools] 增加scons --exec-path=xxx命令 用于动态设置编译链路径
scons --target=iar --exec-path=xxxx
scons --exec-path=xxxx
2022-09-22 22:57:09 -04:00
Meco Man e4b1128486 [iar] 修正IAR编译链名称 2022-09-15 23:54:35 -04:00
tangzz98 cb7fd304ff
ESP32_C3 migrate to ESP-IDF package (#6427) 2022-09-14 03:49:05 -04:00
childerxxx 5e3622402d [tools/link-order] Sort objects so that compilation can be done in a fixed link order. 2022-09-11 17:50:39 +08:00
Man, Jianting (Meco) ffe1c57240 Revert "[tools/link-orger]Sort objects before generate building target to get same link-order/map files/BIN files from the same source files."
This reverts commit 0cb6211372.
2022-09-09 20:27:22 -04:00
lanyang 0cb6211372 [tools/link-orger]Sort objects before generate building target to get same link-order/map files/BIN files from the same source files. 2022-09-09 10:45:23 -04:00
Meco Man ce16945cba [kernel][version] 采用新的版本宏定义
版本控制规范:https://semver.org/

目前的版本子号不是很规范,其中RT_VERSION甚至和VS那边造成了冲突
```c
/* RT-Thread version information */
#define RT_VERSION                      4L              /**< major version number */
#define RT_SUBVERSION                   1L              /**< minor version number */
#define RT_REVISION                     1L              /**< revise version number */
```

参考ESP32:
```c
/** Major version number (X.x.x) */
#define ESP_ARDUINO_VERSION_MAJOR   2
/** Minor version number (x.X.x) */
#define ESP_ARDUINO_VERSION_MINOR   0
/** Patch version number (x.x.X) */
#define ESP_ARDUINO_VERSION_PATCH   3
```

建议改成:
```c
/* Major version number (X.x.x) */
#define RT_VERSION_MAJOR   4
/* Minor version number (x.X.x) */
#define RT_VERSION_MINOR   2
/* Patch version number (x.x.X) */
#define RT_VERSION_PATCH   0
```
2022-09-07 10:11:45 -04:00
Man, Jianting (Meco) 5f474ed26c
[scons] 使用target=mdk5 和 iar时,打印IDE版本号 (#6315)
* [scons] 使用target=mdk5 和 iar时,打印IDE版本号

* 移除对keil iar生成功能的检查
1.这些工程是否可以生成是BSP可选项,不是每个BSP都支持
2.CI环境中并没有安转IAR和Keil环境,导致直接获取IDE版本失败

* MDKProject函数重命名为MDK2Project
2022-08-24 22:39:21 -04:00
Meco Man dd94198bd6 [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM 2022-08-16 09:39:00 +08:00
aozima f50fbb03e2 [tools] remove .sconsign.dblite when scons clean.
fixed py2 <==> py3 ValueError : unsupported pickle protocol: x
2022-08-10 11:39:52 -04:00
Meco Man eafcdd0bc2 [tools] format python code 2022-08-02 23:15:14 -04:00
wugensheng ccbecfc220
[fix][building.py]修复动态模块的option的bug (#6081)
* [fix][building.py]修复动态模块option的bug
2022-06-15 16:58:16 +08:00
Meco Man c9878aacd2 [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm
将路径更新为IAR最新版本的路径
2022-06-09 07:01:59 +08:00
liukangcc b077e91cdf [update] support command: scons --target=xmake 2022-05-09 09:39:22 +08:00
shinu 778be73cac Fix bugs for processing command line parameters 2022-04-23 00:43:26 +08:00
wugensheng 0624bbf009
Decouple the addition of command line arguments (#5848)
* Decouple the addition of command line arguments

* Decouple the addition of command line arguments

* Modify change logs

* Modify change logs

* Decouple the addition of command line arguments

* delete wrong edits

* Modify file header

* remove duplicate imports
2022-04-22 08:23:35 +08:00
Man, Jianting (Meco) a0f8d43744
[gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM (#5802)
* [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM
2022-04-20 09:56:04 +08:00
LiuKang e1ef28a79b
[update] Sort the source file path (#5783) 2022-04-08 12:55:05 +08:00
liukangcc 27511885f3 [update] change ccflags to cflags 2022-01-20 11:50:30 +08:00
Man, Jianting (Meco) ed1f8b3f64 Revert "add clang-arm support."
This reverts commit a5f6fdc780.
2021-12-22 18:57:16 -05:00
guozhanxin a5f6fdc780 add clang-arm support. 2021-12-22 13:03:05 +08:00
Meco Man a78f957ad4 [tools][building.py] 修复加入空列表和空字符串的问题 2021-11-30 10:18:51 -05:00
guozhanxin 194e33a792 [tools] add scons --target=cmake-armclang 2021-07-01 01:30:50 +08:00