cortex-r4: remove RM48x50.h and add armv7.h

This commit is contained in:
Grissiom
2013-10-20 21:09:45 +08:00
parent d3648dbc9f
commit e1e563e85c
5 changed files with 66 additions and 56 deletions

View File

@@ -15,8 +15,10 @@
#include <rtthread.h>
#include <rthw.h>
#include "RM48x50.h"
//#define BSP_INT_DEBUG
#include <sys_vim.h>
#include "armv7.h"
/**
* @addtogroup RM48x50
@@ -28,26 +30,26 @@
*
* @param regs the registers point
*/
void rt_hw_show_register (struct rt_hw_register *regs)
void rt_hw_show_register (struct rt_hw_base_stack *regs)
{
rt_kprintf("Execption:\n");
rt_kprintf("r00:0x%08x r01:0x%08x r02:0x%08x r03:0x%08x\n", regs->r0, regs->r1, regs->r2, regs->r3);
rt_kprintf("r04:0x%08x r05:0x%08x r06:0x%08x r07:0x%08x\n", regs->r4, regs->r5, regs->r6, regs->r7);
rt_kprintf("r08:0x%08x r09:0x%08x r10:0x%08x\n", regs->r8, regs->r9, regs->r10);
rt_kprintf("fp :0x%08x ip :0x%08x\n", regs->fp, regs->ip);
rt_kprintf("sp :0x%08x lr :0x%08x pc :0x%08x\n", regs->sp, regs->lr, regs->pc);
rt_kprintf("sp :0x%08x lr :0x%08x pc :0x%08x\n", regs+1, regs->lr, regs->pc);
rt_kprintf("cpsr:0x%08x\n", regs->cpsr);
}
/**
* When ARM7TDMI comes across an instruction which it cannot handle,
* When comes across an instruction which it cannot handle,
* it takes the undefined instruction trap.
*
* @param regs system registers
*
* @note never invoke this function in application
*/
void rt_hw_trap_udef(struct rt_hw_register *regs)
void rt_hw_trap_udef(struct rt_hw_base_stack *regs)
{
rt_kprintf("undefined instruction\n");
rt_hw_show_register(regs);
@@ -65,7 +67,7 @@ void rt_hw_trap_udef(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void rt_hw_trap_swi(struct rt_hw_register *regs)
void rt_hw_trap_swi(struct rt_hw_base_stack *regs)
{
rt_kprintf("software interrupt\n");
rt_hw_show_register(regs);
@@ -82,7 +84,7 @@ void rt_hw_trap_swi(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void rt_hw_trap_pabt(struct rt_hw_register *regs)
void rt_hw_trap_pabt(struct rt_hw_base_stack *regs)
{
rt_kprintf("prefetch abort\n");
rt_hw_show_register(regs);
@@ -99,7 +101,7 @@ void rt_hw_trap_pabt(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void rt_hw_trap_dabt(struct rt_hw_register *regs)
void rt_hw_trap_dabt(struct rt_hw_base_stack *regs)
{
rt_kprintf("Data Abort ");
rt_hw_show_register(regs);
@@ -115,7 +117,7 @@ void rt_hw_trap_dabt(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void rt_hw_trap_resv(struct rt_hw_register *regs)
void rt_hw_trap_resv(struct rt_hw_base_stack *regs)
{
rt_kprintf("not used\n");
rt_hw_show_register(regs);
@@ -124,10 +126,6 @@ void rt_hw_trap_resv(struct rt_hw_register *regs)
rt_hw_cpu_shutdown();
}
/*
*#pragma CODE_STATE(rt_hw_trap_irq, 32)
*#pragma INTERRUPT(rt_hw_trap_irq, IRQ)
*/
extern rt_isr_handler_t isr_table[];
void rt_hw_trap_irq(void)
{