Line 1... |
Line 1... |
1 |
/**** BootLoader for PIC16F887 |
1 |
/**** BootLoader for PIC16F887 |
2 |
|
2 |
|
3 |
Ussage: |
3 |
Ussage: |
4 |
ascii-xfr -s -v -l 100 ./bltest.hex > /dev/ttyUSB0 |
4 |
ascii-xfr -s -v -l 110 ./bltest.hex > /dev/ttyUSB0 |
5 |
|
5 |
|
6 |
ascii-xfr is part of 'minicom' package |
6 |
ascii-xfr is part of 'minicom' package |
7 |
|
7 |
|
8 |
Add "uf\n\r" to the first line of .HEX. or use this script: |
8 |
Add "uf\n\r" to the first line of .HEX. or use this script: |
9 |
echo uf > /dev/ttyUSB$1 |
9 |
echo uf > /dev/ttyUSB$1 |
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 2815 2013-03-10 10:49:42Z kakl $" |
21 |
#define ID "$Id: bloader.c 2817 2013-03-10 10:56:44Z 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 |