rtshc12.c not found 是怎么回事?
- UID
- 343658
- 性别
- 男
|
rtshc12.c not found 是怎么回事?
rtshc12.c not found 是怎么回事?9s12dg128 |
|
|
|
|
|
- UID
- 104380
- 性别
- 男
|
|
|
|
|
|
- UID
- 343658
- 性别
- 男
|
#include
#include
#include "my_vectors.h"
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b"
static long absoluteTime = 0;
unsigned int pulse_count = 0;
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void Timer_Overflow(void) {
pulse_count = PACN2 + (PACN3<<8);
PACN2 = 0;
PACN3 = 0;
TFLG2 = 0x80;
TCNT = 57536;
}
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void RTI_ISR(void) {
absoluteTime++;
CRGFLG = 0x80;
}
#pragma CODE_SEG DEFAULT
static void RTIInit(void) {
RTICTL = 0x1F;
CRGINT = 0x80;
}
static void startTimeBase(void){
absoluteTime = 0;
RTIInit();
EnableInterrupts;
}
static void PORT_Init(void){
DDRT = 0x7F;
}
static void TIMER_Init(void){
TSCR1 = 0x80;
TSCR2 = 0x81;
TCNT = 57536;
PACTL = 0x50;
}
void main(void) {
PORT_Init();
startTimeBase();
TIMER_Init();
for(;;){
};
} |
|
|
|
|
|
- UID
- 104380
- 性别
- 男
|
应该是把整个project打包贴出来,而不只是把主程序文件贴出来。
你在建project的时候是否采用了wizard引导?最好用引导,否则可能会缺少某些文件。
我用引导生成了一个project,把你的源程序放进去,编译通过,没有出现问题。你可以参考一下:
http://bbs.eccn.com/uploadImages/dg128_wizard.rar |
|
|
|
|
|
- UID
- 343658
- 性别
- 男
|
|
|
|
|
|