diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-07-07 14:17:49 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-07-07 14:17:49 +0000 |
commit | ed9c1e9f9689c5364fe63742d17015b17bcaa265 (patch) | |
tree | 2685c8c4405e7a0391eb13c5c88a03d46b29727d /downloader | |
parent | added flash and eeprom sizes to identify (diff) |
removed name for identify - now using userid
git-svn-id: https://svn.spreadspace.org/pic/trunk@49 a09c6847-51d9-44de-8ef2-e725cf50f3c7
Diffstat (limited to 'downloader')
-rwxr-xr-x | downloader/downloader.py | 8 | ||||
-rw-r--r-- | downloader/proto.txt | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/downloader/downloader.py b/downloader/downloader.py index f0407e9..c0ce34f 100755 --- a/downloader/downloader.py +++ b/downloader/downloader.py @@ -158,8 +158,8 @@ def exec_command(dev, cmd, param, answer): ### Commands def identify(dev): - data = exec_command(dev, 1, '', '<BB10sHHBHBH') - id = { 'ver_min': data[0], 'ver_maj': data[1], 'name': data[2], 'devid': data[3], + data = exec_command(dev, 1, '', '<BBHHHBHBH') + id = { 'ver_min': data[0], 'ver_maj': data[1], 'userid': data[2], 'devid': data[3], 'fs': data[4], 'fss': data[5], 'es': data[6], 'mess': data[7], 'supported': data[8] } if id['ver_maj'] != VERSION_MAJ: @@ -169,8 +169,8 @@ def identify(dev): print "FSS value is 0 " sys.exit(4) - print "connected with Bootloader '%s' Version %d.%d, (ID=%04X, %d bytes Flash, FSS=%d, %d bytes EEPROM, MESS=%d)" % \ - (id['name'], id['ver_maj'], id['ver_min'], id['devid'], id['fs'], id['fss'], id['es'], id['mess']) + print "connected with Bootloader '%04X' Version %d.%d, (ID=%04X, %d bytes Flash, FSS=%d, %d bytes EEPROM, MESS=%d)" % \ + (id['userid'], id['ver_maj'], id['ver_min'], id['devid'], id['fs'], id['fss'], id['es'], id['mess']) return id def boot(dev): diff --git a/downloader/proto.txt b/downloader/proto.txt index a53acc9..af32584 100644 --- a/downloader/proto.txt +++ b/downloader/proto.txt @@ -43,16 +43,16 @@ identify: 1 | len=3 | <csum> answer: - 1 | len=22 | <ret> | version | name | devid | fs | fss | es | mess | supported | <csum> + 1 | len=22 | <ret> | version | userid | devid | fs | fss | es | mess | supported | <csum> version: 2bytes, protocol version It is an error if the major version (MSB) is different (hence any protocol update must change the major version of the bootloader). - name: - 10bytes, a descriptive name of the device. - The downloader has to compare this name with the device name supplied + userid: + 2bytes, an id which determines the exact device + The downloader has to compare this with the device id supplied via commandline and stop in case they don't match devid: |