mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-02-01 04:33:13 +01:00
* Split assembler routines into -cosmic.s and -iar.s. * Split Cosmic and IAR specific code using __CSMC__ and __IAR_SYSTEMS_ICC__. * Context-switch virtual registers on IAR. * Add detailed description of IAR context-switch scheme. * Add sample IAR project. * Add support for IAR to STM8S peripheral driver modules. * Fix EWSTM8 compiler warnings.
66 lines
2.0 KiB
C
66 lines
2.0 KiB
C
/* BASIC INTERRUPT VECTOR TABLE FOR STM8 devices
|
|
* Copyright (c) 2007 STMicroelectronics
|
|
*/
|
|
|
|
|
|
/* COSMIC: Requires interrupt vector table */
|
|
#if defined(__CSMC__)
|
|
|
|
/* Import Atomthreads system tick ISR prototype */
|
|
#include "atomport-private.h"
|
|
|
|
|
|
typedef void @far (*interrupt_handler_t)(void);
|
|
|
|
struct interrupt_vector {
|
|
unsigned char interrupt_instruction;
|
|
interrupt_handler_t interrupt_handler;
|
|
};
|
|
|
|
@far @interrupt void NonHandledInterrupt (void)
|
|
{
|
|
/* in order to detect unexpected events during development,
|
|
it is recommended to set a breakpoint on the following instruction
|
|
*/
|
|
return;
|
|
}
|
|
|
|
extern void _stext(); /* startup routine */
|
|
|
|
struct interrupt_vector const _vectab[] = {
|
|
{0x82, (interrupt_handler_t)_stext}, /* reset */
|
|
{0x82, NonHandledInterrupt}, /* trap */
|
|
{0x82, NonHandledInterrupt}, /* irq0 */
|
|
{0x82, NonHandledInterrupt}, /* irq1 */
|
|
{0x82, NonHandledInterrupt}, /* irq2 */
|
|
{0x82, NonHandledInterrupt}, /* irq3 */
|
|
{0x82, NonHandledInterrupt}, /* irq4 */
|
|
{0x82, NonHandledInterrupt}, /* irq5 */
|
|
{0x82, NonHandledInterrupt}, /* irq6 */
|
|
{0x82, NonHandledInterrupt}, /* irq7 */
|
|
{0x82, NonHandledInterrupt}, /* irq8 */
|
|
{0x82, NonHandledInterrupt}, /* irq9 */
|
|
{0x82, NonHandledInterrupt}, /* irq10 */
|
|
{0x82, (interrupt_handler_t)TIM1_SystemTickISR}, /* irq11 */
|
|
{0x82, NonHandledInterrupt}, /* irq12 */
|
|
{0x82, NonHandledInterrupt}, /* irq13 */
|
|
{0x82, NonHandledInterrupt}, /* irq14 */
|
|
{0x82, NonHandledInterrupt}, /* irq15 */
|
|
{0x82, NonHandledInterrupt}, /* irq16 */
|
|
{0x82, NonHandledInterrupt}, /* irq17 */
|
|
{0x82, NonHandledInterrupt}, /* irq18 */
|
|
{0x82, NonHandledInterrupt}, /* irq19 */
|
|
{0x82, NonHandledInterrupt}, /* irq20 */
|
|
{0x82, NonHandledInterrupt}, /* irq21 */
|
|
{0x82, NonHandledInterrupt}, /* irq22 */
|
|
{0x82, NonHandledInterrupt}, /* irq23 */
|
|
{0x82, NonHandledInterrupt}, /* irq24 */
|
|
{0x82, NonHandledInterrupt}, /* irq25 */
|
|
{0x82, NonHandledInterrupt}, /* irq26 */
|
|
{0x82, NonHandledInterrupt}, /* irq27 */
|
|
{0x82, NonHandledInterrupt}, /* irq28 */
|
|
{0x82, NonHandledInterrupt}, /* irq29 */
|
|
};
|
|
|
|
#endif /* __CSMC__ */
|