Rev Author Line No. Line
2804 kakl 1 /*------------------- DUMMY BOOT LOADER --------------------------------------------*/
2 #define FLASH_BLOCK_SIZE getenv("FLASH_ERASE_SIZE")/2 // Minimal length of Flash Block Size
3 #define RESERVED_BLOCKS 53 // Number of reserved flash blocks for BootLoader
4 #define LOADER_RESERVED (getenv("PROGRAM_MEMORY")-(RESERVED_BLOCKS*FLASH_BLOCK_SIZE)) // begining of BootLoader
5  
6 #BUILD(INTERRUPT=FLASH_BLOCK_SIZE) // Redirect Interrupt routine above first flash block
7 #ORG 4,5
8 void JumpToTheInterrupt() // Jump to the Interrupt Handler
9 { #asm GOTO FLASH_BLOCK_SIZE #endasm }
10 #ORG 6,FLASH_BLOCK_SIZE-1 {} // First Flash block is reserved
11  
12 #ORG LOADER_RESERVED,getenv("PROGRAM_MEMORY")-1 auto=0
13 #SEPARATE
14 void dummy_main() // Main on the fix position
15 {
16 reset_cpu();
17 }