Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mozi
rt-thread
提交
ad917d90
R
rt-thread
项目概览
Mozi
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
0
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,发现更多精彩内容 >>
提交
ad917d90
编写于
10月 21, 2020
作者:
G
GFWisshit
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改了license header,修改了sconscipt,修改了board.c指针的强制转换类型,interrupt.c添加了新的函数。
上级
c1f4d6c6
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
122 addition
and
263 deletion
+122
-263
bsp/bm3803/applications/board.c
bsp/bm3803/applications/board.c
+9
-19
bsp/bm3803/applications/board.h
bsp/bm3803/applications/board.h
+8
-18
bsp/bm3803/applications/main.c
bsp/bm3803/applications/main.c
+8
-18
bsp/bm3803/drivers/uart.c
bsp/bm3803/drivers/uart.c
+8
-18
bsp/bm3803/drivers/uart.h
bsp/bm3803/drivers/uart.h
+8
-18
bsp/bm3803/drivers/uart_reg.h
bsp/bm3803/drivers/uart_reg.h
+8
-18
libcpu/sparc-v8/bm3803/bm3803.h
libcpu/sparc-v8/bm3803/bm3803.h
+8
-18
libcpu/sparc-v8/bm3803/context_gcc.S
libcpu/sparc-v8/bm3803/context_gcc.S
+8
-18
libcpu/sparc-v8/bm3803/interrupt.c
libcpu/sparc-v8/bm3803/interrupt.c
+16
-18
libcpu/sparc-v8/bm3803/interrupt.h
libcpu/sparc-v8/bm3803/interrupt.h
+9
-22
libcpu/sparc-v8/bm3803/stack.c
libcpu/sparc-v8/bm3803/stack.c
+8
-18
libcpu/sparc-v8/bm3803/start_gcc.S
libcpu/sparc-v8/bm3803/start_gcc.S
+8
-18
libcpu/sparc-v8/bm3803/trap.c
libcpu/sparc-v8/bm3803/trap.c
+8
-18
libcpu/sparc-v8/bm3803/vector_gcc.S
libcpu/sparc-v8/bm3803/vector_gcc.S
+8
-18
libcpu/sparc-v8/common/SConscript
libcpu/sparc-v8/common/SConscript
+0
-6
未找到文件。
bsp/bm3803/applications/board.c
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#include <rthw.h>
#include <rtthread.h>
...
...
@@ -58,7 +48,7 @@ INIT_BOARD_EXPORT(rt_hw_timer_init);
*/
void
rt_hw_board_init
(
void
)
{
rt_system_heap_init
((
void
*
)
&
__bss_end
,
(
void
*
)
&
__bss_end
+
0x01000000
);
rt_system_heap_init
((
void
*
)
&
__bss_end
,
(
unsigned
char
*
)
&
__bss_end
+
0x01000000
);
rt_components_board_init
();
rt_console_set_device
(
RT_CONSOLE_DEVICE_NAME
);
}
bsp/bm3803/applications/board.h
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#ifndef __BOARD_H__
#define __BOARD_H__
...
...
bsp/bm3803/applications/main.c
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#include <stdint.h>
#include <stdio.h>
...
...
bsp/bm3803/drivers/uart.c
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#include <rthw.h>
#include <rtthread.h>
...
...
bsp/bm3803/drivers/uart.h
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#ifndef __SERIAL_H__
#define __SERIAL_H__
...
...
bsp/bm3803/drivers/uart_reg.h
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#ifndef SERIAL_REG_H
#define SERIAL_REG_H
...
...
libcpu/sparc-v8/bm3803/bm3803.h
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#ifndef __BM3803_H__
#define __BM3803_H__
...
...
libcpu/sparc-v8/bm3803/context_gcc.S
浏览文件 @
ad917d90
/*
Copyright
2020
Shenzhen
Academy
of
Aerospace
Technology
Licensed
under
the
Apache
License
,
Version
2
.0
(
the
"License"
)
;
you
may
not
use
this
file
except
in
compliance
with
the
License
.
You
may
obtain
a
copy
of
the
License
at
http
://
www.apache.org
/
licenses
/
LICENSE
-2.0
Unless
required
by
applicable
law
or
agreed
to
in
writing
,
software
distributed
under
the
License
is
distributed
on
an
"AS IS"
BASIS
,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
Change
Logs
:
Date
Author
Notes
2020
-
10
-
16
Dystopia
the
first
version
*/
*
Copyright
(
c
)
2020
,
Shenzhen
Academy
of
Aerospace
Technology
*
*
SPDX
-
License
-
Identifier
:
Apache
-
2
.0
*
*
Change
Logs
:
*
Date
Author
Notes
*
2020
-
10
-
16
Dystopia
the
first
version
*/
#define SPARC_PSR_PIL_MASK 0x00000F00
#define SPARC_PSR_ET_MASK 0x00000020
...
...
libcpu/sparc-v8/bm3803/interrupt.c
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#include <rthw.h>
#include <rtthread.h>
...
...
@@ -98,3 +88,11 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
return
old_handler
;
}
void
rt_hw_interrupt_clear
(
int
vector
)
{
if
(
vector
>
0x1F
||
vector
<
0x11
)
return
;
volatile
struct
lregs
*
regs
=
(
struct
lregs
*
)
PREGS
;
regs
->
irqclear
|=
1
<<
(
vector
-
0x10
);
}
libcpu/sparc-v8/bm3803/interrupt.h
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
* 2020-10-21 Dystopia Add new function
*/
#ifndef __INTERRUPT_H__
#define __INTERRUPT_H__
void
rt_hw_interrupt_control
(
int
vector
,
int
priority
,
int
route
);
int
rt_hw_interrupt_get_active
(
int
fiq_irq
);
void
rt_hw_interrupt_ack
(
int
fiq_irq
);
void
rt_hw_interrupt_trigger
(
int
vector
);
void
rt_hw_interrupt_clear
(
int
vector
);
#endif
libcpu/sparc-v8/bm3803/stack.c
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#include <rtthread.h>
...
...
libcpu/sparc-v8/bm3803/start_gcc.S
浏览文件 @
ad917d90
/*
Copyright
2020
Shenzhen
Academy
of
Aerospace
Technology
Licensed
under
the
Apache
License
,
Version
2
.0
(
the
"License"
)
;
you
may
not
use
this
file
except
in
compliance
with
the
License
.
You
may
obtain
a
copy
of
the
License
at
http
://
www.apache.org
/
licenses
/
LICENSE
-2.0
Unless
required
by
applicable
law
or
agreed
to
in
writing
,
software
distributed
under
the
License
is
distributed
on
an
"AS IS"
BASIS
,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
Change
Logs
:
Date
Author
Notes
2020
-
10
-
16
Dystopia
the
first
version
*/
*
Copyright
(
c
)
2020
,
Shenzhen
Academy
of
Aerospace
Technology
*
*
SPDX
-
License
-
Identifier
:
Apache
-
2
.0
*
*
Change
Logs
:
*
Date
Author
Notes
*
2020
-
10
-
16
Dystopia
the
first
version
*/
#define PSR_INIT 0x10C0
#define PREGS 0x80000000
...
...
libcpu/sparc-v8/bm3803/trap.c
浏览文件 @
ad917d90
/*
Copyright 2020 Shenzhen Academy of Aerospace Technology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Change Logs:
Date Author Notes
2020-10-16 Dystopia the first version
*/
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-10-16 Dystopia the first version
*/
#include <rtthread.h>
#include <rthw.h>
...
...
libcpu/sparc-v8/bm3803/vector_gcc.S
浏览文件 @
ad917d90
/*
Copyright
2020
Shenzhen
Academy
of
Aerospace
Technology
Licensed
under
the
Apache
License
,
Version
2
.0
(
the
"License"
)
;
you
may
not
use
this
file
except
in
compliance
with
the
License
.
You
may
obtain
a
copy
of
the
License
at
http
://
www.apache.org
/
licenses
/
LICENSE
-2.0
Unless
required
by
applicable
law
or
agreed
to
in
writing
,
software
distributed
under
the
License
is
distributed
on
an
"AS IS"
BASIS
,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
Change
Logs
:
Date
Author
Notes
2020
-
10
-
16
Dystopia
the
first
version
*/
*
Copyright
(
c
)
2020
,
Shenzhen
Academy
of
Aerospace
Technology
*
*
SPDX
-
License
-
Identifier
:
Apache
-
2
.0
*
*
Change
Logs
:
*
Date
Author
Notes
*
2020
-
10
-
16
Dystopia
the
first
version
*/
#define TRAPL(H) mov %g0, %l0; sethi %hi(H), %l4; jmp %l4 + %lo(H); nop;
#define TRAP(H) mov %psr, %l0; sethi %hi(H), %l4; jmp %l4 + %lo(H); nop;
...
...
libcpu/sparc-v8/common/SConscript
浏览文件 @
ad917d90
...
...
@@ -8,16 +8,10 @@ cwd = GetCurrentDir()
src
=
Glob
(
'*.c'
)
+
Glob
(
'*.cpp'
)
CPPPATH
=
[
cwd
]
if
rtconfig
.
PLATFORM
==
'armcc'
:
src
+=
Glob
(
'*_rvds.S'
)
if
rtconfig
.
PLATFORM
==
'gcc'
:
src
+=
Glob
(
'*_init.S'
)
src
+=
Glob
(
'*_gcc.S'
)
if
rtconfig
.
PLATFORM
==
'iar'
:
src
+=
Glob
(
'*_iar.S'
)
group
=
DefineGroup
(
'cpu'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录