📄 vectors.c
字号:
/*
*********************************************************************************************************
* uC/OS-II
* The Real-Time Kernel
*
* (c) Copyright 1999, Jean J. Labrosse, Weston, FL
* All Rights Reserved
*
*
* 68332 INTERRUPT VECTOR TABLE
*
* File : VECTORS.C
* By : Jean J. Labrosse
*********************************************************************************************************
*/
#ifndef OS_MASTER_FILE
#include "includes.h"
#endif
/*
*********************************************************************************************************
* REVISION HISTORY
*
* $Log: J:/software/ucos-ii/m683xx/sds/source/vc/vectors.c_v $
*
* Rev 1.3 01 May 1999 11:51:40 JJL
* ***************************** M683xx REL V1.05 ******************************
* - Added check of OSIntNesting in OSIntExit68K() (see OS_CPU_A.S).
*
* Rev 1.2 29 Jun 1999 22:04:02 JJL
* ***************************** M683xx REL V1.04 ******************************
* - Added function OSIntExit68K() (see OS_CPU_A.S) which must now be JUMPed to
* at the end of ALL ISRs. Your ISR code MUST now look as follows:
*
* _YourISR:
* ADDQ.B #1,_OSIntNesting ; OSIntNesting++
* MOVEM.L A0-A6/D0-D7,-(A7) ; Save ALL registers
* ; CLEAR the INTERRUPT source!
* JSR _YourISRHandler
* JMP _OSIntExit68K ; Exit through uC/OS-II at end of ISR
*
* As you can see, you MUST increment OSIntNesting at the beginning of the ISR
* and NOT call OSIntExit(). OSIntExit68K() knows to return to task level code
* because it examines the stack frame for the contents of the Status register
* (SR) that is pushed onto the stack when the CPU recognizes an interrupt.
*
* Rev 1.1 09 May 1999 11:06:56 JJL
* ***************************** M683xx REL V1.03 ******************************
* - The stack adjustment constant in OSIntCtxSw() was set incorrectly. The
* correct value needed to be 10 instead of 18 because the SDS compiler
* doesn't allocate local variables for OSIntExit().
*
* - The function OSSetVect() is OS_CPU_C.C didn't properly cast 'addr'. The
* correct statement is:
* *pvect = (INT32U)addr;
* instead of:
* *pvect = (INT32U *)addr;
*
* Rev 1.0 07 Feb 1999 21:25:34 JJL
* ***************************** M683xx REL V1.02 ******************************
* - Initial release of the SDS port for uC/OS-II. The revision number matches
* that of other M683xx or M680x0 ports.
*********************************************************************************************************
*/
/*$PAGE*/
extern void START(void);
extern void STKTOP(void);
/*
*********************************************************************************************************
* 68332
* INTERRUPT VECTOR TABLE
*
* Description: This is the interrupt vector table. Unused interrupts are vectored to NULL.
* Notes : 1) You MUST define the vector that defines the address of your startup code.
*********************************************************************************************************
*/
void (* const OSVectorTbl[])(void) = { /* This table begins at 0x00000000L */
(void (*)())STKTOP, /* Vector # 0, 0x00000000: RESET, Initial SP */
(void (*)())START, /* Vector # 1, 0x00000004: RESET, Initial PC */
(void (*)())NULL, /* Vector # 2, 0x00000008: Bus Error */
(void (*)())NULL, /* Vector # 3, 0x0000000C: Address Error */
(void (*)())NULL, /* Vector # 4, 0x00000010: Illegal Instruction */
(void (*)())NULL, /* Vector # 5, 0x00000014: Zero Division */
(void (*)())NULL, /* Vector # 6, 0x00000018: CHK, CHK2 Instruction */
(void (*)())NULL, /* Vector # 7, 0x0000001C: TRAPxx, TRAPV Instructions */
(void (*)())NULL, /* Vector # 8, 0x00000020: Privilege Violation */
(void (*)())NULL, /* Vector # 9, 0x00000024: Trace */
(void (*)())NULL, /* Vector # 10, 0x00000028: Line 1010 Emulator */
(void (*)())NULL, /* Vector # 11, 0x0000002C: Line 1111 Emulator */
(void (*)())NULL, /* Vector # 12, 0x00000030: Hardware Breakpoint */
(void (*)())NULL, /* Vector # 13, 0x00000034: Coprocessor Protocol Violation */
(void (*)())NULL, /* Vector # 14, 0x00000038: Format error */
(void (*)())NULL, /* Vector # 15, 0x0000003C: Format error */
(void (*)())NULL, /* Vector # 16, 0x00000040: Reserved */
(void (*)())NULL, /* Vector # 17, 0x00000044: Reserved */
(void (*)())NULL, /* Vector # 18, 0x00000048: Reserved */
(void (*)())NULL, /* Vector # 19, 0x0000004C: Reserved */
(void (*)())NULL, /* Vector # 20, 0x00000050: Reserved */
(void (*)())NULL, /* Vector # 21, 0x00000054: Reserved */
(void (*)())NULL, /* Vector # 22, 0x00000058: Reserved */
(void (*)())NULL, /* Vector # 23, 0x0000005C: Reserved */
(void (*)())NULL, /* Vector # 24, 0x00000060: Spurious interrupt */
(void (*)())NULL, /* Vector # 25, 0x00000064: Level 1 Interrupt Autovector */
(void (*)())NULL, /* Vector # 26, 0x00000068: Level 2 Interrupt Autovector */
(void (*)())NULL, /* Vector # 27, 0x0000006C: Level 3 Interrupt Autovector */
(void (*)())NULL, /* Vector # 28, 0x00000070: Level 4 Interrupt Autovector */
(void (*)())NULL, /* Vector # 29, 0x00000074: Level 5 Interrupt Autovector */
(void (*)())NULL, /* Vector # 30, 0x00000078: Level 6 Interrupt Autovector */
(void (*)())NULL, /* Vector # 31, 0x0000007C: Level 7 Interrupt Autovector */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -