No changes between revisions
/Designs/Measuring_instruments/AWS01A/SW/PIC16F887/bootloader887/bloader.PJT |
47,11 → 47,11 |
1=bloader.c |
[Opened Files] |
1=bloader.c |
2=..\bltest\bltest.c |
3= |
4=..\..\..\..\..\..\Program Files (x86)\PICC\drivers\stddef.h |
5=..\..\..\..\..\..\Program Files (x86)\PICC\drivers\ctype.h |
6=..\..\..\..\..\..\Program Files (x86)\PICC\Devices\16F887.h |
2=bloader.h |
3=..\..\..\..\..\..\..\Program Files (x86)\PICC\Devices\16F887.h |
4=..\..\..\..\..\..\..\Program Files (x86)\PICC\Drivers\string.h |
5=..\..\..\..\..\..\..\Program Files (x86)\PICC\Drivers\stddef.h |
6=..\..\..\..\..\..\..\Program Files (x86)\PICC\Drivers\ctype.h |
7= |
8= |
9=bloader.lst |
/Designs/Measuring_instruments/AWS01A/SW/PIC16F887/bootloader887/bloader.c |
22,16 → 22,14 |
|
#CASE // Case sensitive compiler |
|
#define FLASH_BLOCK_SIZE getenv("FLASH_ERASE_SIZE")/2 // Minimal length of Flash Block Size |
#define RESERVED_BLOCKS 49 // Number of reserved flash blocks for BootLoader |
#define LOADER_RESERVED (getenv("PROGRAM_MEMORY")-(RESERVED_BLOCKS*FLASH_BLOCK_SIZE)) // begining of BootLoader |
#define BUFFER_LEN_LOD 46 // Length of Working buffer for HEX |
|
#define ERR_BUFFER_OVERRUN 1 // Error 1 - Buffer Overrun |
#define ERR_CHECKSUM 2 // Error 2 - Bad CheckSum |
#define ERR_TOO_MANY_BYTES 3 // Error 3 - Too many bytes in one line |
#define ERR_UNSUPORTED_LINETYPE 4 // Error 4 - Unsuported Line type |
|
#define BUFFER_LEN_LOD 46 // Length of Working buffer for HEX |
|
#include "..\common\bloader_defs.h" |
#include "bloader.h" |
#include <string.h> |
|
/Designs/Measuring_instruments/AWS01A/SW/PIC16F887/common/bloader_defs.h |
0,0 → 1,7 |
/*------------------- BOOT LOADER Common Definitions --------------------------------------------*/ |
|
#define FLASH_BLOCK_SIZE getenv("FLASH_ERASE_SIZE")/2 // Minimal length of Flash Block Size |
#define RESERVED_BLOCKS 49 // Number of reserved flash blocks for BootLoader |
#define LOADER_RESERVED (getenv("PROGRAM_MEMORY")-(RESERVED_BLOCKS*FLASH_BLOCK_SIZE)) // begining of BootLoader |
|
|
/Designs/Measuring_instruments/AWS01A/SW/PIC16F887/common/dbloader.h |
0,0 → 1,15 |
/*------------------- DUMMY BOOT LOADER --------------------------------------------*/ |
#include "..\common\bloader_defs.h" |
|
#BUILD(INTERRUPT=FLASH_BLOCK_SIZE) // Redirect Interrupt routine above first flash block |
#ORG 4,5 |
void JumpToTheInterrupt() // Jump to the Interrupt Handler |
{ #asm GOTO FLASH_BLOCK_SIZE #endasm } |
#ORG 6,FLASH_BLOCK_SIZE-1 {} // First Flash block is reserved |
|
#ORG LOADER_RESERVED,getenv("PROGRAM_MEMORY")-1 auto=0 |
#SEPARATE |
void dummy_main() // Main on the fix position |
{ |
reset_cpu(); |
} |