Hi Dave... Im writing Window's based software that will do a bunch of automation in regards to scripting out a 'hardware test map' for a user defined platforms using your ICE projects. So if you envision the steps required to maybe do the following..
Test RAM from 0x000-01FF - maybe test all patterns
SET RAM Page 1(via memory write to 0x1740 of 0)
Test RAM from 0x0200-07FF
SET RAM Page 1 (via memory write to 0x1740 of 1)
Test RAM from 0x0200-07FF
Test RAM from 0x0800-09FF
Test Paged ROM similar to above (8 pages from 0x2000-0x3FFF) - match a preconfigured checksum
Test RAM from 0x4000-4FFF
Test ROM from 0x5000-5FFF - match a preconfigured checksum
Test Paged ROM similar to above (4 pages from 0x6000-7FFF) - match a preconfigured checksum
Test ROM from 0x8000-BFFF - match a preconfigured checksum
Test ROM from 0xC000-FFFF - match a preconfigured checksum
I'm batching a straight PASS/FAIL and the basic concept is that both the commands and return values need to be easy to read from a programmatic standpoint. It certainly isn't the end of world to parse this out, but it certainly will be error prone over time.
So for example... right now, upon start, I need to run the 'help' command to identify connectivity and get the CPU Identifier string (and then ignore all the rest). Or if I want to read the Version of the firmware, I need to run 'help' and then parse out through string regex the version number in the middle of the response.
The next example which is simpler, but still illustrates a point is the 'crc' command which I just need to skip out the leading 'crc: ' from the 4 digit hex value.
With all of that, I wanted to ask a couple questions to make sure that if Im doing work, that Im in line with your vision because I am happy to contribute to your main Dev branch if you find it valuable.
- I suspect that many of the 'programmatic' versions of commands will be very similar, just less wordy. For example I have in my branch and 'id' command that simply returns the ICE Identifier 'ICE6809' and another command 'ver' just returns '0.998' and for crc it returns just 'FFFF' or whatever. as I look at your code, this will become problematic eventually because there will be essentially double the commands potentially. Perhaps it is more worthwhile to make a command to set an internal flag that is the opposite of verbose and more like 'concise'... it would be false by default unless set, and then once 'concise' is set, then all commands would return the shorter version. Even with 'concise', I would probably still need an 'id' and 'ver' commands.
- Another option since this is programmatic only, is to make a super flexible command that just takes parameters... so maybe like 'xxx' that takes a first parameter from 0-i which actually maps to a whole different command structure. so 'x 0' might return the ICE Identifier, 'x 1' would return the version number, 'x 2 0000 01FFF' would return a CSUM from 0000-1FFF etc. Perhaps that actually makes more sense?
- Maybe you don't even want to have this functionality in your branch and that is good too, I just want to know what you prefer because I can see pros and cons for both directions. Plus, if you don't want this in your branch, I won't bother with pull requests to you.
Thoughts?