summaryrefslogtreecommitdiff
path: root/downloader/proto.txt
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-07-04 23:01:44 +0000
committerChristian Pointner <equinox@spreadspace.org>2013-07-04 23:01:44 +0000
commitdb39faa988cf306fbf8f915fe1c8f1119989b0b1 (patch)
treec70f80f6ef777b2c8596a0356f8fae489cfc01c5 /downloader/proto.txt
parentfixed issues with short answers (diff)
moved to binary command codes
git-svn-id: https://svn.spreadspace.org/pic/trunk@37 a09c6847-51d9-44de-8ef2-e725cf50f3c7
Diffstat (limited to 'downloader/proto.txt')
-rw-r--r--downloader/proto.txt74
1 files changed, 38 insertions, 36 deletions
diff --git a/downloader/proto.txt b/downloader/proto.txt
index 71b0774..f4f32c8 100644
--- a/downloader/proto.txt
+++ b/downloader/proto.txt
@@ -1,15 +1,17 @@
Command List:
=============
-'i' ... identify
-'b' ... boot
-'r' ... reset
-'f' ... read flash
-'F' ... write flash
-'e' ... read eeprom
-'E' ... write eeprom
-'c' ... read config
-'C' ... write config
+ code | command
+ ------+------------
+ 1 | identify
+ 2 | boot
+ 3 | reset
+ 4 | read flash
+ 5 | write flash
+ 6 | read eeprom
+ 7 | write eeprom
+ 8 | read config
+ 9 | write config
Description:
@@ -36,10 +38,10 @@ The return codes have the following meaning:
identify:
~~~~~~~~~
command:
- 'i' | <csum> (in this case <csum> will always be 'i')
+ 1 | <csum> (in this case <csum> will always be 1)
answer:
- 'i' | <ret> | version | name | devid | fss | mess | supported | <csum>
+ 1 | <ret> | version | name | devid | fss | mess | supported | <csum>
version:
2bytes, protocol version
@@ -53,7 +55,7 @@ identify:
devid:
2bytes, device id of the PIC
- The downlaoder may use this id to check if it talks to the right bootloader
+ The downlaoder may use this id to check if it talks to the right bootloader
fss:
1byte, flash segment size
@@ -87,10 +89,10 @@ boot:
~~~~~
command:
- 'b' | <csum> (in this case <csum> will always be 'b')
+ 2 | <csum> (in this case <csum> will always be 2)
answer:
- 'b' | <ret> | <csum>
+ 2 | <ret> | <csum>
This instucts the bootloader to boot to the user application directly (no reset)
@@ -99,10 +101,10 @@ reset:
~~~~~~
command:
- 'r' | <csum> (in this case <csum> will always be 'r')
+ 3 | <csum> (in this case <csum> will always be 3)
answer:
- 'r' | <ret> | <csum>
+ 3 | <ret> | <csum>
The device performs a reboot. If the boot condition (i.e.: port pin) is not met
this instructs the device to boot to the user application.
@@ -112,10 +114,10 @@ read flash:
~~~~~~~~~~~
command:
- 'f' | addr | <csum>
+ 4 | addr | <csum>
answer:
- 'f' | <ret> | data | <csum>
+ 4 | <ret> | data | <csum>
The bootloader reads <fss> words from flash address <addr> and returns it as
<data>.
@@ -125,10 +127,10 @@ write flash:
~~~~~~~~~~~~
command:
- 'F' | addr | data | <csum>
+ 5 | addr | data | <csum>
answer:
- 'F' | <ret> | <csum>
+ 5 | <ret> | <csum>
The bootloader writes <data> (which has to contain exactly <fss> words) to address
<addr> inside the flash.
@@ -138,10 +140,10 @@ read eeprom:
~~~~~~~~~~~~
command:
- 'e' | addr | len | <csum>
+ 6 | addr | len | <csum>
answer:
- 'e' | <ret> | data | <csum>
+ 6 | <ret> | data | <csum>
The bootloader reads <len> bytes from eeprom at address <addr> and returns it as
<data>. len is 2bytes long.
@@ -151,10 +153,10 @@ write eeprom:
~~~~~~~~~~~~~
command:
- 'E' | addr | len | data | <csum>
+ 7 | addr | len | data | <csum>
answer:
- 'E' | <ret> | <csum>
+ 7 | <ret> | <csum>
The bootloader writes <data> (which has to contain exactly <len> bytes) to address
<addr> inside the eeprom. len is 2bytes long and the value must not exceed <mess> bytes.
@@ -163,24 +165,24 @@ write eeprom:
read config:
~~~~~~~~~~~~
- command:
- 'c' | nr | <csum>
+ command:
+ 8 | nr | <csum>
- answer:
- 'c' | <ret> | word | <csum>
+ answer:
+ 8 | <ret> | word | <csum>
- The bootloader reads and returns the configuration word number <nr>. <nr> is one
- byte long.
+ The bootloader reads and returns the configuration word number <nr>. <nr> is one
+ byte long.
write config:
~~~~~~~~~~~~~
- command:
- 'C' | nr | word | <csum>
+ command:
+ 9 | nr | word | <csum>
- answer:
- 'C' | <ret> | <csum>
+ answer:
+ 9 | <ret> | <csum>
- The bootloader writes <word> onto configuration word number <nr>. <nr> is one
- byte long
+ The bootloader writes <word> onto configuration word number <nr>. <nr> is one
+ byte long.