⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gehdl.c

📁 Renesas(Hitachi SuperH)SH7708的UCOS2源码,uC/OS-II 版本2.52.
💻 C
字号:
/*------------------------------------------------------------------------*/
/*  This function called by general exception handler (GE ()).            */
/*  Author: Kuan, Yeou-Fuh                                                */
/*------------------------------------------------------------------------*/
#include "sh7707.h"
//#include "includes.h"

void GEHandler ( void );
void DbgStr    ( char * );

void GEHandler ()
{
   switch ( EXPEVT )
   {
      case 0x0E0 :  /*  Address Error (Instruction Access)  */
      case 0x100 :  /*  & Address Error (Data Access)       */
           DbgStr ( "Address Error!\n" );
           break;
      case 0x040 :  /*  TLB Invalid (Instruction Access)  */
      case 0x060 :  /*  & TLB Invalid (Data Access)       */
           DbgStr ( "TLB Invalid!\n" );
           break;
      case 0x0A0 :  /*  TLB Protection Violation (Instruction Access)  */
      case 0x0C0 :  /*  & TLB Protection Violation (Data Access)       */
           DbgStr ( "TLB Protection Violation!\n" );
           break;
      case 0x180 :  /*  Reserved Instruction Code Exception  */
           DbgStr ( "Reserved Instruction Code Exception!\n" );
 	//		OSCtxSw ();
           break;
      case 0x1A0 :  /*  Illegal Slot Instruction Exception  */
           DbgStr ( "Illegal Slot Instruction Exception!\n" );
           break;
      case 0x080 :  /*  Initial Page Write  */
           DbgStr ( "Initial Page Write!\n" );
           break;
      case 0x160 :  /*  Unconditional Trap  (TRAP instruction)  */
           if ( TRA == 0x084 )  
         	OSCtxSw ();
           break;
      case 0x1E0 :  /*  User Breakpoint Trap  */
           DbgStr ( "User Breakpoint Trap!\n" );
           break;
      default:
           DbgStr ( "Unknow General Exception happen!\n" );
           break;
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -