📄 start12.c
字号:
/********************************************************************
*
*文件名 : Start12.c
*
*功能描述 :完成硬件系统的初始化 ,程序的入口
*
**********************************************************************
*/
#include "hidef.h"
#include "start12.h"
#include "mc9s12dg128.h"
extern void HardwareInit(void);
extern void main(void);
extern void uart_init(void);
#pragma DATA_SEG __NEAR_SEG STARTUP_DATA /* _startupData can be accessed using 16 bit accesses. This is needed because it contains the stack top, and without stack, far data cannot be accessed */
struct _tagStartup _startupData; /* read-only: */
void _Startup(void){
INITRM=0x21; //Memory remap.内存映射..
INITRG=0;
INITEE=0x11;
asm{LDS #$4000 //设置堆栈..
}
HardwareInit(); //硬件系统初始化
uart_init(); //only use for debug ...
main(); //主函数运行..
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -