首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

设置中断

设置中断

我用mc9s12ne64做webserver的程序,用了网上的程序,实验通过了。我看过这个论坛的关于中断向量的设置,但发现prm文件后面写成如下语句,不明白是什么意思?


ENTRIES /* keep the following unreferenced variables */
    /* OSEK: always allocate the vector table and all dependent objects */
  //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart
END


STACKSIZE 0x100
INIT _EntryPoint
//VECTOR 0 _Startup /* Reset vector: this is the default entry point for a C/C++ application. */
//VECTOR 0 Entry  /* Reset vector: this is the default entry point for an Assembly application. */
//INIT Entry      /* For assembly applications: that this is as well the initialization entry point */
//STACKTOP 0x3FFF

INIT是用于PRM文件的一个命令,相当于定义程序的入口地址,也就是定义复位矢量。
海纳百川  有容乃大
那是不是这个程序就只有一个中断?但我想它应该有很多中断才对啊
还有就是下面prm部分文件的 ROM_C000 = READ_ONLY 0xC000 TO 0xF77F0..0; 和 STACKSIZE 0x100 分别是什么意思呢?


SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
RAM = READ_WRITE 0x0400 TO 0x1FFF;

/* unbanked FLASH ROM */
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xF77F0..0;

/* banked FLASH ROM */
PAGE_3C = READ_ONLY 0x3C8000 TO 0x3CBFFF;
PAGE_3D = READ_ONLY 0x3D8000 TO 0x3DBFFF;
END

PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
_PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */
STARTUP, /* startup data structures */
ROM_VAR, /* constant variables */
STRINGS, /* string literals */
VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */
NON_BANKED, /* runtime routines which must not be banked */
COPY /* copy down information: how to initialize variables */
/* in case you want to use ROM_4000 here as well, make sure
that all files (incl. library files) are compiled with the
option: -OnB=b */
INTO ROM_C000/*, ROM_4000*/;
DEFAULT_ROM INTO PAGE_3D, PAGE_3C;
DEFAULT_RAM INTO RAM;
END

STACKSIZE 0x100

VECTOR 0 _Startup /* Reset vector: this is the default entry point for a C/C++ application. */
分别是定义地址范围和堆栈大小。
海纳百川  有容乃大
返回列表