Skip to content

Commit c66314a

Browse files
committed
fixed loongson bsp build on windows
1 parent e5a70d5 commit c66314a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

bsp/ls1bdev/SConstruct

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
1111
from building import *
1212

1313
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
14+
rtconfig.AFLAGS += ' -I' + str('.') + ' -I ' + RTT_ROOT + '/libcpu/mips/common/'
1415

1516
DefaultEnvironment(tools=[])
1617
env = Environment(tools = ['mingw'],

bsp/ls1cdev/SConstruct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from building import *
1212

1313
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1414

15-
rtconfig.AFLAGS += ' -I' + str(Dir('#'))
15+
rtconfig.AFLAGS += ' -I' + str('.') + ' -I ' + RTT_ROOT + '/libcpu/mips/gs232/'+ ' -I ' + RTT_ROOT + '/libcpu/mips/common/'
1616

1717
DefaultEnvironment(tools=[])
1818
env = Environment(tools = ['mingw'],

libcpu/mips/common/exception.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ static void unhandled_exception_handle(struct pt_regs *regs)
124124
{
125125
rt_kprintf("Unknown Exception, EPC: 0x%p, CAUSE: 0x%08x\n", read_c0_epc(), read_c0_cause());
126126
rt_kprintf("Exception Name:%s\n",exception_name[(read_c0_cause() >> 2) & 0x1f]);
127+
#ifdef SOC_LS2K1000
127128
rt_kprintf("ExeCode = 0x%08x,BadAddr = 0x%p\n",(read_c0_cause() >> 2) & 0x1f,mmu_tlb_get_bad_vaddr());
129+
#else
130+
rt_kprintf("ExeCode = 0x%08x\n",(read_c0_cause() >> 2) & 0x1f);
131+
#endif
128132
rt_kprintf("ST0: 0x%08x ",regs->cp0_status);
129133
rt_kprintf("ErrorPC: 0x%p\n",read_c0_errorepc());
130134
mips_dump_regs(regs);

0 commit comments

Comments
 (0)