Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
在你之后
rt-thread
提交
c1f47af9
R
rt-thread
项目概览
在你之后
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
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,发现更多精彩内容 >>
提交
c1f47af9
编写于
1月 21, 2015
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BSP] remove RT_USING_VMM in default and let it run in QEMU.
上级
86358d08
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
39 deletion
+24
-39
bsp/realview-a8/SConstruct
bsp/realview-a8/SConstruct
+6
-2
bsp/realview-a8/applications/application.c
bsp/realview-a8/applications/application.c
+6
-20
bsp/realview-a8/drivers/board.c
bsp/realview-a8/drivers/board.c
+4
-4
bsp/realview-a8/drivers/serial.c
bsp/realview-a8/drivers/serial.c
+4
-4
bsp/realview-a8/rtconfig.h
bsp/realview-a8/rtconfig.h
+3
-3
bsp/realview-a8/rtconfig.py
bsp/realview-a8/rtconfig.py
+1
-6
未找到文件。
bsp/realview-a8/SConstruct
浏览文件 @
c1f47af9
...
...
@@ -31,8 +31,12 @@ if GetDepend('RT_USING_VMM'):
ldfile
=
rtconfig
.
LINK_SCRIPT
))
!=
0
:
print
'failed to generate linker script %s'
%
rtconfig
.
LINK_SCRIPT
sys
.
exit
(
255
)
# if the linker script changed, relink the target
Depends
(
TARGET
,
rtconfig
.
LINK_SCRIPT
)
# if the linker script changed, relink the target
Depends
(
TARGET
,
rtconfig
.
LINK_SCRIPT
)
else
:
# we should use none-vmm link script
link_flags
=
str
(
env
[
'LINKFLAGS'
])
env
[
'LINKFLAGS'
]
=
link_flags
.
replace
(
'_vmm.lds'
,
'.lds'
)
# make a building
DoBuilding
(
TARGET
,
objs
)
bsp/realview-a8/applications/application.c
浏览文件 @
c1f47af9
...
...
@@ -15,32 +15,18 @@
#include <rtthread.h>
#include <components.h>
#include <pthread.h>
void
*
test_task
(
void
*
parameter
)
void
init_thread
(
void
*
parameter
)
{
int
count
=
0
;
while
(
1
)
{
rt_thread_delay
(
RT_TICK_PER_SECOND
);
rt_kprintf
(
"count = %d
\n
"
,
count
++
);
}
return
RT_NULL
;
rt_components_init
();
}
int
rt_application_init
()
{
// pthread_t tid;
/* do component initialization */
rt_components_init
();
#ifdef RT_USING_NEWLIB
libc_system_init
(
RT_CONSOLE_DEVICE_NAME
);
#endif
rt_thread_t
tid
;
// pthread_create(&tid, RT_NULL, test_task, RT_NULL);
tid
=
rt_thread_create
(
"init"
,
init_thread
,
RT_NULL
,
1024
,
RT_THREAD_PRIORITY_MAX
/
3
,
10
);
if
(
tid
!=
RT_NULL
)
rt_thread_startup
(
tid
);
return
0
;
}
...
...
bsp/realview-a8/drivers/board.c
浏览文件 @
c1f47af9
...
...
@@ -38,11 +38,11 @@
#define SYS_CTRL __REG32(REALVIEW_SCTL_BASE)
#ifdef RT_USING_VMM
#include <vmm.h>
static
rt_uint32_t
timer_hw_base
=
0
;
#define TIMER_HW_BASE (timer_hw_base)
#include <vmm.h>
static
rt_uint32_t
timer_hw_base
=
0
;
#define TIMER_HW_BASE (timer_hw_base)
#else
#define TIMER_HW_BASE REALVIEW_TIMER2_3_BASE
#define TIMER_HW_BASE REALVIEW_TIMER2_3_BASE
#endif
void
rt_hw_timer_ack
(
void
)
...
...
bsp/realview-a8/drivers/serial.c
浏览文件 @
c1f47af9
...
...
@@ -32,7 +32,7 @@
#include "serial.h"
#ifdef RT_USING_VMM
#include <vmm.h>
#include <vmm.h>
#endif
struct
hw_uart_device
...
...
@@ -165,8 +165,8 @@ int rt_hw_uart_init(void)
config
.
parity
=
PARITY_NONE
;
config
.
stop_bits
=
STOP_BITS_1
;
config
.
invert
=
NRZ_NORMAL
;
config
.
bufsz
=
RT_SERIAL_RB_BUFSZ
;
config
.
bufsz
=
RT_SERIAL_RB_BUFSZ
;
#ifdef RT_USING_UART0
uart
=
&
_uart0_device
;
#ifdef RT_USING_VMM
...
...
@@ -194,7 +194,7 @@ int rt_hw_uart_init(void)
/* register UART1 device */
rt_hw_serial_register
(
&
_serial1
,
"uart1"
,
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
,
uart
);
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
,
uart
);
/* enable Rx and Tx of UART */
UART_CR
(
uart
->
hw_base
)
=
(
1
<<
0
)
|
(
1
<<
8
)
|
(
1
<<
9
);
#endif
...
...
bsp/realview-a8/rtconfig.h
浏览文件 @
c1f47af9
...
...
@@ -107,8 +107,8 @@
// </section>
// <section name="LIBC" description="C Runtime library setting" default="always" >
// <bool name="RT_USING_
NEWLIB" description="Using newlib library, only available under GNU GCC
" default="true" />
#define RT_USING_
NEWLIB
// <bool name="RT_USING_
LIBC" description="Using libc library
" default="true" />
#define RT_USING_
LIBC
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
#define RT_USING_PTHREADS
// </section>
...
...
@@ -147,7 +147,7 @@
#define RT_USING_LOGTRACE
// <section name="RT_USING_VMM" description="Enable RT-Thread hypervisor" default="true" >
#define RT_USING_VMM
//
#define RT_USING_VMM
// </section>
#endif
bsp/realview-a8/rtconfig.py
浏览文件 @
c1f47af9
...
...
@@ -21,8 +21,6 @@ if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH
=
os
.
getenv
(
'RTT_EXEC_PATH'
)
BUILD
=
'debug'
VMM
=
True
#VMM = False
if
PLATFORM
==
'gcc'
:
# toolchains
...
...
@@ -40,10 +38,7 @@ if PLATFORM == 'gcc':
DEVICE
=
' -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3-d16 -ftree-vectorize -ffast-math -mfloat-abi=softfp'
CFLAGS
=
DEVICE
+
' -Wall'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -D__ASSEMBLY__'
if
VMM
:
LINK_SCRIPT
=
'realview_vmm.lds'
else
:
LINK_SCRIPT
=
'realview.lds'
LINK_SCRIPT
=
'realview_vmm.lds'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=realview.map,-cref,-u,system_vectors'
+
\
' -T %s'
%
LINK_SCRIPT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录