[bsp][k210] Add get_free_heap_size function.

* Add get_free_heap_size function;
* Increase shell stack for KPU module.
This commit is contained in:
Bernard Xiong
2018-12-23 14:11:25 +08:00
parent da612ebaf6
commit 597d71cc03
8 changed files with 71 additions and 4 deletions
+13 -1
View File
@@ -114,6 +114,13 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
return old_handler;
}
RT_WEAK
void plic_irq_handle(plic_irq_t irq)
{
rt_kprintf("UN-handled interrupt %d occurred!!!\n", irq);
return ;
}
uintptr_t handle_irq_m_ext(uintptr_t cause, uintptr_t epc)
{
/*
@@ -142,7 +149,12 @@ uintptr_t handle_irq_m_ext(uintptr_t cause, uintptr_t epc)
/* Disable software interrupt and timer interrupt */
clear_csr(mie, MIP_MTIP | MIP_MSIP);
if (irq_desc[core_id][int_num].handler)
if (irq_desc[core_id][int_num].handler == (rt_isr_handler_t)rt_hw_interrupt_handle)
{
/* default handler, route to kendryte bsp plic driver */
plic_irq_handle(int_num);
}
else if (irq_desc[core_id][int_num].handler)
{
irq_desc[core_id][int_num].handler(int_num, irq_desc[core_id][int_num].param);
}
+5
View File
@@ -16,6 +16,11 @@
_start:
j 1f
.word 0xdeadbeef
.align 3
.global g_wake_up
g_wake_up:
.dword 1
.dword 0
1:
csrw mideleg, 0
csrw medeleg, 0