Line 16... |
Line 16... |
16 |
sed -i 's/^/pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp/' ./bltest.hex |
16 |
sed -i 's/^/pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp/' ./bltest.hex |
17 |
sed -i 1i"uf" ./bltest.hex |
17 |
sed -i 1i"uf" ./bltest.hex |
18 |
|
18 |
|
19 |
*/ |
19 |
*/ |
20 |
|
20 |
|
21 |
#define ID "$Id: bloader.c 2817 2013-03-10 10:56:44Z kakl $" |
21 |
#define ID "$Id: bloader.c 2848 2013-03-21 08:16:49Z kakl $" |
22 |
|
22 |
|
23 |
#CASE // Case sensitive compiler |
23 |
#CASE // Case sensitive compiler |
24 |
|
24 |
|
25 |
#define ERR_BUFFER_OVERRUN 1 // Error 1 - Buffer Overrun |
25 |
#define ERR_BUFFER_OVERRUN 1 // Error 1 - Buffer Overrun |
26 |
#define ERR_CHECKSUM 2 // Error 2 - Bad CheckSum |
26 |
#define ERR_CHECKSUM 2 // Error 2 - Bad CheckSum |
Line 75... |
Line 75... |
75 |
|
75 |
|
76 |
|
76 |
|
77 |
/*------------------- BOOT LOADER --------------------------------------------*/ |
77 |
/*------------------- BOOT LOADER --------------------------------------------*/ |
78 |
|
78 |
|
79 |
#BUILD(INTERRUPT=FLASH_BLOCK_SIZE) // Redirect Interrupt routine above first flash block |
79 |
#BUILD(INTERRUPT=FLASH_BLOCK_SIZE) // Redirect Interrupt routine above first flash block |
80 |
#ORG 4,5 |
- |
|
81 |
void JumpToTheInterrupt() // Jump to the Interrupt Handler |
80 |
#ROM 0x0004={0,0,0,0,0,0,0,0,0,0,0,0} // 12x NOP from interrupt vector to interrupt routine |
82 |
{ #asm GOTO FLASH_BLOCK_SIZE #endasm } |
- |
|
83 |
#ORG 6,FLASH_BLOCK_SIZE-1 {} // First Flash block is reserved |
- |
|
84 |
|
81 |
|
85 |
|
82 |
|
86 |
#ORG LOADER_RESERVED,LOADER_RESERVED+FLASH_BLOCK_SIZE-1 auto=0 |
83 |
#ORG LOADER_RESERVED,LOADER_RESERVED+FLASH_BLOCK_SIZE-1 auto=0 |
87 |
#SEPARATE |
84 |
#SEPARATE |
88 |
void dummy_main() // Main on the fix position. It will be overwriten by downloaded program reset vector. |
85 |
void dummy_main() // Main on the fix position. It will be overwriten by downloaded program reset vector. |