Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
37b10ab9
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
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,发现更多精彩内容 >>
提交
37b10ab9
编写于
6月 04, 2015
作者:
B
BernardXiong
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'upstream/master'
上级
3f6c511a
ebe21c47
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
63 addition
and
27 deletion
+63
-27
bsp/stm32f10x/drivers/bxcan.c
bsp/stm32f10x/drivers/bxcan.c
+9
-11
libcpu/arm/arm926/start_gcc.S
libcpu/arm/arm926/start_gcc.S
+7
-5
libcpu/arm/arm926/start_iar.S
libcpu/arm/arm926/start_iar.S
+7
-5
libcpu/arm/arm926/start_rvds.S
libcpu/arm/arm926/start_rvds.S
+40
-6
未找到文件。
bsp/stm32f10x/drivers/bxcan.c
浏览文件 @
37b10ab9
...
...
@@ -262,8 +262,6 @@ static void bxcan1_hw_init(void)
GPIO_InitTypeDef
GPIO_InitStructure
;
NVIC_InitTypeDef
NVIC_InitStructure
;
RCC_APB2PeriphClockCmd
(
RCC_APB2Periph_AFIO
|
RCC_APB2Periph_GPIOA
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Pin
=
GPIO_Pin_11
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IPU
;
GPIO_Init
(
GPIOA
,
&
GPIO_InitStructure
);
...
...
@@ -273,9 +271,6 @@ static void bxcan1_hw_init(void)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_50MHz
;
GPIO_Init
(
GPIOA
,
&
GPIO_InitStructure
);
RCC_APB1PeriphClockCmd
(
RCC_APB1Periph_CAN1
,
ENABLE
);
CAN_DeInit
(
CAN1
);
NVIC_PriorityGroupConfig
(
NVIC_PriorityGroup_1
);
NVIC_InitStructure
.
NVIC_IRQChannel
=
CAN1_RX0_IRQn
;
NVIC_InitStructure
.
NVIC_IRQChannelPreemptionPriority
=
0x1
;
...
...
@@ -292,8 +287,6 @@ static void bxcan2_hw_init(void)
GPIO_InitTypeDef
GPIO_InitStructure
;
NVIC_InitTypeDef
NVIC_InitStructure
;
RCC_APB2PeriphClockCmd
(
RCC_APB2Periph_AFIO
|
RCC_APB2Periph_GPIOB
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IPU
;
GPIO_InitStructure
.
GPIO_Pin
=
GPIO_Pin_12
;
GPIO_Init
(
GPIOB
,
&
GPIO_InitStructure
);
...
...
@@ -302,10 +295,6 @@ static void bxcan2_hw_init(void)
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_AF_PP
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_50MHz
;
GPIO_Init
(
GPIOB
,
&
GPIO_InitStructure
);
RCC_APB1PeriphClockCmd
(
RCC_APB1Periph_CAN2
,
ENABLE
);
CAN_DeInit
(
CAN2
);
NVIC_PriorityGroupConfig
(
NVIC_PriorityGroup_1
);
NVIC_InitStructure
.
NVIC_IRQChannel
=
CAN2_RX0_IRQn
;
...
...
@@ -1371,6 +1360,9 @@ int stm32_bxcan_init(void)
{
#ifdef USING_BXCAN1
RCC_APB2PeriphClockCmd
(
RCC_APB2Periph_AFIO
|
RCC_APB2Periph_GPIOA
,
ENABLE
);
RCC_APB1PeriphClockCmd
(
RCC_APB1Periph_CAN1
,
ENABLE
);
CAN_DeInit
(
CAN1
);
bxcan1
.
config
.
baud_rate
=
CAN1MBaud
;
bxcan1
.
config
.
msgboxsz
=
16
;
bxcan1
.
config
.
sndboxnumber
=
3
;
...
...
@@ -1389,6 +1381,12 @@ int stm32_bxcan_init(void)
#endif
#ifdef USING_BXCAN2
RCC_APB2PeriphClockCmd
(
RCC_APB2Periph_AFIO
|
RCC_APB2Periph_GPIOB
,
ENABLE
);
#ifndef USING_BXCAN1
RCC_APB1PeriphClockCmd
(
RCC_APB1Periph_CAN1
,
ENABLE
);
#endif
RCC_APB1PeriphClockCmd
(
RCC_APB1Periph_CAN2
,
ENABLE
);
CAN_DeInit
(
CAN2
);
bxcan2
.
config
.
baud_rate
=
CAN1MBaud
;
bxcan2
.
config
.
msgboxsz
=
16
;
bxcan2
.
config
.
sndboxnumber
=
3
;
...
...
libcpu/arm/arm926/start_gcc.S
浏览文件 @
37b10ab9
...
...
@@ -22,6 +22,7 @@
*
2011
-
01
-
13
weety
first
version
*
2015
-
04
-
15
ArdaFu
Split
from
AT91SAM9260
BSP
*
2015
-
04
-
21
ArdaFu
Remove
remap
code
.
Using
mmu
to
map
vector
table
*
2015
-
06
-
04
aozima
Align
stack
address
to
8
byte
.
*/
#define S_FRAME_SIZE (18*4) //72
...
...
@@ -61,31 +62,32 @@
.
section
.
nobss
,
"w"
.
space
UND_STK_SIZE
.
align
3
.
global
UND_STACK_START
UND_STACK_START
:
.
space
ABT_STK_SIZE
.
align
2
.
align
3
.
global
ABT_STACK_START
ABT_STACK_START
:
.
space
FIQ_STK_SIZE
.
align
2
.
align
3
.
global
FIQ_STACK_START
FIQ_STACK_START
:
.
space
IRQ_STK_SIZE
.
align
2
.
align
3
.
global
IRQ_STACK_START
IRQ_STACK_START
:
.
skip
SYS_STK_SIZE
.
align
2
.
align
3
.
global
SYS_STACK_START
SYS_STACK_START
:
.
space
SVC_STK_SIZE
.
align
2
.
align
3
.
global
SVC_STACK_START
SVC_STACK_START
:
...
...
libcpu/arm/arm926/start_iar.S
浏览文件 @
37b10ab9
...
...
@@ -22,6 +22,7 @@
; * 2011-01-13 weety first version
; * 2015-04-15 ArdaFu Split from AT91SAM9260 BSP
; * 2015-04-21 ArdaFu Remove remap code. Using mmu to map vector table
; * 2015-06-04 aozima Align stack address to 8 byte.
; */
#define S_FRAME_SIZE (18*4) ;72
...
...
@@ -62,31 +63,32 @@
SECTION
.
noinit
:
DATA
:
NOROOT
(
3
)
DATA
ALIGNRAM
3
DS8
UND_STK_SIZE
PUBLIC
UND_STACK_START
UND_STACK_START
:
ALIGNRAM
2
ALIGNRAM
3
DS8
ABT_STK_SIZE
PUBLIC
ABT_STACK_START
ABT_STACK_START
:
ALIGNRAM
2
ALIGNRAM
3
DS8
FIQ_STK_SIZE
PUBLIC
FIQ_STACK_START
FIQ_STACK_START
:
ALIGNRAM
2
ALIGNRAM
3
DS8
IRQ_STK_SIZE
PUBLIC
IRQ_STACK_START
IRQ_STACK_START
:
ALIGNRAM
2
ALIGNRAM
3
DS8
SYS_STK_SIZE
PUBLIC
SYS_STACK_START
SYS_STACK_START
:
ALIGNRAM
2
ALIGNRAM
3
DS8
SVC_STK_SIZE
PUBLIC
SVC_STACK_START
SVC_STACK_START
:
...
...
libcpu/arm/arm926/start_rvds.S
浏览文件 @
37b10ab9
...
...
@@ -22,6 +22,7 @@
; * 2011-08-14 weety first version
; * 2015-04-15 ArdaFu Split from AT91SAM9260 BSP
; * 2015-04-21 ArdaFu Remove remap code. Using mmu to map vector table
; * 2015-06-04 aozima Align stack address to 8 byte.
; */
S_FRAME_SIZE
EQU
(
18
*
4
)
;72
...
...
@@ -60,38 +61,44 @@ NOINT EQU 0xC0
GET
rt_low_level_keil.inc
;----------------------- Stack and Heap Definitions ----------------------------
AREA
STACK
,
NOINIT
,
READWRITE
,
ALIGN
=
2
AREA
STACK
,
NOINIT
,
READWRITE
,
ALIGN
=
3
Stack_Mem
SPACE
UND_STK_SIZE
EXPORT
UND_STACK_START
UND_STACK_START
ALIGN
4
ALIGN
8
SPACE
ABT_STK_SIZE
EXPORT
ABT_STACK_START
ABT_STACK_START
ALIGN
4
ALIGN
8
SPACE
FIQ_STK_SIZE
EXPORT
FIQ_STACK_START
FIQ_STACK_START
ALIGN
4
ALIGN
8
SPACE
IRQ_STK_SIZE
EXPORT
IRQ_STACK_START
IRQ_STACK_START
ALIGN
4
ALIGN
8
SPACE
SYS_STK_SIZE
EXPORT
SYS_STACK_START
SYS_STACK_START
ALIGN
4
ALIGN
8
SPACE
SVC_STK_SIZE
EXPORT
SVC_STACK_START
SVC_STACK_START
Stack_Top
__initial_sp
__heap_base
Heap_Mem
SPACE
Heap_Size
__heap_limit
PRESERVE8
;--------------Jump vector table------------------------------------------------
EXPORT
Entry_Point
...
...
@@ -291,4 +298,31 @@ rt_hw_context_switch_interrupt_do PROC
LDMFD
SP
!,
{
R0
-
R12
,
LR
,
PC
}^
; pop new task's R0-R12,LR & PC SPSR to CPSR
ENDP
;*******************************************************************************
; User Stack and Heap initialization
;*******************************************************************************
IF
:DEF:
__MICROLIB
EXPORT
__initial_sp
EXPORT
__heap_base
EXPORT
__heap_limit
ELSE
IMPORT
__use_two_region_memory
EXPORT
__user_initial_stackheap
__user_initial_stackheap
LDR
R0
,
=
Heap_Mem
; heap base
LDR
R1
,
=
SVC_STACK_START
; stack base (top-address)
LDR
R2
,
=
(
Heap_Mem
+
Heap_Size
)
; heap limit
LDR
R3
,
=
(
SVC_STACK_START
-
SVC_STK_SIZE
)
; stack limit (low-address)
BX
LR
ALIGN
ENDIF
END
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录