Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
28e925c9
R
rt-thread
项目概览
2345VOR
/
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,发现更多精彩内容 >>
提交
28e925c9
编写于
12月 31, 2017
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BSP] fix the compiling issue
上级
8a923193
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
242 addition
and
58 deletion
+242
-58
bsp/lm3s8962/Libraries/SConscript
bsp/lm3s8962/Libraries/SConscript
+3
-3
bsp/lm3s8962/SConstruct
bsp/lm3s8962/SConstruct
+1
-1
bsp/lm4f232/Libraries/startup/gcc/start_gcc.c
bsp/lm4f232/Libraries/startup/gcc/start_gcc.c
+10
-10
bsp/lm4f232/lm4f_rom.ld
bsp/lm4f232/lm4f_rom.ld
+108
-17
bsp/tm4c129x/libraries/startup/startup_gcc.c
bsp/tm4c129x/libraries/startup/startup_gcc.c
+6
-6
bsp/tm4c129x/tm4c_rom.ld
bsp/tm4c129x/tm4c_rom.ld
+114
-21
未找到文件。
bsp/lm3s8962/Libraries/SConscript
浏览文件 @
28e925c9
...
...
@@ -4,7 +4,7 @@ from building import *
# The set of source files associated with this SConscript file.
cwd
=
GetCurrentDir
()
src
=
Glob
(
'driverlib/*.c'
)
src
=
Glob
(
'driverlib/*.c'
)
# cortex-m3 no FPU.
if
rtconfig
.
PART_TYPE
.
startswith
(
'PART_LM4F'
)
!=
True
:
...
...
@@ -18,9 +18,9 @@ elif rtconfig.CROSS_TOOL == 'keil':
elif
rtconfig
.
CROSS_TOOL
==
'iar'
:
src
+=
[
'startup/iar/start_iar.S'
]
CPPPATH
=
[
cwd
]
CPPPATH
=
[
cwd
]
CPPDEFINES
=
[
rtconfig
.
PART_TYPE
]
group
=
DefineGroup
(
'Libraries'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
CPPDEFINES
=
CPPDEFINES
)
Return
(
'group'
)
bsp/lm3s8962/SConstruct
浏览文件 @
28e925c9
...
...
@@ -23,7 +23,7 @@ Export('RTT_ROOT')
Export
(
'rtconfig'
)
# prepare building environment
objs
=
PrepareBuilding
(
env
,
RTT_ROOT
,
has_libcpu
=
False
)
objs
=
PrepareBuilding
(
env
,
RTT_ROOT
)
# make a building
DoBuilding
(
TARGET
,
objs
)
bsp/lm4f232/Libraries/startup/gcc/start_gcc.c
浏览文件 @
28e925c9
...
...
@@ -30,7 +30,7 @@
// Forward declaration of the default fault handlers.
//
//*****************************************************************************
void
Reset
ISR
(
void
);
void
Reset
_Handler
(
void
);
static
void
NmiSR
(
void
);
static
void
FaultISR
(
void
);
static
void
IntDefaultHandler
(
void
);
...
...
@@ -70,9 +70,9 @@ void (* const g_pfnVectors[])(void) =
{
(
void
(
*
)(
void
))((
unsigned
long
)
pulStack
+
sizeof
(
pulStack
)),
// The initial stack pointer
Reset
ISR
,
// The reset handler
Reset
_Handler
,
// The reset handler
NmiSR
,
// The NMI handler
HardFault_Handler
,
// The hard fault handler
HardFault_Handler
,
// The hard fault handler
IntDefaultHandler
,
// The MPU fault handler
IntDefaultHandler
,
// The bus fault handler
IntDefaultHandler
,
// The usage fault handler
...
...
@@ -233,10 +233,10 @@ void (* const g_pfnVectors[])(void) =
// for the "data" segment resides immediately following the "text" segment.
//
//*****************************************************************************
extern
unsigned
long
_
etext
;
extern
unsigned
long
_data
;
extern
unsigned
long
_
sidata
;
extern
unsigned
long
_
s
data
;
extern
unsigned
long
_edata
;
extern
unsigned
long
_bss
;
extern
unsigned
long
_
s
bss
;
extern
unsigned
long
_ebss
;
//*****************************************************************************
...
...
@@ -250,15 +250,15 @@ extern unsigned long _ebss;
//
//*****************************************************************************
void
Reset
ISR
(
void
)
Reset
_Handler
(
void
)
{
unsigned
long
*
pulSrc
,
*
pulDest
;
//
// Copy the data segment initializers from flash to SRAM.
//
pulSrc
=
&
_
etext
;
for
(
pulDest
=
&
_data
;
pulDest
<
&
_edata
;
)
pulSrc
=
&
_
sidata
;
for
(
pulDest
=
&
_
s
data
;
pulDest
<
&
_edata
;
)
{
*
pulDest
++
=
*
pulSrc
++
;
}
...
...
@@ -266,7 +266,7 @@ ResetISR(void)
//
// Zero fill the bss segment.
//
__asm
(
" ldr r0, =_bss
\n
"
__asm
(
" ldr r0, =_
s
bss
\n
"
" ldr r1, =_ebss
\n
"
" mov r2, #0
\n
"
" .thumb_func
\n
"
...
...
bsp/lm4f232/lm4f_rom.ld
浏览文件 @
28e925c9
...
...
@@ -25,19 +25,26 @@
/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
FLASH
(rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
SRAM (rwx) : ORIGIN = 0x2
0000000, LENGTH = 0x00008000
CODE
(rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
DATA (rw) : ORIGIN = 0x1
0000000, LENGTH = 0x00008000
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
SECTIONS
{
.text :
{
_text = .;
KEEP(*(.isr_vector))
*(.text*)
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
*(.text) /* remaining code */
*(.text.*) /* remaining code */
*(.rodata) /* read-only data (constants) */
*(.rodata*)
_etext = .;
*(.glue_7)
*(.glue_7t)
*(.gnu.linkonce.t*)
/* section information for finsh shell */
. = ALIGN(4);
...
...
@@ -56,24 +63,108 @@ SECTIONS
__rt_init_end = .;
. = ALIGN(4);
} > FLASH
PROVIDE(__ctors_start__ = .);
/* old GCC version uses .ctors */
KEEP(*(SORT(.ctors.*)))
KEEP(*(.ctors))
/* new GCC version uses .init_array */
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
} > CODE = 0
.ARM.extab :
{
*(.ARM.extab*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_sidata = .;
} > CODE
/* .data section which is used for initialized data */
.data : AT (_sidata)
{
. = ALIGN(4);
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_sdata = . ;
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} > DATA
.
data : AT(ADDR(.text) + SIZEOF(.text))
.
stack :
{
_data = .;
*(vtable)
*(.data*)
_edata = .;
} > SRAM
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
__bss_start = .;
.bss :
{
_bss = .;
*(.bss*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .;
*(.bss)
*(.bss.*)
*(COMMON)
_ebss = .;
} > SRAM
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
__bss_end = .;
_end = .;
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
* Symbols in the DWARF debugging sections are relative to the beginning
* of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
}
bsp/tm4c129x/libraries/startup/startup_gcc.c
浏览文件 @
28e925c9
...
...
@@ -201,10 +201,10 @@ void (* const g_pfnVectors[])(void) =
// for the "data" segment resides immediately following the "text" segment.
//
//*****************************************************************************
extern
uint32_t
_
l
data
;
extern
uint32_t
_data
;
extern
uint32_t
_
si
data
;
extern
uint32_t
_
s
data
;
extern
uint32_t
_edata
;
extern
uint32_t
_bss
;
extern
uint32_t
_
s
bss
;
extern
uint32_t
_ebss
;
//*****************************************************************************
...
...
@@ -225,8 +225,8 @@ ResetISR(void)
//
// Copy the data segment initializers from flash to SRAM.
//
pui32Src
=
&
_
l
data
;
for
(
pui32Dest
=
&
_data
;
pui32Dest
<
&
_edata
;
)
pui32Src
=
&
_
si
data
;
for
(
pui32Dest
=
&
_
s
data
;
pui32Dest
<
&
_edata
;
)
{
*
pui32Dest
++
=
*
pui32Src
++
;
}
...
...
@@ -234,7 +234,7 @@ ResetISR(void)
//
// Zero fill the bss segment.
//
__asm
(
" ldr r0, =_bss
\n
"
__asm
(
" ldr r0, =_
s
bss
\n
"
" ldr r1, =_ebss
\n
"
" mov r2, #0
\n
"
" .thumb_func
\n
"
...
...
bsp/tm4c129x/tm4c_rom.ld
浏览文件 @
28e925c9
...
...
@@ -24,20 +24,29 @@
MEMORY
{
FLASH (rx)
: ORIGIN = 0x00000000, LENGTH = 0x00100000
SRAM
(rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
CODE (rx)
: ORIGIN = 0x00000000, LENGTH = 0x00100000
DATA
(rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
}
ENTRY(ResetISR)
_system_stack_size = 0x200;
SECTIONS
{
.text :
{
_text = .;
KEEP(*(.isr_vector))
*(.text*)
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
*(.text) /* remaining code */
*(.text.*) /* remaining code */
*(.rodata) /* read-only data (constants) */
*(.rodata*)
/* section information for finsh shell */
*(.glue_7)
*(.glue_7t)
*(.gnu.linkonce.t*)
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
...
...
@@ -48,30 +57,114 @@ SECTIONS
__vsymtab_end = .;
. = ALIGN(4);
/* section information for initial. */
. = ALIGN(4);
__rt_init_start = .;
KEEP(*(SORT(.rti_fn*)))
__rt_init_end = .;
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
/* old GCC version uses .ctors */
KEEP(*(SORT(.ctors.*)))
KEEP(*(.ctors))
/* new GCC version uses .init_array */
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
} >
FLASH
} >
CODE = 0
.data : AT(ADDR(.text) + SIZEOF(.text))
.ARM.extab :
{
*(.ARM.extab*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_sidata = .;
} > CODE
/* .data section which is used for initialized data */
.data : AT (_sidata)
{
_data = .;
_ldata = LOADADDR (.data);
*(vtable)
*(.data*)
_edata = .;
} > SRAM
. = ALIGN(4);
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_sdata = . ;
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} > DATA
.stack :
{
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
__bss_start = .;
.bss :
{
_bss = .;
*(.bss*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .;
*(.bss)
*(.bss.*)
*(COMMON)
_ebss = .;
} > SRAM
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
__bss_end = .;
_end = .;
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
* Symbols in the DWARF debugging sections are relative to the beginning
* of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录