Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
u010088926
rt-thread
提交
4f03ef58
R
rt-thread
项目概览
u010088926
/
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,发现更多精彩内容 >>
提交
4f03ef58
编写于
3月 23, 2019
作者:
T
tyustli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add c++ support for the bsp of stm32
上级
efd8b404
变更
84
隐藏空白更改
内联
并排
Showing
84 changed file
with
695 addition
and
30 deletion
+695
-30
bsp/stm32/stm32f091-st-nucleo/SConstruct
bsp/stm32/stm32f091-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32f091-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32f091-st-nucleo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f091-st-nucleo/rtconfig.py
bsp/stm32/stm32f091-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32f103-atk-nano/SConstruct
bsp/stm32/stm32f103-atk-nano/SConstruct
+1
-0
bsp/stm32/stm32f103-atk-nano/board/linker_scripts/link.lds
bsp/stm32/stm32f103-atk-nano/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f103-atk-nano/rtconfig.py
bsp/stm32/stm32f103-atk-nano/rtconfig.py
+11
-1
bsp/stm32/stm32f103-atk-warshipv3/SConstruct
bsp/stm32/stm32f103-atk-warshipv3/SConstruct
+1
-0
bsp/stm32/stm32f103-atk-warshipv3/board/linker_scripts/link.lds
...m32/stm32f103-atk-warshipv3/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py
bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py
+11
-1
bsp/stm32/stm32f103-dofly-lyc8/SConstruct
bsp/stm32/stm32f103-dofly-lyc8/SConstruct
+1
-0
bsp/stm32/stm32f103-dofly-lyc8/board/linker_scripts/link.lds
bsp/stm32/stm32f103-dofly-lyc8/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py
bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py
+11
-1
bsp/stm32/stm32f103-fire-arbitrary/SConstruct
bsp/stm32/stm32f103-fire-arbitrary/SConstruct
+1
-0
bsp/stm32/stm32f103-fire-arbitrary/board/linker_scripts/link.lds
...32/stm32f103-fire-arbitrary/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py
bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py
+11
-1
bsp/stm32/stm32f103-hw100k-ibox/SConstruct
bsp/stm32/stm32f103-hw100k-ibox/SConstruct
+1
-0
bsp/stm32/stm32f103-hw100k-ibox/board/linker_scripts/link.lds
...stm32/stm32f103-hw100k-ibox/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py
bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py
+11
-1
bsp/stm32/stm32f103-mini-system/SConstruct
bsp/stm32/stm32f103-mini-system/SConstruct
+1
-0
bsp/stm32/stm32f103-mini-system/board/linker_scripts/link.lds
...stm32/stm32f103-mini-system/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f103-mini-system/rtconfig.py
bsp/stm32/stm32f103-mini-system/rtconfig.py
+12
-1
bsp/stm32/stm32f107-uc-eval/SConstruct
bsp/stm32/stm32f107-uc-eval/SConstruct
+1
-0
bsp/stm32/stm32f107-uc-eval/board/linker_scripts/link.lds
bsp/stm32/stm32f107-uc-eval/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f107-uc-eval/rtconfig.py
bsp/stm32/stm32f107-uc-eval/rtconfig.py
+11
-1
bsp/stm32/stm32f401-st-nucleo/SConstruct
bsp/stm32/stm32f401-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32f401-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32f401-st-nucleo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f401-st-nucleo/rtconfig.py
bsp/stm32/stm32f401-st-nucleo/rtconfig.py
+12
-1
bsp/stm32/stm32f405-smdz-breadfruit/SConstruct
bsp/stm32/stm32f405-smdz-breadfruit/SConstruct
+1
-0
bsp/stm32/stm32f405-smdz-breadfruit/board/linker_scripts/link.lds
...2/stm32f405-smdz-breadfruit/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py
bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py
+11
-1
bsp/stm32/stm32f407-atk-explorer/SConstruct
bsp/stm32/stm32f407-atk-explorer/SConstruct
+1
-0
bsp/stm32/stm32f407-atk-explorer/board/linker_scripts/link.lds
...tm32/stm32f407-atk-explorer/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f407-atk-explorer/rtconfig.py
bsp/stm32/stm32f407-atk-explorer/rtconfig.py
+11
-1
bsp/stm32/stm32f407-st-discovery/SConstruct
bsp/stm32/stm32f407-st-discovery/SConstruct
+1
-0
bsp/stm32/stm32f407-st-discovery/board/linker_scripts/link.lds
...tm32/stm32f407-st-discovery/board/linker_scripts/link.lds
+8
-0
bsp/stm32/stm32f407-st-discovery/rtconfig.py
bsp/stm32/stm32f407-st-discovery/rtconfig.py
+11
-1
bsp/stm32/stm32f411-st-nucleo/SConstruct
bsp/stm32/stm32f411-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32f411-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32f411-st-nucleo/board/linker_scripts/link.lds
+14
-0
bsp/stm32/stm32f411-st-nucleo/rtconfig.py
bsp/stm32/stm32f411-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32f429-armfly-v6/SConstruct
bsp/stm32/stm32f429-armfly-v6/SConstruct
+1
-0
bsp/stm32/stm32f429-armfly-v6/board/linker_scripts/link.lds
bsp/stm32/stm32f429-armfly-v6/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f429-armfly-v6/rtconfig.py
bsp/stm32/stm32f429-armfly-v6/rtconfig.py
+13
-1
bsp/stm32/stm32f429-atk-apollo/SConstruct
bsp/stm32/stm32f429-atk-apollo/SConstruct
+1
-0
bsp/stm32/stm32f429-atk-apollo/board/linker_scripts/link.lds
bsp/stm32/stm32f429-atk-apollo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f429-atk-apollo/rtconfig.py
bsp/stm32/stm32f429-atk-apollo/rtconfig.py
+11
-1
bsp/stm32/stm32f429-fire-challenger/SConstruct
bsp/stm32/stm32f429-fire-challenger/SConstruct
+1
-0
bsp/stm32/stm32f429-fire-challenger/board/linker_scripts/link.lds
...2/stm32f429-fire-challenger/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f429-fire-challenger/rtconfig.py
bsp/stm32/stm32f429-fire-challenger/rtconfig.py
+11
-1
bsp/stm32/stm32f446-st-nucleo/SConstruct
bsp/stm32/stm32f446-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32f446-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32f446-st-nucleo/board/linker_scripts/link.lds
+14
-0
bsp/stm32/stm32f446-st-nucleo/rtconfig.py
bsp/stm32/stm32f446-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32f746-st-disco/SConstruct
bsp/stm32/stm32f746-st-disco/SConstruct
+1
-0
bsp/stm32/stm32f746-st-disco/board/linker_scripts/link.lds
bsp/stm32/stm32f746-st-disco/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f746-st-disco/rtconfig.py
bsp/stm32/stm32f746-st-disco/rtconfig.py
+5
-1
bsp/stm32/stm32f767-atk-apollo/SConstruct
bsp/stm32/stm32f767-atk-apollo/SConstruct
+1
-0
bsp/stm32/stm32f767-atk-apollo/board/linker_scripts/link.lds
bsp/stm32/stm32f767-atk-apollo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f767-atk-apollo/rtconfig.py
bsp/stm32/stm32f767-atk-apollo/rtconfig.py
+10
-1
bsp/stm32/stm32f767-fire-challenger/SConstruct
bsp/stm32/stm32f767-fire-challenger/SConstruct
+1
-0
bsp/stm32/stm32f767-fire-challenger/board/linker_scripts/link.lds
...2/stm32f767-fire-challenger/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f767-fire-challenger/rtconfig.py
bsp/stm32/stm32f767-fire-challenger/rtconfig.py
+11
-2
bsp/stm32/stm32f767-st-nucleo/SConstruct
bsp/stm32/stm32f767-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32f767-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32f767-st-nucleo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32f767-st-nucleo/rtconfig.py
bsp/stm32/stm32f767-st-nucleo/rtconfig.py
+9
-2
bsp/stm32/stm32g071-st-nucleo/SConstruct
bsp/stm32/stm32g071-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32g071-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32g071-st-nucleo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32g071-st-nucleo/rtconfig.py
bsp/stm32/stm32g071-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32l053-st-nucleo/SConstruct
bsp/stm32/stm32l053-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32l053-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32l053-st-nucleo/board/linker_scripts/link.lds
+14
-0
bsp/stm32/stm32l053-st-nucleo/rtconfig.py
bsp/stm32/stm32l053-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32l432-st-nucleo/SConstruct
bsp/stm32/stm32l432-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32l432-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32l432-st-nucleo/board/linker_scripts/link.lds
+14
-0
bsp/stm32/stm32l432-st-nucleo/rtconfig.py
bsp/stm32/stm32l432-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32l475-atk-pandora/SConstruct
bsp/stm32/stm32l475-atk-pandora/SConstruct
+1
-0
bsp/stm32/stm32l475-atk-pandora/board/linker_scripts/link.lds
...stm32/stm32l475-atk-pandora/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32l475-atk-pandora/rtconfig.py
bsp/stm32/stm32l475-atk-pandora/rtconfig.py
+12
-1
bsp/stm32/stm32l475-st-discovery/SConstruct
bsp/stm32/stm32l475-st-discovery/SConstruct
+1
-0
bsp/stm32/stm32l475-st-discovery/board/linker_scripts/link.lds
...tm32/stm32l475-st-discovery/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32l475-st-discovery/rtconfig.py
bsp/stm32/stm32l475-st-discovery/rtconfig.py
+11
-1
bsp/stm32/stm32l476-st-nucleo/SConstruct
bsp/stm32/stm32l476-st-nucleo/SConstruct
+1
-0
bsp/stm32/stm32l476-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32l476-st-nucleo/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32l476-st-nucleo/rtconfig.py
bsp/stm32/stm32l476-st-nucleo/rtconfig.py
+11
-1
bsp/stm32/stm32l496-ali-developer/SConstruct
bsp/stm32/stm32l496-ali-developer/SConstruct
+1
-0
bsp/stm32/stm32l496-ali-developer/board/linker_scripts/link.lds
...m32/stm32l496-ali-developer/board/linker_scripts/link.lds
+13
-0
bsp/stm32/stm32l496-ali-developer/rtconfig.py
bsp/stm32/stm32l496-ali-developer/rtconfig.py
+11
-1
未找到文件。
bsp/stm32/stm32f091-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f091-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f091-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f103-atk-nano/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f103-atk-nano/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f103-atk-nano/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f103-atk-warshipv3/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f103-atk-warshipv3/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f103-dofly-lyc8/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f103-dofly-lyc8/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f103-fire-arbitrary/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f103-fire-arbitrary/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f103-hw100k-ibox/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f103-hw100k-ibox/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f103-mini-system/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f103-mini-system/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f103-mini-system/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,16 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,16 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +139,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +139,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f107-uc-eval/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f107-uc-eval/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f107-uc-eval/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f401-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f401-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f401-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,8 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f405-smdz-breadfruit/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f405-smdz-breadfruit/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -49,6 +49,14 @@ SECTIONS
...
@@ -49,6 +49,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > CODE = 0
} > CODE = 0
...
@@ -75,6 +83,11 @@ SECTIONS
...
@@ -75,6 +83,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f407-atk-explorer/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f407-atk-explorer/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -49,6 +49,14 @@ SECTIONS
...
@@ -49,6 +49,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > CODE = 0
} > CODE = 0
...
@@ -75,6 +83,11 @@ SECTIONS
...
@@ -75,6 +83,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f407-atk-explorer/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f407-st-discovery/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f407-st-discovery/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -48,6 +48,14 @@ SECTIONS
...
@@ -48,6 +48,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > CODE = 0
} > CODE = 0
...
...
bsp/stm32/stm32f407-st-discovery/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f411-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f411-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,15 @@ SECTIONS
...
@@ -47,6 +47,15 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +82,11 @@ SECTIONS
...
@@ -73,6 +82,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f411-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f429-armfly-v6/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f429-armfly-v6/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -49,6 +49,14 @@ SECTIONS
...
@@ -49,6 +49,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > CODE = 0
} > CODE = 0
...
@@ -75,6 +83,11 @@ SECTIONS
...
@@ -75,6 +83,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f429-armfly-v6/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -35,6 +35,7 @@ if PLATFORM == 'gcc':
...
@@ -35,6 +35,7 @@ if PLATFORM == 'gcc':
PREFIX
=
'arm-none-eabi-'
PREFIX
=
'arm-none-eabi-'
CC
=
PREFIX
+
'gcc'
CC
=
PREFIX
+
'gcc'
AS
=
PREFIX
+
'gcc'
AS
=
PREFIX
+
'gcc'
CXX
=
PREFIX
+
'g++'
AR
=
PREFIX
+
'ar'
AR
=
PREFIX
+
'ar'
LINK
=
PREFIX
+
'gcc'
LINK
=
PREFIX
+
'gcc'
TARGET_EXT
=
'elf'
TARGET_EXT
=
'elf'
...
@@ -43,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -43,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -56,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -56,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -84,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -84,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -129,5 +138,8 @@ elif PLATFORM == 'iar':
...
@@ -129,5 +138,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f429-atk-apollo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f429-atk-apollo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -55,6 +55,14 @@ SECTIONS
...
@@ -55,6 +55,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > CODE = 0
} > CODE = 0
...
@@ -81,6 +89,11 @@ SECTIONS
...
@@ -81,6 +89,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f429-atk-apollo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f429-fire-challenger/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f429-fire-challenger/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -49,6 +49,14 @@ SECTIONS
...
@@ -49,6 +49,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > CODE = 0
} > CODE = 0
...
@@ -75,6 +83,11 @@ SECTIONS
...
@@ -75,6 +83,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f429-fire-challenger/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f446-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f446-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,12 @@ SECTIONS
...
@@ -73,6 +81,12 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f446-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32f746-st-disco/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f746-st-disco/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f746-st-disco/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
...
@@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
STRIP
=
PREFIX
+
'strip'
STRIP
=
PREFIX
+
'strip'
DEVICE
=
' -mcpu='
+
CPU
+
' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu='
+
CPU
+
' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
g -Wall'
CFLAGS
=
DEVICE
+
' -g -Wall'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -56,6 +56,9 @@ if PLATFORM == 'gcc':
...
@@ -56,6 +56,9 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2 -Os'
CFLAGS
+=
' -O2 -Os'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
# module setting
# module setting
...
@@ -92,6 +95,7 @@ elif PLATFORM == 'armcc':
...
@@ -92,6 +95,7 @@ elif PLATFORM == 'armcc':
CFLAGS
+=
' -O2 -Otime'
CFLAGS
+=
' -O2 -Otime'
CXXFLAGS
=
CFLAGS
CXXFLAGS
=
CFLAGS
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
...
...
bsp/stm32/stm32f767-atk-apollo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f767-atk-apollo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f767-atk-apollo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -86,11 +90,14 @@ elif PLATFORM == 'armcc':
...
@@ -86,11 +90,14 @@ elif PLATFORM == 'armcc':
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -131,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -131,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
\ No newline at end of file
bsp/stm32/stm32f767-fire-challenger/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f767-fire-challenger/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f767-fire-challenger/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,12 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,12 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -131,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -131,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
\ No newline at end of file
bsp/stm32/stm32f767-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32f767-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32f767-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
...
@@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
STRIP
=
PREFIX
+
'strip'
STRIP
=
PREFIX
+
'strip'
DEVICE
=
' -mcpu='
+
CPU
+
' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu='
+
CPU
+
' -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
g -Wall'
CFLAGS
=
DEVICE
+
' -g -Wall'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -56,6 +56,9 @@ if PLATFORM == 'gcc':
...
@@ -56,6 +56,9 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2 -Os'
CFLAGS
+=
' -O2 -Os'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
# module setting
# module setting
...
@@ -70,6 +73,7 @@ elif PLATFORM == 'armcc':
...
@@ -70,6 +73,7 @@ elif PLATFORM == 'armcc':
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
CXX
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -91,13 +95,16 @@ elif PLATFORM == 'armcc':
...
@@ -91,13 +95,16 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2 -Otime'
CFLAGS
+=
' -O2 -Otime'
CXXFLAGS
=
CFLAGS
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
CXX
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
...
bsp/stm32/stm32g071-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32g071-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32g071-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32l053-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32l053-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,12 @@ SECTIONS
...
@@ -72,6 +80,12 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32l053-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32l432-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32l432-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,12 @@ SECTIONS
...
@@ -73,6 +81,12 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32l432-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32l475-atk-pandora/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32l475-atk-pandora/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32l475-atk-pandora/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,16 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,16 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +139,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +139,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32l475-st-discovery/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32l475-st-discovery/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -48,6 +48,14 @@ SECTIONS
...
@@ -48,6 +48,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -74,6 +82,11 @@ SECTIONS
...
@@ -74,6 +82,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32l475-st-discovery/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32l476-st-nucleo/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32l476-st-nucleo/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -47,6 +47,14 @@ SECTIONS
...
@@ -47,6 +47,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -73,6 +81,11 @@ SECTIONS
...
@@ -73,6 +81,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32l476-st-nucleo/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
...
@@ -129,6 +137,8 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
bsp/stm32/stm32l496-ali-developer/SConstruct
浏览文件 @
4f03ef58
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
...
@@ -21,6 +21,7 @@ env = Environment(tools = ['mingw'],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
CC
=
rtconfig
.
CC
,
CCFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
...
...
bsp/stm32/stm32l496-ali-developer/board/linker_scripts/link.lds
浏览文件 @
4f03ef58
...
@@ -46,6 +46,14 @@ SECTIONS
...
@@ -46,6 +46,14 @@ SECTIONS
__rt_init_end = .;
__rt_init_end = .;
. = ALIGN(4);
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
_etext = .;
} > ROM = 0
} > ROM = 0
...
@@ -72,6 +80,11 @@ SECTIONS
...
@@ -72,6 +80,11 @@ SECTIONS
*(.data.*)
*(.data.*)
*(.gnu.linkonce.d*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
_edata = . ;
...
...
bsp/stm32/stm32l496-ali-developer/rtconfig.py
浏览文件 @
4f03ef58
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
...
@@ -44,7 +44,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -
std=c99 -
Dgcc'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
...
@@ -57,11 +57,15 @@ if PLATFORM == 'gcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
elif
PLATFORM
==
'armcc'
:
# toolchains
# toolchains
CC
=
'armcc'
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AS
=
'armasm'
AR
=
'armar'
AR
=
'armar'
LINK
=
'armlink'
LINK
=
'armlink'
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
...
@@ -85,11 +89,15 @@ elif PLATFORM == 'armcc':
else
:
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iar'
:
elif
PLATFORM
==
'iar'
:
# toolchains
# toolchains
CC
=
'iccarm'
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AS
=
'iasmarm'
AR
=
'iarchive'
AR
=
'iarchive'
LINK
=
'ilinkarm'
LINK
=
'ilinkarm'
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
...
@@ -130,5 +138,7 @@ elif PLATFORM == 'iar':
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录