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 2813 2013-03-10 10:21:54Z kakl $" |
21 |
#define ID "$Id: bloader.c 2815 2013-03-10 10:49:42Z kakl $" |
22 |
|
22 |
|
23 |
#CASE // Case sensitive compiler |
23 |
#CASE // Case sensitive compiler |
24 |
|
24 |
|
25 |
#define FLASH_BLOCK_SIZE getenv("FLASH_ERASE_SIZE")/2 // Minimal length of Flash Block Size |
- |
|
26 |
#define RESERVED_BLOCKS 49 // Number of reserved flash blocks for BootLoader |
- |
|
27 |
#define LOADER_RESERVED (getenv("PROGRAM_MEMORY")-(RESERVED_BLOCKS*FLASH_BLOCK_SIZE)) // begining of BootLoader |
- |
|
28 |
#define BUFFER_LEN_LOD 46 // Length of Working buffer for HEX |
- |
|
29 |
|
- |
|
30 |
#define ERR_BUFFER_OVERRUN 1 // Error 1 - Buffer Overrun |
25 |
#define ERR_BUFFER_OVERRUN 1 // Error 1 - Buffer Overrun |
31 |
#define ERR_CHECKSUM 2 // Error 2 - Bad CheckSum |
26 |
#define ERR_CHECKSUM 2 // Error 2 - Bad CheckSum |
32 |
#define ERR_TOO_MANY_BYTES 3 // Error 3 - Too many bytes in one line |
27 |
#define ERR_TOO_MANY_BYTES 3 // Error 3 - Too many bytes in one line |
33 |
#define ERR_UNSUPORTED_LINETYPE 4 // Error 4 - Unsuported Line type |
28 |
#define ERR_UNSUPORTED_LINETYPE 4 // Error 4 - Unsuported Line type |
34 |
|
29 |
|
- |
|
30 |
#define BUFFER_LEN_LOD 46 // Length of Working buffer for HEX |
- |
|
31 |
|
- |
|
32 |
#include "..\common\bloader_defs.h" |
35 |
#include "bloader.h" |
33 |
#include "bloader.h" |
36 |
#include <string.h> |
34 |
#include <string.h> |
37 |
|
35 |
|
38 |
#INT_RDA |
36 |
#INT_RDA |
39 |
void rs232_handler() // Test of interrupt |
37 |
void rs232_handler() // Test of interrupt |