Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00018 #include <srom.h>
00019 #include <stdint.h>
00020 
00021 #include "bootloader.h"
00022 #include "config.h"
00023 
00024 #if __C51__ < 810 && !defined(_lint)
00025 #error "This project requires Keil C51 v8.10 or higher"
00026 #endif
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 SROM_MC (CODE_BOOTLOADER)
00037 SROM_MC (CONST_BOOTLOADER)
00038 
00039 void main(void)
00040 {
00041     uint16_t i;
00042 
00043     
00044     
00045     uint8_t code *psrc = (uint8_t code*)SROM_MC_SRC(CODE_BOOTLOADER);
00046     uint8_t xdata *pdest = (uint8_t xdata*)SROM_MC_TRG(CODE_BOOTLOADER);
00047     for(i=0;i<SROM_MC_LEN(CODE_BOOTLOADER);i++)
00048     {
00049         *pdest++ = *psrc++;
00050     }
00051     
00052     
00053     psrc = (uint8_t code*)SROM_MC_SRC(CONST_BOOTLOADER);
00054     pdest = (uint8_t xdata*)SROM_MC_TRG(CONST_BOOTLOADER);
00055     for(i=0;i<SROM_MC_LEN(CONST_BOOTLOADER);i++)
00056     {
00057         *pdest++ = *psrc++;
00058     }
00059     bootloader(); 
00060 }