Commit Graph

218 Commits

Author SHA1 Message Date
3a81844a17 frontend: prefer to catch SerialException
It's a subclass of IOError, which we were catching first.
2015-11-24 01:42:53 +01:00
d318384c25 stc15: handle uncalibrated chips 2015-11-24 01:37:22 +01:00
ef84cf3cd5 Update README again
Just some minor fixes.
2015-11-24 00:44:34 +01:00
6601cb91f1 Update README 2015-11-24 00:41:29 +01:00
63327e3498 frontend: add Intel HEX support
Add Intel HEX support with the help of the IHex library. IHex needed
some modifications to make it work with Python 3.

Intel HEX files are autodetected, based on file extension (.hex,
.ihx or .ihex).
2015-11-24 00:36:44 +01:00
f452ca226e frontend: return instead of exit 2015-11-23 23:48:58 +01:00
7317f9e3a7 frontend: use 1200 BPS for handshake by default
It's not much slower but makes frequency measurement and calibration
more reliable.
2015-11-23 23:44:50 +01:00
ad57488e4f Unify options
Eradicate inconsistencies, get it in sync with docs.
2015-11-23 23:30:29 +01:00
b6c87fb532 Add option descriptions to README 2015-11-23 23:29:22 +01:00
3966e2e109 Merge branch 'packaging' 2015-11-23 22:37:49 +01:00
14a8b061c1 Clean up TODO 2015-11-23 22:36:11 +01:00
a5795dbee8 Add gitignore
Especially ignore all the cruft from disttools/setuptools.
2015-11-23 22:32:39 +01:00
bc6447fdc9 Add missing stdout flush calls
This makes the progress display much more useful.
2015-11-23 22:23:50 +01:00
af35a6ba51 setup: add metadata 2015-11-23 22:19:21 +01:00
2bf43d161a Update README 2015-11-23 22:19:21 +01:00
b96bc39948 setup: use version from package 2015-11-23 22:19:21 +01:00
bc242390e7 Add packaging infrastructure
Split up single script into a package with multiple modules.
Also add a setuptools control file. With this, stcgal can be
installed like any other program. It's still possible to launch
from the sources directly. stcgal.py has been converted into a
simple launcher.

v2: fix imports
2015-11-23 22:19:06 +01:00
797dcbccda Update README
Some more info about device options and other misc changes.
2015-11-23 15:24:06 +01:00
bd41521c6d Add commented dump to stc15a docs 2015-11-22 18:47:24 +01:00
5b4f9d0ef0 Add stc89 and stc12a dumps 2015-11-22 18:45:01 +01:00
391f6433fe stc15: print wakeup timer value 2015-11-22 18:44:37 +01:00
aae3d946f6 Add more dumps and new STC15 protocol info 2015-11-22 18:24:20 +01:00
7a858f3334 Fix up README 2015-11-22 18:09:49 +01:00
9da8da6807 Update README 2015-11-22 18:05:45 +01:00
d5b35cf43d Rename stc15 and stc15x protocols
The protocol originally named "stc15" is only used for two early STC15
series, i.e. STC15F104/STC15F204. All other STC15 series appear to
use a different protocol. So switch around names similary to "stc12"
vs "stc12a".

In conclusion:
- "stc15a" is used only for STC15xx04E(A)
- "stc15" is used for all other currently tested STC15 MCUs
2015-11-22 17:45:31 +01:00
24a2a4a15b Merge branch 'stc15' 2015-11-22 17:42:15 +01:00
8297904753 stc15x: add external clock handling 2015-11-22 17:36:06 +01:00
75ac790141 Add IAP15F2K61S2 to compatibility list
In fact, all current STC 15 MCUs should work now.
2015-11-22 17:36:06 +01:00
52b346ebfc Flush stdout in some more error cases 2015-11-22 17:36:06 +01:00
ed28c8ef89 stc15x: add hack for SW/HW UART differences 2015-11-22 17:36:05 +01:00
bf7cbb2042 Add support for new BSL 7.x STC15 parts
These use a somewhat modified protocol with support for external clock.
This should get all STC/IAP15F2/L2 etc. work correctly. Only parts with
BSL 7.1 were tested, although BSL 7.2 should work as well.

The functionality is encapsulated in the new protocol "stc15x".
2015-11-22 17:35:58 +01:00
6f77535673 Fix output in error cases 2015-11-22 04:27:46 +01:00
bb6fd8d8fb Add debug command line flag 2015-11-21 01:41:25 +01:00
1a0e100ab6 Update MCU database
Up to STC-ISP 6.85I. Also remove dump-mcu.txt, not really needed.
2015-11-21 00:41:30 +01:00
b2326bf8e9 Update TODO 2015-11-21 00:40:15 +01:00
84c3e1989c Add note regarding input formats 2015-11-19 00:38:05 +01:00
0fe01db8f1 Add two other tested MCUs 2015-11-19 00:37:31 +01:00
62c85d06c8 Add STC12A (early STC12) series protocol support
STC12A is my name for the mixup protocol between STC89 and
STC12 that is used by some early STC12 series MCUs (for examples
STC12C2052AD). The protocol differs in many subtle ways so there is
quite a bit of unfortunate code duplication for the moment.
2014-01-29 00:40:17 +01:00
033d4a4016 Documentation fixes 2014-01-24 00:30:21 +01:00
977fb205ed Add STC 89/90 series protocol support 2014-01-24 00:30:02 +01:00
ca1bd4dcab stc12: fix detection of illegal baudrates 2014-01-23 15:08:24 +01:00
1bd2ec9cbe Extract base class for protocols 2014-01-23 14:54:09 +01:00
87a257e63e Improve synchronization and timeout handling
Make sure we can safely sync to the status packet in case
garbage is received before.
2014-01-21 16:03:38 +01:00
5bcad70d77 Update MCU database 2014-01-17 12:08:23 +01:00
517af0b6bd Add README 2014-01-15 01:09:49 +01:00
8d782bb626 Add mail address to license text 2014-01-15 01:09:29 +01:00
2695f16809 Distinguish between communication error types 2014-01-15 00:56:12 +01:00
407e956dfb Ignore garbage packets in synchronization state
The MCU might still be running user code and toggling the UART pins
when stcgal is started. Just ignore all garbage we see in this stage
until we get a valid package.
2014-01-15 00:55:59 +01:00
e54610bcf5 Add read timeouts and handle them sensibly 2014-01-15 00:20:58 +01:00
a1fa53456e Fix and refactor disconnect 2014-01-14 23:00:56 +01:00