main.c

来自「牛人张明峰写的bootloader。很有参考价值。和很多freescale的例子」· C语言 代码 · 共 27 行

C
27
字号
//=============================================================================
// All the code below are provided for demo purpose only.
// It'll be on your own risk if you like to adopt all or parts of the code into
// your own application.
//
// This is the main entry function in standard C programming
// It's only needed to make boot-loader project complie success.
// It does noting but only jump to the entry of boot-loader
//
// Designed by Paul Zhang (paul.zhang@freescale.com)
// May 10, 2008 
//=============================================================================

#include <hidef.h>        // for EnableInterrupts macro
#include "derivative.h"   // include peripheral declarations

void BootLoader(void);

#pragma CODE_SEG __FAR_SEG DEFAULT

//=============================================================================
// Dummy 'main' function
//=============================================================================
void main(void) {
   asm (jmp BootLoader);      //Jump to Boot-loader routine
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?