Rev Author Line No. Line
1597 kakl 1 /*------------------- DUMMY BOOT LOADER --------------------------------------------*/
2 #define FLASH_BLOCK_SIZE 32
3 #define LOADER_RESERVED getenv("PROGRAM_MEMORY")-26*FLASH_BLOCK_SIZE
4 #define BUFFER_LEN_LOD 46
5 #if FLASH_BLOCK_SIZE != getenv("FLASH_ERASE_SIZE")/2
6 #error Wrong length of the Flash Block Size. getenv("FLASH_ERASE_SIZE")/getenv("FLASH_WRITE_SIZE")
7 #endif
8  
9  
10 #BUILD(INTERRUPT=FLASH_BLOCK_SIZE) // Redirect Interrupt routine above first flash block
11 #ORG 4,5
12 void JumpToTheInterrupt() // Jump to the Interrupt Handler
13 { #asm GOTO FLASH_BLOCK_SIZE #endasm }
14 #ORG 6,FLASH_BLOCK_SIZE-1 {} // First Flash block is reserved
15  
16  
17 #ORG LOADER_RESERVED,getenv("PROGRAM_MEMORY")-1 auto=0
18 #SEPARATE
19 void dummy_main() // Main on the fix position
20 {
21 reset_cpu();
22 }