From e16b94678da7686c05845143e60f1cef3dad832c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 3 Jul 2013 23:55:18 +0000 Subject: added 'mess' value to identify git-svn-id: https://svn.spreadspace.org/pic/trunk@29 a09c6847-51d9-44de-8ef2-e725cf50f3c7 --- downloader/downloader.py | 5 +++-- downloader/proto.txt | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'downloader') diff --git a/downloader/downloader.py b/downloader/downloader.py index 936f459..c918357 100755 --- a/downloader/downloader.py +++ b/downloader/downloader.py @@ -158,8 +158,9 @@ def exec_command(dev, cmd, answer): ### Commands def identify(dev): - data = exec_command(dev, 'i', 'BB10sHBB') - id = { 'ver_maj': data[0], 'ver_min': data[1], 'name': data[2], 'devid': data[3], 'fss': data[4], 'supported': data[5] } + data = exec_command(dev, 'i', 'BB10sHBHH') + id = { 'ver_maj': data[0], 'ver_min': data[1], 'name': data[2], 'devid': data[3], + 'fss': data[4], 'mess': data[5], 'supported': data[6] } if id['ver_maj'] != VERSION_MAJ: print "incompatible protocol version, expected: %d, got: %d" % (VERSION_MAJ, id['ver_maj']) diff --git a/downloader/proto.txt b/downloader/proto.txt index 826be5f..5afe572 100644 --- a/downloader/proto.txt +++ b/downloader/proto.txt @@ -39,7 +39,7 @@ identify: 'i' | (in this case will always be 'i') answer: - 'i' | | version | name | devid | fss | supported | + 'i' | | version | name | devid | fss | mess | supported | version: 2bytes, protocol version @@ -61,8 +61,15 @@ identify: The downloader can fill up holes by supplying the illegal code word 0xFFFF for some addresses. The bootloader will skip those areas. + mess: + 2bytes, maximum eeprom segment size + This represents the maximum number of eeprom bytes which may be written at + once. Unlike value it is ok to write less than bytes. Also + this only applies to eeprom writes, reading the eeprom is much faster and + therefore not subject to this limitation. + supported: - 1byte, a bitmap showing supported commands + 2bytes, a bitmap showing supported commands The commands 'identify' and 'boot' are always supported by the bootloader, others may not (i.e.: not all PICs allow to update the configurtion words) @@ -151,7 +158,7 @@ write eeprom: 'E' | | The bootloader writes (which has to contain exactly bytes) to address - inside the eeprom. len is 2bytes long. + inside the eeprom. len is 2bytes long and the value must not exceed bytes. read config: -- cgit v1.2.3