Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Keyboard Man_俊
rt-thread
提交
7c403d35
R
rt-thread
项目概览
Keyboard Man_俊
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
7c403d35
编写于
1月 20, 2022
作者:
G
guo
提交者:
GitHub
1月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into keil
上级
88421858
d96e85cc
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
118 addition
and
60 deletion
+118
-60
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript
+15
-5
bsp/bluetrum/libraries/hal_libraries/bmsis/SConscript
bsp/bluetrum/libraries/hal_libraries/bmsis/SConscript
+17
-7
bsp/ck802/applications/SConscript
bsp/ck802/applications/SConscript
+2
-2
bsp/gd32/docs/GD32系列BSP制作教程.md
bsp/gd32/docs/GD32系列BSP制作教程.md
+2
-2
bsp/ra6m4-cpk/ports/fal/SConscript
bsp/ra6m4-cpk/ports/fal/SConscript
+5
-5
bsp/ra6m4-cpk/ports/rw007/SConscript
bsp/ra6m4-cpk/ports/rw007/SConscript
+5
-5
bsp/stm32/stm32h743-openmv-h7plus/SConstruct
bsp/stm32/stm32h743-openmv-h7plus/SConstruct
+2
-2
bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript
bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript
+5
-5
bsp/thead-smart/applications/SConscript
bsp/thead-smart/applications/SConscript
+2
-2
bsp/tm4c129x/libraries/SConscript
bsp/tm4c129x/libraries/SConscript
+3
-3
components/drivers/spi/SConscript
components/drivers/spi/SConscript
+6
-5
tools/building.py
tools/building.py
+41
-4
tools/codelite.py
tools/codelite.py
+2
-2
tools/iar.py
tools/iar.py
+1
-1
tools/keil.py
tools/keil.py
+5
-5
tools/ses.py
tools/ses.py
+5
-5
未找到文件。
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript
浏览文件 @
7c403d35
...
...
@@ -18,12 +18,14 @@ DEPENDS = [""]
# SOURCES: Need to compile c and c++ source, auto search when SOURCES is empty
#
# LOCAL_CPPPATH: Local file path (.h/.c/.cpp)
# LOCAL_CCFLAGS: Local compilation parameter
# LOCAL_CFLAGS: Local c compilation parameter
# LOCAL_CCFLAGS: Local c/c++ compilation parameter
# LOCAL_CXXFLAGS: Local c++ compilation parameter
# LOCAL_ASFLAGS: Local assembly parameters
#
# CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
# is empty # no pass!!!
# C
CFLAGS
: Global compilation parameter
# C
FLAGS
: Global compilation parameter
# ASFLAGS: Global assembly parameters
#
# CPPDEFINES: Global macro definition
...
...
@@ -37,12 +39,16 @@ DEPENDS = [""]
CWD
=
GetCurrentDir
()
SOURCES
=
Glob
(
"./source/*.c"
)
LOCAL_CPPPATH
=
[]
LOCAL_CCFLAGS
=
""
LOCAL_CPPPATH
=
[]
LOCAL_CFLAGS
=
""
LOCAL_CCFLAGS
=
""
LOCAL_CXXFLAGS
=
""
LOCAL_ASFLAGS
=
""
CPPPATH
=
[
GetCurrentDir
(),
os
.
path
.
join
(
GetCurrentDir
(),
'include'
)]
CCFLAGS
=
""
CFLAGS
=
""
CCFLAGS
=
""
CXXFLAGS
=
""
ASFLAGS
=
""
CPPDEFINES
=
[]
...
...
@@ -61,10 +67,14 @@ CPPPATH_IGNORE = []
#---------------------------------------------------------------------------------
objs
=
DefineGroup
(
name
=
PKGNAME
,
src
=
SOURCES
,
depend
=
DEPENDS
,
CPPPATH
=
CPPPATH
,
CFLAGS
=
CFLAGS
,
CCFLAGS
=
CCFLAGS
,
CXXFLAGS
=
CXXFLAGS
,
ASFLAGS
=
ASFLAGS
,
LOCAL_CPPPATH
=
LOCAL_CPPPATH
,
LOCAL_CFLAGS
=
LOCAL_CFLAGS
,
LOCAL_CCFLAGS
=
LOCAL_CCFLAGS
,
LOCAL_CXXFLAGS
=
LOCAL_CXXFLAGS
,
LOCAL_ASFLAGS
=
LOCAL_ASFLAGS
,
CPPDEFINES
=
CPPDEFINES
,
LOCAL_CPPDEFINES
=
LOCAL_CPPDEFINES
,
...
...
bsp/bluetrum/libraries/hal_libraries/bmsis/SConscript
浏览文件 @
7c403d35
...
...
@@ -19,12 +19,14 @@ DEPENDS = [""]
# SOURCES: Need to compile c and c++ source, auto search when SOURCES is empty
#
# LOCAL_CPPPATH: Local file path (.h/.c/.cpp)
# LOCAL_CCFLAGS: Local compilation parameter
# LOCAL_CFLAGS: Local c compilation parameter
# LOCAL_CCFLAGS: Local c/c++ compilation parameter
# LOCAL_CXXFLAGS: Local c++ compilation parameter
# LOCAL_ASFLAGS: Local assembly parameters
#
# CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
# is empty # no pass!!!
# C
CFLAGS
: Global compilation parameter
# C
FLAGS
: Global compilation parameter
# ASFLAGS: Global assembly parameters
#
# CPPDEFINES: Global macro definition
...
...
@@ -35,22 +37,26 @@ DEPENDS = [""]
#
# LINKFLAGS: Link options
#---------------------------------------------------------------------------------
CWD
=
GetCurrentDir
()
SOURCES
=
Glob
(
"./source/*.c"
)
SOURCES
+=
Glob
(
"./source/*.S"
)
LOCAL_CPPPATH
=
[]
LOCAL_CCFLAGS
=
""
LOCAL_CPPPATH
=
[]
LOCAL_CFLAGS
=
""
LOCAL_CCFLAGS
=
""
LOCAL_CXXFLAGS
=
""
LOCAL_ASFLAGS
=
""
CPPPATH
=
[
GetCurrentDir
(),
os
.
path
.
join
(
GetCurrentDir
(),
'include'
)]
CCFLAGS
=
""
CFLAGS
=
""
CCFLAGS
=
""
CXXFLAGS
=
""
ASFLAGS
=
""
CPPDEFINES
=
[]
LOCAL_CPPDEFINES
=
[]
LIBS
=
[]
LIBPATH
=
[]
LIBPATH
=
[]
LINKFLAGS
=
""
...
...
@@ -62,10 +68,14 @@ CPPPATH_IGNORE = []
#---------------------------------------------------------------------------------
objs
=
DefineGroup
(
name
=
PKGNAME
,
src
=
SOURCES
,
depend
=
DEPENDS
,
CPPPATH
=
CPPPATH
,
CFLAGS
=
CFLAGS
,
CCFLAGS
=
CCFLAGS
,
CXXFLAGS
=
CXXFLAGS
,
ASFLAGS
=
ASFLAGS
,
LOCAL_CPPPATH
=
LOCAL_CPPPATH
,
LOCAL_CFLAGS
=
LOCAL_CFLAGS
,
LOCAL_CCFLAGS
=
LOCAL_CCFLAGS
,
LOCAL_CXXFLAGS
=
LOCAL_CXXFLAGS
,
LOCAL_ASFLAGS
=
LOCAL_ASFLAGS
,
CPPDEFINES
=
CPPDEFINES
,
LOCAL_CPPDEFINES
=
LOCAL_CPPDEFINES
,
...
...
bsp/ck802/applications/SConscript
浏览文件 @
7c403d35
...
...
@@ -6,8 +6,8 @@ cwd = os.path.join(str(Dir('#')), 'applications')
src
=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
,
str
(
Dir
(
'#'
))]
C
C
FLAGS
=
' -c -mistack -ffunction-sections'
CFLAGS
=
' -c -mistack -ffunction-sections'
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
C
CFLAGS
=
C
CFLAGS
)
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
C
FLAGS
=
CFLAGS
)
Return
(
'group'
)
bsp/gd32/docs/GD32系列BSP制作教程.md
浏览文件 @
7c403d35
...
...
@@ -145,14 +145,14 @@ TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment
(
tools
=
[])
env
=
Environment
(
tools
=
[
'mingw'
],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
C
C
FLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
if
rtconfig
.
PLATFORM
==
'iar'
:
env
.
Replace
(
CCCOM
=
[
'$CC $C
C
FLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'
])
env
.
Replace
(
CCCOM
=
[
'$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'
])
env
.
Replace
(
ARFLAGS
=
[
''
])
env
.
Replace
(
LINKCOM
=
env
[
"LINKCOM"
]
+
' --map rtthread.map'
)
...
...
bsp/ra6m4-cpk/ports/fal/SConscript
浏览文件 @
7c403d35
...
...
@@ -8,15 +8,15 @@ src = []
src
+=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
LOCAL_C
C
FLAGS
=
''
LOCAL_CFLAGS
=
''
if
rtconfig
.
PLATFORM
==
'gcc'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
elif
rtconfig
.
PLATFORM
==
'armcc'
:
LOCAL_C
C
FLAGS
+=
' --c99'
LOCAL_CFLAGS
+=
' --c99'
elif
rtconfig
.
PLATFORM
==
'armclang'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
group
=
DefineGroup
(
'FAL'
,
src
,
depend
=
[
'PKG_USING_FAL'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
CFLAGS
=
LOCAL_C
CFLAGS
)
group
=
DefineGroup
(
'FAL'
,
src
,
depend
=
[
'PKG_USING_FAL'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
FLAGS
=
LOCAL_
CFLAGS
)
Return
(
'group'
)
bsp/ra6m4-cpk/ports/rw007/SConscript
浏览文件 @
7c403d35
...
...
@@ -8,15 +8,15 @@ src = []
src
+=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
LOCAL_C
C
FLAGS
=
''
LOCAL_CFLAGS
=
''
if
rtconfig
.
PLATFORM
==
'gcc'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
elif
rtconfig
.
PLATFORM
==
'armcc'
:
LOCAL_C
C
FLAGS
+=
' --c99'
LOCAL_CFLAGS
+=
' --c99'
elif
rtconfig
.
PLATFORM
==
'armclang'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
group
=
DefineGroup
(
'rw007'
,
src
,
depend
=
[
'BSP_USING_RW007'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
CFLAGS
=
LOCAL_C
CFLAGS
)
group
=
DefineGroup
(
'rw007'
,
src
,
depend
=
[
'BSP_USING_RW007'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
FLAGS
=
LOCAL_
CFLAGS
)
Return
(
'group'
)
bsp/stm32/stm32h743-openmv-h7plus/SConstruct
浏览文件 @
7c403d35
...
...
@@ -20,14 +20,14 @@ TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment
(
tools
=
[])
env
=
Environment
(
tools
=
[
'mingw'
],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
C
C
FLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
if
rtconfig
.
PLATFORM
==
'iar'
:
env
.
Replace
(
CCCOM
=
[
'$CC $C
C
FLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'
])
env
.
Replace
(
CCCOM
=
[
'$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'
])
env
.
Replace
(
ARFLAGS
=
[
''
])
env
.
Replace
(
LINKCOM
=
env
[
"LINKCOM"
]
+
' --map rt-thread.map'
)
...
...
bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript
浏览文件 @
7c403d35
...
...
@@ -8,15 +8,15 @@ src = []
src
+=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
LOCAL_C
C
FLAGS
=
''
LOCAL_CFLAGS
=
''
if
rtconfig
.
PLATFORM
==
'gcc'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
elif
rtconfig
.
PLATFORM
==
'armcc'
:
LOCAL_C
C
FLAGS
+=
' --c99'
LOCAL_CFLAGS
+=
' --c99'
elif
rtconfig
.
PLATFORM
==
'armclang'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
group
=
DefineGroup
(
'FAL'
,
src
,
depend
=
[
'PKG_USING_FAL'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
CFLAGS
=
LOCAL_C
CFLAGS
)
group
=
DefineGroup
(
'FAL'
,
src
,
depend
=
[
'PKG_USING_FAL'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
FLAGS
=
LOCAL_
CFLAGS
)
Return
(
'group'
)
bsp/thead-smart/applications/SConscript
浏览文件 @
7c403d35
...
...
@@ -6,8 +6,8 @@ cwd = GetCurrentDir()
src
=
Glob
(
'*.c'
)
CPPPATH
=
GetCurrentDir
()
C
C
FLAGS
=
' -c -ffunction-sections'
CFLAGS
=
' -c -ffunction-sections'
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
C
CFLAGS
=
C
CFLAGS
)
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
C
FLAGS
=
CFLAGS
)
Return
(
'group'
)
bsp/tm4c129x/libraries/SConscript
浏览文件 @
7c403d35
...
...
@@ -6,7 +6,7 @@ from building import *
cwd
=
GetCurrentDir
()
src
=
Glob
(
'driverlib/*.c'
)
SrcRemove
(
src
,
'onewire.c'
)
C
C
FLAGS
=
''
CFLAGS
=
''
# add for startup script
if
rtconfig
.
CROSS_TOOL
==
'gcc'
:
...
...
@@ -15,12 +15,12 @@ elif rtconfig.CROSS_TOOL == 'keil':
src
+=
[
'startup/startup_rvmdk.S'
]
elif
rtconfig
.
CROSS_TOOL
==
'iar'
:
src
+=
[
'startup/startup_ewarm.c'
]
C
C
FLAGS
+=
' --diag_suppress=pe177'
CFLAGS
+=
' --diag_suppress=pe177'
CPPPATH
=
[
cwd
,
cwd
+
'/inc'
,
cwd
+
'/driverlib'
]
CPPDEFINES
=
[
rtconfig
.
PART_TYPE
]
group
=
DefineGroup
(
'Libraries'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
CPPDEFINES
=
CPPDEFINES
,
C
CFLAGS
=
C
CFLAGS
)
group
=
DefineGroup
(
'Libraries'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
CPPDEFINES
=
CPPDEFINES
,
C
FLAGS
=
CFLAGS
)
Return
(
'group'
)
components/drivers/spi/SConscript
浏览文件 @
7c403d35
...
...
@@ -4,7 +4,7 @@ import rtconfig
cwd
=
GetCurrentDir
()
src
=
[
'spi_core.c'
,
'spi_dev.c'
]
CPPPATH
=
[
cwd
,
cwd
+
'/../include'
]
LOCAL_C
C
FLAGS
=
''
LOCAL_CFLAGS
=
''
if
GetDepend
(
'RT_USING_QSPI'
):
src
+=
[
'qspi_core.c'
]
...
...
@@ -25,15 +25,16 @@ if GetDepend('RT_USING_SFUD'):
CPPPATH
+=
[
cwd
+
'/sfud/inc'
]
if
GetDepend
(
'RT_SFUD_USING_SFDP'
):
src_device
+=
[
'sfud/src/sfud_sfdp.c'
]
if
rtconfig
.
PLATFORM
==
'gcc'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
elif
rtconfig
.
PLATFORM
==
'armcc'
:
LOCAL_C
C
FLAGS
+=
' --c99'
LOCAL_CFLAGS
+=
' --c99'
elif
rtconfig
.
PLATFORM
==
'armclang'
:
LOCAL_C
C
FLAGS
+=
' -std=c99'
LOCAL_CFLAGS
+=
' -std=c99'
src
+=
src_device
group
=
DefineGroup
(
'DeviceDrivers'
,
src
,
depend
=
[
'RT_USING_SPI'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
CFLAGS
=
LOCAL_C
CFLAGS
)
group
=
DefineGroup
(
'DeviceDrivers'
,
src
,
depend
=
[
'RT_USING_SPI'
],
CPPPATH
=
CPPPATH
,
LOCAL_C
FLAGS
=
LOCAL_
CFLAGS
)
Return
(
'group'
)
tools/building.py
浏览文件 @
7c403d35
...
...
@@ -557,11 +557,21 @@ def AddDepend(option):
def
MergeGroup
(
src_group
,
group
):
src_group
[
'src'
]
=
src_group
[
'src'
]
+
group
[
'src'
]
if
'CFLAGS'
in
group
:
if
'CFLAGS'
in
src_group
:
src_group
[
'CFLAGS'
]
=
src_group
[
'CFLAGS'
]
+
group
[
'CFLAGS'
]
else
:
src_group
[
'CFLAGS'
]
=
group
[
'CFLAGS'
]
if
'CCFLAGS'
in
group
:
if
'CCFLAGS'
in
src_group
:
src_group
[
'CCFLAGS'
]
=
src_group
[
'CCFLAGS'
]
+
group
[
'CCFLAGS'
]
else
:
src_group
[
'CCFLAGS'
]
=
group
[
'CCFLAGS'
]
if
'CXXFLAGS'
in
group
:
if
'CXXFLAGS'
in
src_group
:
src_group
[
'CXXFLAGS'
]
=
src_group
[
'CXXFLAGS'
]
+
group
[
'CXXFLAGS'
]
else
:
src_group
[
'CXXFLAGS'
]
=
group
[
'CXXFLAGS'
]
if
'CPPPATH'
in
group
:
if
'CPPPATH'
in
src_group
:
src_group
[
'CPPPATH'
]
=
src_group
[
'CPPPATH'
]
+
group
[
'CPPPATH'
]
...
...
@@ -579,11 +589,21 @@ def MergeGroup(src_group, group):
src_group
[
'ASFLAGS'
]
=
group
[
'ASFLAGS'
]
# for local CCFLAGS/CPPPATH/CPPDEFINES
if
'LOCAL_CFLAGS'
in
group
:
if
'LOCAL_CFLAGS'
in
src_group
:
src_group
[
'LOCAL_CFLAGS'
]
=
src_group
[
'LOCAL_CFLAGS'
]
+
group
[
'LOCAL_CFLAGS'
]
else
:
src_group
[
'LOCAL_CFLAGS'
]
=
group
[
'LOCAL_CFLAGS'
]
if
'LOCAL_CCFLAGS'
in
group
:
if
'LOCAL_CCFLAGS'
in
src_group
:
src_group
[
'LOCAL_CCFLAGS'
]
=
src_group
[
'LOCAL_CCFLAGS'
]
+
group
[
'LOCAL_CCFLAGS'
]
else
:
src_group
[
'LOCAL_CCFLAGS'
]
=
group
[
'LOCAL_CCFLAGS'
]
if
'LOCAL_CXXFLAGS'
in
group
:
if
'LOCAL_CXXFLAGS'
in
src_group
:
src_group
[
'LOCAL_CXXFLAGS'
]
=
src_group
[
'LOCAL_CXXFLAGS'
]
+
group
[
'LOCAL_CXXFLAGS'
]
else
:
src_group
[
'LOCAL_CXXFLAGS'
]
=
group
[
'LOCAL_CXXFLAGS'
]
if
'LOCAL_CPPPATH'
in
group
:
if
'LOCAL_CPPPATH'
in
src_group
:
src_group
[
'LOCAL_CPPPATH'
]
=
src_group
[
'LOCAL_CPPPATH'
]
+
group
[
'LOCAL_CPPPATH'
]
...
...
@@ -650,10 +670,18 @@ def DefineGroup(name, src, depend, **parameters):
else
:
group
[
'src'
]
=
src
if
'CFLAGS'
in
group
:
target
=
group
[
'CFLAGS'
]
if
len
(
target
)
>
0
:
Env
.
AppendUnique
(
CFLAGS
=
target
)
if
'CCFLAGS'
in
group
:
target
=
group
[
'CCFLAGS'
]
if
len
(
target
)
>
0
:
Env
.
AppendUnique
(
CCFLAGS
=
target
)
if
'CXXFLAGS'
in
group
:
target
=
group
[
'CXXFLAGS'
]
if
len
(
target
)
>
0
:
Env
.
AppendUnique
(
CXXFLAGS
=
target
)
if
'CPPPATH'
in
group
:
target
=
group
[
'CPPPATH'
]
if
_PretreatListParameters
(
target
)
==
True
:
...
...
@@ -682,11 +710,18 @@ def DefineGroup(name, src, depend, **parameters):
import
rtconfig
if
rtconfig
.
PLATFORM
==
'gcc'
:
if
'CFLAGS'
in
group
:
group
[
'CFLAGS'
]
=
utils
.
GCCC99Patch
(
group
[
'CFLAGS'
])
if
'CCFLAGS'
in
group
:
group
[
'CCFLAGS'
]
=
utils
.
GCCC99Patch
(
group
[
'CCFLAGS'
])
if
'CXXFLAGS'
in
group
:
group
[
'CXXFLAGS'
]
=
utils
.
GCCC99Patch
(
group
[
'CXXFLAGS'
])
if
'LOCAL_CCFLAGS'
in
group
:
group
[
'LOCAL_CCFLAGS'
]
=
utils
.
GCCC99Patch
(
group
[
'LOCAL_CCFLAGS'
])
if
'LOCAL_CXXFLAGS'
in
group
:
group
[
'LOCAL_CXXFLAGS'
]
=
utils
.
GCCC99Patch
(
group
[
'LOCAL_CXXFLAGS'
])
if
'LOCAL_CFLAGS'
in
group
:
group
[
'LOCAL_CFLAGS'
]
=
utils
.
GCCC99Patch
(
group
[
'LOCAL_CFLAGS'
])
# check whether to clean up library
if
GetOption
(
'cleanlib'
)
and
os
.
path
.
exists
(
os
.
path
.
join
(
group
[
'path'
],
GroupLibFullName
(
name
,
Env
))):
if
group
[
'src'
]
!=
[]:
...
...
@@ -785,14 +820,16 @@ def DoBuilding(target, objects):
# handle local group
def
local_group
(
group
,
objects
):
if
'LOCAL_CCFLAGS'
in
group
or
'LOCAL_CPPPATH'
in
group
or
'LOCAL_CPPDEFINES'
in
group
or
'LOCAL_ASFLAGS'
in
group
:
if
'LOCAL_CFLAGS'
in
group
or
'LOCAL_CXXFLAGS'
in
group
or
'LOCAL_CCFLAGS'
in
group
or
'LOCAL_CPPPATH'
in
group
or
'LOCAL_CPPDEFINES'
in
group
or
'LOCAL_ASFLAGS'
in
group
:
CFLAGS
=
Env
.
get
(
'CFLAGS'
,
''
)
+
group
.
get
(
'LOCAL_CFLAGS'
,
''
)
CCFLAGS
=
Env
.
get
(
'CCFLAGS'
,
''
)
+
group
.
get
(
'LOCAL_CCFLAGS'
,
''
)
CXXFLAGS
=
Env
.
get
(
'CXXFLAGS'
,
''
)
+
group
.
get
(
'LOCAL_CXXFLAGS'
,
''
)
CPPPATH
=
Env
.
get
(
'CPPPATH'
,
[
''
])
+
group
.
get
(
'LOCAL_CPPPATH'
,
[
''
])
CPPDEFINES
=
Env
.
get
(
'CPPDEFINES'
,
[
''
])
+
group
.
get
(
'LOCAL_CPPDEFINES'
,
[
''
])
ASFLAGS
=
Env
.
get
(
'ASFLAGS'
,
''
)
+
group
.
get
(
'LOCAL_ASFLAGS'
,
''
)
for
source
in
group
[
'src'
]:
objects
.
append
(
Env
.
Object
(
source
,
C
CFLAGS
=
CC
FLAGS
,
ASFLAGS
=
ASFLAGS
,
objects
.
append
(
Env
.
Object
(
source
,
C
FLAGS
=
CFLAGS
,
CCFLAGS
=
CCFLAGS
,
CXXFLAGS
=
CXX
FLAGS
,
ASFLAGS
=
ASFLAGS
,
CPPPATH
=
CPPPATH
,
CPPDEFINES
=
CPPDEFINES
))
return
True
...
...
@@ -822,7 +859,7 @@ def DoBuilding(target, objects):
else
:
# remove source files with local flags setting
for
group
in
Projects
:
if
'LOCAL_CCFLAGS'
in
group
or
'LOCAL_CPPPATH'
in
group
or
'LOCAL_CPPDEFINES'
in
group
:
if
'LOCAL_C
FLAGS'
in
group
or
'LOCAL_CXXFLAGS'
in
group
or
'LOCAL_C
CFLAGS'
in
group
or
'LOCAL_CPPPATH'
in
group
or
'LOCAL_CPPDEFINES'
in
group
:
for
source
in
group
[
'src'
]:
for
obj
in
objects
:
if
source
.
abspath
==
obj
.
abspath
or
(
len
(
obj
.
sources
)
>
0
and
source
.
abspath
==
obj
.
sources
[
0
].
abspath
):
...
...
tools/codelite.py
浏览文件 @
7c403d35
...
...
@@ -194,8 +194,8 @@ def TargetCodelite(script, program):
#print building.Env.get('LIBPATH', [])
#print building.Env.get('LIBS', [])
CLSetCFlags
(
root
,
building
.
Env
.
get
(
'C
C
FLAGS'
,
[]))
CLSetCxxFlags
(
root
,
building
.
Env
.
get
(
'C
C
FLAGS'
,
[]))
CLSetCFlags
(
root
,
building
.
Env
.
get
(
'CFLAGS'
,
[]))
CLSetCxxFlags
(
root
,
building
.
Env
.
get
(
'CFLAGS'
,
[]))
asflags
=
building
.
Env
.
get
(
'ASFLAGS'
,
[])
asflags
=
asflags
.
replace
(
'-ffunction-sections'
,
''
)
...
...
tools/iar.py
浏览文件 @
7c403d35
...
...
@@ -88,7 +88,7 @@ def IARProject(target, script):
CPPPATH
=
[]
CPPDEFINES
=
[]
LINKFLAGS
=
''
C
C
FLAGS
=
''
CFLAGS
=
''
Libs
=
[]
lib_prefix
=
[
'lib'
,
''
]
lib_suffix
=
[
'.a'
,
'.o'
,
''
]
...
...
tools/keil.py
浏览文件 @
7c403d35
...
...
@@ -192,7 +192,7 @@ def MDK45Project(tree, target, script):
CPPPATH
=
[]
CPPDEFINES
=
[]
LINKFLAGS
=
''
C
C
FLAGS
=
''
CFLAGS
=
''
ProjectFiles
=
[]
# add group
...
...
@@ -204,14 +204,14 @@ def MDK45Project(tree, target, script):
group_tree
=
MDK4AddGroup
(
ProjectFiles
,
groups
,
group
[
'name'
],
group
[
'src'
],
project_path
)
# for local CPPPATH/CPPDEFINES
if
(
group_tree
!=
None
)
and
(
'LOCAL_CPPPATH'
in
group
or
'LOCAL_C
C
FLAGS'
in
group
or
'LOCAL_CPPDEFINES'
in
group
):
if
(
group_tree
!=
None
)
and
(
'LOCAL_CPPPATH'
in
group
or
'LOCAL_CFLAGS'
in
group
or
'LOCAL_CPPDEFINES'
in
group
):
GroupOption
=
SubElement
(
group_tree
,
'GroupOption'
)
GroupArmAds
=
SubElement
(
GroupOption
,
'GroupArmAds'
)
Cads
=
SubElement
(
GroupArmAds
,
'Cads'
)
VariousControls
=
SubElement
(
Cads
,
'VariousControls'
)
MiscControls
=
SubElement
(
VariousControls
,
'MiscControls'
)
if
'LOCAL_C
C
FLAGS'
in
group
:
MiscControls
.
text
=
group
[
'LOCAL_C
C
FLAGS'
]
if
'LOCAL_CFLAGS'
in
group
:
MiscControls
.
text
=
group
[
'LOCAL_CFLAGS'
]
else
:
MiscControls
.
text
=
' '
Define
=
SubElement
(
VariousControls
,
'Define'
)
...
...
@@ -329,7 +329,7 @@ def MDKProject(target, script):
CPPPATH
=
[]
CPPDEFINES
=
[]
LINKFLAGS
=
''
C
C
FLAGS
=
''
CFLAGS
=
''
# number of groups
group_index
=
1
...
...
tools/ses.py
浏览文件 @
7c403d35
...
...
@@ -49,7 +49,7 @@ def SESProject(env) :
CPPPATH
=
[]
CPPDEFINES
=
[]
LINKFLAGS
=
''
C
C
FLAGS
=
''
CFLAGS
=
''
project_node
=
tree
.
find
(
'project'
)
...
...
@@ -59,11 +59,11 @@ def SESProject(env) :
group_tree
=
SDKAddGroup
(
project_node
,
group
[
'name'
],
group
[
'src'
],
project_path
)
# get each group's cc flags
if
'C
CFLAGS'
in
group
and
group
[
'C
CFLAGS'
]:
if
C
C
FLAGS
:
C
CFLAGS
+=
' '
+
group
[
'C
CFLAGS'
]
if
'C
FLAGS'
in
group
and
group
[
'
CFLAGS'
]:
if
CFLAGS
:
C
FLAGS
+=
' '
+
group
[
'
CFLAGS'
]
else
:
C
CFLAGS
+=
group
[
'CCFLAGS'
]
C
FLAGS
+=
group
[
'CFLAGS'
]
# get each group's link flags
if
'LINKFLAGS'
in
group
and
group
[
'LINKFLAGS'
]:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录