Grigori Goronzy
ccd4b1e26b
Restructure documentation
...
Move all extra documentation files into doc/ and move reverse
engineering related notes to a separate directory, to keep things tidy.
2018-09-04 00:31:43 +02:00
Grigori Goronzy
71d7257422
Split up documentation
...
Split up the giant README.md file into INSTALL, MODELS and USAGE
sections. The new sections are linked from README.
2018-08-31 21:22:46 +02:00
Grigori Goronzy
0ff7e16f38
Add FAQ
...
Addresses a bunch of common questions gathered from GitHub issues.
2018-08-31 20:31:19 +02:00
Grigori Goronzy
aca713595b
Add STC8F2K08S2 to compatibility report
...
Seems to work just fine after some testing: flash programming,
EEPROM programming and options appear to work correctly.
2018-08-25 04:28:21 +02:00
Grigori Goronzy
69b83f0ea1
Update model database
...
Update model database from STC-ISP v6.86O. This is needed for the
STC8F2 series.
2018-08-25 04:16:26 +02:00
Grigori Goronzy
170008971d
Delete TODO
...
Wildly outdated. Further TODOs are handled with the GitHub issue tracker.
2018-08-23 17:52:06 +02:00
Grigori Goronzy
cd229eab47
Add IAP15L2K61S2 to compatibility list
...
Closes #42 .
2018-08-21 13:27:21 +02:00
Grigori Goronzy
ce251f9d30
stc8: check length of status packet
...
Fixes a fuzzing error.
2018-08-21 13:17:14 +02:00
Grigori Goronzy
11d2ea22e6
stc8: add tests
...
Add a standard programming test for STC8A8 series and integrate it into
the fuzzer.
The fuzzing tests currently fail.
2018-08-21 13:16:40 +02:00
Grigori Goronzy
c7c4937628
stc8: remove cruft
...
Remove some old leftover cruft from porting and development. No
functional change intended.
2018-08-21 13:16:40 +02:00
Grigori Goronzy
ac119e180e
stc8: round BRT value to nearest integer
...
Baud rate register (BRT) values need to be as accurate as possible, so
use nearest instead of floor. This should improve reliability at higher
programming speeds.
2018-08-21 13:16:40 +02:00
Grigori Goronzy
fcbc560ade
stc8: print additional MCU info
...
Print manufacturing date as well as the factory-measured internal
voltage reference value. These values are displayed by STC-ISP, too.
2018-08-21 13:16:40 +02:00
Grigori Goronzy
7b4758499b
Merge pull request #44 from grigorig/stc8
...
STC8 series support
2018-08-21 02:07:28 +02:00
Grigori Goronzy
fe60e647bf
stc8: implement option handling
...
Implement option handling for STC8 series, based on STC8A8K64S4A12
reverse engineering.
This mostly wraps up all important parts of the STC8 implementation.
Interoperability was tested with STC-ISP V6.86O.
v2: update documentation
2018-08-21 02:01:39 +02:00
Grigori Goronzy
0ffcbd197b
stc8: finish up frequency calibration
...
This is a collection of various changes:
* Also try divider of 5 (it's used by STC-ISP)
* Use the correct IAP delay for the 24 MHz programming frequency
* Also try a trim adjust value of 0x03 and adjust trim ranges
* Fix display of calibrated frequency
2018-08-20 23:47:42 +02:00
Grigori Goronzy
85e815366c
stc8: try dividers 2 and 4 for frequency calibration
2018-06-27 01:10:46 +02:00
Grigori Goronzy
8bc9d89257
Add preliminary STC8 support
...
What works:
* Frequency calibration of internal RC oscillator
* Flash/EEPROM programming
What doesn't work yet:
* Everything else
2018-06-27 01:05:06 +02:00
Grigori Goronzy
b47092093e
Fix frontend argument parser
...
Refactoring sneaked in an issue with the string formatting.
2018-06-27 01:03:22 +02:00
Grigori Goronzy
bc5e8ce6cb
setup: load long description from README.md
2018-06-27 00:10:41 +02:00
Grigori Goronzy
d9e71a8694
Misc style and consistency fixes (NFC)
...
Various style, naming and other changes as recommended by pep8,
pyflakes and pylint.
2018-06-27 00:05:16 +02:00
Grigori Goronzy
4dcde5cc49
Clean up imports (NFC)
2018-06-27 00:05:16 +02:00
Grigori Goronzy
3ec6f5b6bd
setup: improve metadata
2018-06-26 23:06:30 +02:00
Andrew Andrianov
eb6df3b645
debian: Update Build-Depends and Depends
...
This closes #32
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2018-06-26 22:14:41 +02:00
Grigori Goronzy
eb8eecbc9b
Merge pull request #38 from zerog2k/master
...
stc15f204ea should use protocol stc15a
2018-02-04 18:13:22 +01:00
Jens J
c71e455f16
stc15f204ea should use protocol stc15a
2018-02-04 09:46:10 -06:00
Grigori Goronzy
a5e1cc26ee
Merge pull request #31 from nekromant/progressbar
...
Implement progress callback and tqdm progressbar
2017-10-22 15:55:45 +02:00
Andrew Andrianov
b77157bc40
.travis.yml: Install tqdm to make ci happy
...
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-19 11:26:42 +03:00
Andrew Andrianov
092fbdc842
protocols.py: Implement progress callback and tqdm progressbar
...
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-19 11:26:27 +03:00
Grigori Goronzy
e0bda73fed
Merge pull request #29 from grigorig/advanced-tests
...
Advanced tests
2017-10-18 23:22:40 +02:00
Grigori Goronzy
57100062af
Rename test/ to tests/
2017-10-12 23:02:02 +02:00
Grigori Goronzy
030497beb0
Extract StcAutoProtocol class, fix autodetection
...
With the introduction of real abstract classes, it is not possible
anymore to instantiate StcBaseProtocol. Instead, extract some of the
code for autodetection into the new class StcAutoProtocol and use
that for autodetection.
2017-10-12 23:02:02 +02:00
Grigori Goronzy
fd923f3a92
Cleanup utils
...
Just a tiny simplification, found by pylint.
2017-10-12 23:02:02 +02:00
Grigori Goronzy
b145fb364a
Remove unneeded include
2017-10-12 23:02:02 +02:00
Grigori Goronzy
a29c9bf42e
Add fuzzing programming cycle tests
2017-10-12 23:02:02 +02:00
Grigori Goronzy
1cde6da007
stc15: check that a UID has been received
...
Found by fuzzing. In some cases it's possible that we end up without
a valid UID. Detect and workaround.
2017-10-12 23:02:02 +02:00
Grigori Goronzy
ca30a508aa
Fix various issues in frequency trimming
...
Found by fuzzing. The frequency trimming functions did a bad job of
checking for possible out of bounds accesses and didn't handle various
failure cases correctly. Add suitable checks to fix the issues found.
v2: fix one check, add several new ones
2017-10-12 23:01:50 +02:00
Grigori Goronzy
b9208c4772
Add length checks for status packets
...
Fuzzing found a number of issues when status packets are cut short.
Introduce checks on the length of status packets to fix these issues.
2017-10-11 23:20:20 +02:00
Grigori Goronzy
ad5a89297f
Check length of responses
...
Fuzzing found lots of issues when packets are cut short. This should
rarely happen, but stcgal should be able to handle it without crashing.
This adds length checks when checking the magic of packets or when
checking checksums.
2017-10-11 23:20:20 +02:00
Grigori Goronzy
0cb56f4919
Use abc for StcBaseProtocol
...
Use the abc module to declare StcBaseProtocol as an abstract base
class and clean up imports while at it.
2017-10-11 23:20:20 +02:00
Grigori Goronzy
f195258eb5
Clean up options utilities
...
Use abc to declare an abstract base class and add some documentation.
2017-10-11 23:20:20 +02:00
Grigori Goronzy
ff9530833d
Update gitignore
2017-10-11 23:19:11 +02:00
Grigori Goronzy
8b0fdcb42a
Clean up Intel HEX utilities
...
No functional change intended.
2017-10-11 23:18:59 +02:00
Grigori Goronzy
ebcfeb467c
Merge pull request #27 from nekromant/fixes
...
Implement power-cycling via a custom shell cmd, update models.py
2017-10-09 00:05:55 +02:00
Andrew Andrianov
d7e226df6b
README.md: Document -r option properly
...
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-08 23:58:31 +03:00
Andrew Andrianov
191a580469
protocols: Move device reset logic to a separate method
...
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-08 23:20:17 +03:00
Andrew Andrianov
c131a9d901
frontend: Use command instead of cmd in description
...
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-08 23:19:55 +03:00
Andrew Andrianov
3f4263e8fe
models.py: Add some STC15xxx definitions from stcdude's mcudb
...
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-07 23:30:03 +03:00
Andrew Andrianov
ba4faf9c43
Implement power-cycling via custom shell command
...
Sometimes instead of DTR line some custom way (e.g SoC gpio line)
may be used to reset the device. This commit implements
automated power-cycling using a a custom shell command that can
be specified via -r option
Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
2017-10-07 22:41:49 +03:00
Grigori Goronzy
f1bafb1e0d
Update version to 1.4
2017-09-19 18:00:02 +02:00
Grigori Goronzy
fdd6707d2d
Add Travis CI for CI and CD
...
Run tests for each commit and deploy packages (deb/rpm) for each
release tag.
2017-09-19 17:54:26 +02:00