以下是COSMIC手冊: The STM8 architecture forces any interrupt function to be located in the first 64K. The interrupt vector table containing 2-byte addresses, interrupt functions declared in C must be declared with the @near modifier if the vector table is also written in C.
@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; }
COSMIC STM8现在最新的好像是4.2.10,在 < C Cross Compiler User’s Guide for ST Microelectronics STM8 > 里没查到 "The STM8 architecture forces any interrupt function to be located in the first 64K. The interrupt vector table containing 2-byte addresses, interrupt functions declared in C must be declared with the @near modifier if the vector table is also written in C."