From db39faa988cf306fbf8f915fe1c8f1119989b0b1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 4 Jul 2013 23:01:44 +0000 Subject: moved to binary command codes git-svn-id: https://svn.spreadspace.org/pic/trunk@37 a09c6847-51d9-44de-8ef2-e725cf50f3c7 --- downloader/downloader.py | 18 ++++++------ downloader/proto.txt | 74 +++++++++++++++++++++++++----------------------- 2 files changed, 47 insertions(+), 45 deletions(-) (limited to 'downloader') diff --git a/downloader/downloader.py b/downloader/downloader.py index 3a66f3b..b332271 100755 --- a/downloader/downloader.py +++ b/downloader/downloader.py @@ -160,7 +160,7 @@ def exec_command(dev, cmd, answer): ### Commands def identify(dev): - data = exec_command(dev, 'i', ' (in this case will always be 'i') + 1 | (in this case will always be 1) answer: - 'i' | | version | name | devid | fss | mess | supported | + 1 | | version | name | devid | fss | mess | supported | 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' | (in this case will always be 'b') + 2 | (in this case will always be 2) answer: - 'b' | | + 2 | | This instucts the bootloader to boot to the user application directly (no reset) @@ -99,10 +101,10 @@ reset: ~~~~~~ command: - 'r' | (in this case will always be 'r') + 3 | (in this case will always be 3) answer: - 'r' | | + 3 | | 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 | + 4 | addr | answer: - 'f' | | data | + 4 | | data | The bootloader reads words from flash address and returns it as . @@ -125,10 +127,10 @@ write flash: ~~~~~~~~~~~~ command: - 'F' | addr | data | + 5 | addr | data | answer: - 'F' | | + 5 | | The bootloader writes (which has to contain exactly words) to address inside the flash. @@ -138,10 +140,10 @@ read eeprom: ~~~~~~~~~~~~ command: - 'e' | addr | len | + 6 | addr | len | answer: - 'e' | | data | + 6 | | data | The bootloader reads bytes from eeprom at address and returns it as . len is 2bytes long. @@ -151,10 +153,10 @@ write eeprom: ~~~~~~~~~~~~~ command: - 'E' | addr | len | data | + 7 | addr | len | data | answer: - 'E' | | + 7 | | The bootloader writes (which has to contain exactly bytes) to address inside the eeprom. len is 2bytes long and the value must not exceed bytes. @@ -163,24 +165,24 @@ write eeprom: read config: ~~~~~~~~~~~~ - command: - 'c' | nr | + command: + 8 | nr | - answer: - 'c' | | word | + answer: + 8 | | word | - The bootloader reads and returns the configuration word number . is one - byte long. + The bootloader reads and returns the configuration word number . is one + byte long. write config: ~~~~~~~~~~~~~ - command: - 'C' | nr | word | + command: + 9 | nr | word | - answer: - 'C' | | + answer: + 9 | | - The bootloader writes onto configuration word number . is one - byte long + The bootloader writes onto configuration word number . is one + byte long. -- cgit v1.2.3