Skip to content

Commit c024e2e

Browse files
committed
add ls2k bsp config
1 parent 990f731 commit c024e2e

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

bsp/ls2kdev/.config

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ CONFIG_RT_USING_HOOK=y
2020
CONFIG_RT_USING_IDLE_HOOK=y
2121
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
2222
CONFIG_IDLE_THREAD_STACK_SIZE=2048
23-
CONFIG_RT_USING_TIMER_SOFT=y
24-
CONFIG_RT_TIMER_THREAD_PRIO=20
25-
CONFIG_RT_TIMER_THREAD_STACK_SIZE=2048
23+
# CONFIG_RT_USING_TIMER_SOFT is not set
2624
CONFIG_RT_DEBUG=y
2725
# CONFIG_RT_DEBUG_COLOR is not set
28-
CONFIG_RT_DEBUG_INIT_CONFIG=y
29-
CONFIG_RT_DEBUG_INIT=1
26+
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
3027
# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
3128
# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
3229
# CONFIG_RT_DEBUG_IPC_CONFIG is not set
@@ -65,7 +62,7 @@ CONFIG_RT_USING_DEVICE=y
6562
# CONFIG_RT_USING_DEVICE_OPS is not set
6663
# CONFIG_RT_USING_INTERRUPT_INFO is not set
6764
CONFIG_RT_USING_CONSOLE=y
68-
CONFIG_RT_CONSOLEBUF_SIZE=128
65+
CONFIG_RT_CONSOLEBUF_SIZE=256
6966
CONFIG_RT_CONSOLE_DEVICE_NAME="uart"
7067
CONFIG_RT_VER_NUM=0x40003
7168
# CONFIG_RT_USING_CPU_FFS is not set

bsp/ls2kdev/applications/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
int main(int argc, char** argv)
1414
{
15-
rt_kprintf("ls2k1000:hello rtthread!\n");
15+
rt_kprintf("Hi, this is RT-Thread!!\n");
1616
return 0;
1717
}

bsp/ls2kdev/rtconfig.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
#define RT_USING_IDLE_HOOK
1717
#define RT_IDLE_HOOK_LIST_SIZE 4
1818
#define IDLE_THREAD_STACK_SIZE 2048
19-
#define RT_USING_TIMER_SOFT
20-
#define RT_TIMER_THREAD_PRIO 20
21-
#define RT_TIMER_THREAD_STACK_SIZE 2048
2219
#define RT_DEBUG
23-
#define RT_DEBUG_INIT_CONFIG
24-
#define RT_DEBUG_INIT 1
2520

2621
/* Inter-Thread communication */
2722

@@ -41,7 +36,7 @@
4136

4237
#define RT_USING_DEVICE
4338
#define RT_USING_CONSOLE
44-
#define RT_CONSOLEBUF_SIZE 128
39+
#define RT_CONSOLEBUF_SIZE 256
4540
#define RT_CONSOLE_DEVICE_NAME "uart"
4641
#define RT_VER_NUM 0x40003
4742
#define ARCH_MIPS64

libcpu/mips/common/exception.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ int rt_hw_exception_init(void)
117117

118118
void rt_general_exc_dispatch(struct pt_regs *regs)
119119
{
120-
rt_ubase_t cause, exccode;
120+
rt_ubase_t exccode = 0;
121121

122-
exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE;
123122

124123
if (exccode == 0) {
125124
rt_ubase_t status, pending;
126125
status = read_c0_status();
127-
pending = (cause & CAUSEF_IP) & (status & ST0_IM);
126+
127+
pending = (CAUSEF_IP) & (status & ST0_IM);
128128
if (pending & CAUSEF_IP0)
129129
rt_do_mips_cpu_irq(0);
130130
if (pending & CAUSEF_IP1)

libcpu/mips/common/stackframe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060
mfhi v1
6161
LONG_S $8, PT_R8(sp)
6262
LONG_S $9, PT_R9(sp)
63-
LONG_S v1, PT_HI(sp)
63+
sw v1, PT_HI(sp)
6464
mflo v1
6565
LONG_S $10, PT_R10(sp)
6666
LONG_S $11, PT_R11(sp)
67-
LONG_S v1, PT_LO(sp)
67+
sw v1, PT_LO(sp)
6868
LONG_S $12, PT_R12(sp)
6969
LONG_S $13, PT_R13(sp)
7070
LONG_S $14, PT_R14(sp)

0 commit comments

Comments
 (0)