Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python3 + cleanups and fixes #12

Open
wants to merge 325 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
325 commits
Select commit Hold shift + click to select a range
b1e9700
Bring changelog up to date
florisla Apr 6, 2018
6cbdebf
Add __init__.py to work in project
Atokulus Jul 5, 2018
2feccb0
Fix inefficient serial write
Atokulus Jul 27, 2018
1648aec
Merge pull request #1 from Atokulus/master
florisla Jul 30, 2018
da6c403
Fix typo
florisla Jun 14, 2018
1b76d81
Doc: credit Atokulus
florisla Jul 30, 2018
4a8cdfc
Fix typo
florisla Jul 30, 2018
702122b
Move code into separate stm32loader folder
florisla Jul 30, 2018
231f759
Add __version__.py and move version definition there
florisla Jul 30, 2018
4d66bb4
Import all attributes in top-level module
florisla Jul 30, 2018
da01abc
Rename COPYING to LICENSE (as is more common)
florisla Jul 30, 2018
ac8974d
Add setup.py for building distribution packages
florisla Jul 30, 2018
aeddff9
Customize setup.py for stm32loader
florisla Jul 30, 2018
8b6f3fb
Cleanup: ignore build results
florisla Jul 30, 2018
a2b233d
Update changelog
florisla Jul 30, 2018
70d51b9
Merge branch 'distributable-package'
florisla Jul 30, 2018
0d59758
Remove Environment::Console classifier - it's not accepted by PyPI
florisla Jul 31, 2018
2ebc2f9
Doc: declare compatibility with same Python versions as pyserial
florisla Jul 31, 2018
639e87b
Doc: add project URLs
florisla Jul 31, 2018
f02157d
Merge branch 'pypi-package'
florisla Jul 31, 2018
2567865
Make module executable
florisla Jul 31, 2018
8f89d68
Add a console script ('stm32loader')
florisla Jul 31, 2018
5e4b372
Merge pull request #5 from florisla/3-executable-module
florisla Jul 31, 2018
d2f4feb
Don't advertise support for Python 2.6
florisla Jul 31, 2018
66cbd93
Include build-time dependencies in setup.py
florisla Jul 31, 2018
995003e
Include LICENSE file in the wheel package
florisla Jul 31, 2018
f5a0506
Increment version number to 0.3.2
florisla Jul 31, 2018
ec797c7
Merge branch 'nicer-wheel'
florisla Jul 31, 2018
5e4fda1
Describe changes in 0.3.2
florisla Jul 31, 2018
d85b777
Automate version updates with bump2version
florisla Aug 1, 2018
455d379
Bugfix by Atokulus: write data, not [data]
florisla Aug 8, 2018
adb7b58
Release: bump version number from v0.3.2 to v0.3.3
florisla Aug 8, 2018
66296b0
Add support for STM32F7 processors
sam-bristow Oct 9, 2018
302dc63
Merge remote-tracking branch 'sam-bristow/f7-support'
florisla Oct 9, 2018
a05d24a
Document the latest changes
florisla Oct 9, 2018
1ec166c
Refer to specific AN table with chip IDs
florisla Oct 9, 2018
a436b9e
Support write with byte count smaller than 256 too
florisla Apr 9, 2019
09d26aa
Start linting and formatting with pylint, flake8 and black
florisla Apr 17, 2019
4de4c79
Cleanup: satisfy pylint, flake8 and blacken the code
florisla Apr 17, 2019
2065daa
Cleanup: simplify setup.py and satisfy linters
florisla Apr 17, 2019
703b4dc
Move version to __init__.py and track it independently in setup.py
florisla Apr 17, 2019
59152eb
Doc: add 'to do' list
florisla Apr 17, 2019
8ab2b26
Extract rs-232 peculiarities into SerialConnection class
florisla Apr 17, 2019
8c74273
Move Stm32Bootloader into separate file
florisla Apr 17, 2019
97357a4
Allow to run main() from code
florisla Apr 17, 2019
3ac8d8c
Boilerplate: improve header text
florisla Apr 17, 2019
e2d4f84
Add header to __main__.py
florisla Apr 17, 2019
ce92417
Use relative imports
florisla Apr 17, 2019
de52681
Include all config files in the sdist package
florisla Apr 17, 2019
fd72ce8
Update docs for upcoming release v0.4.0
florisla Apr 17, 2019
e7bd979
Ignore missing docstrings for now
florisla Apr 17, 2019
95f2336
Start using nox to test over all supported Python versions
florisla Apr 17, 2019
66e7712
Add first unit tests
florisla Apr 17, 2019
c7dc471
Cosmetic: satisfy flake max-doc-length
florisla Apr 17, 2019
f1be8de
Cleanup: satisfy pylint
florisla Apr 17, 2019
0006167
Use struct.pack instead of manually shifting bits
florisla Apr 17, 2019
f2bd30b
Add convenience methods write() and write_and_ack()
florisla Apr 17, 2019
0c73a36
Add unit tests for write() and methods that use it
florisla Apr 17, 2019
5583c36
Shorten command-calling code: move raise to command()
florisla Apr 17, 2019
b15b54d
Add missing docstrings
florisla Apr 17, 2019
d8d04a5
Only call extended erase if no specific sectors are specified
florisla Apr 17, 2019
5acc098
Satisfy minor linting warnings
florisla Apr 17, 2019
ed9162b
Mention future support for PyPy
florisla Apr 17, 2019
6fee650
Rename serial to rs232
florisla Apr 17, 2019
6fe8cca
Supply sys.argv explicitly to main()
florisla Apr 17, 2019
bf8a9cb
Rename stm32loader.py to main.py
florisla Apr 17, 2019
e132d6c
Satisfy linters for Python 2
florisla Apr 17, 2019
66f90c8
Move unit tests into separate folder
florisla Apr 17, 2019
0c0c95b
Add integration tests
florisla Apr 17, 2019
17255ef
Tell black to remain compatible to older Python versions
florisla Apr 17, 2019
3ea6764
Treat --help as an alias of -h
florisla Apr 17, 2019
c7a794f
Do all printing with the print() function
florisla Apr 17, 2019
af9cb5d
Add some new feature ideas
florisla Apr 17, 2019
d36e597
Show progress bar during read or write
florisla Apr 17, 2019
59e9bd6
Rename 'bootloader' to 'stm32'
florisla Apr 17, 2019
5b01af7
Add more exception types
florisla Apr 17, 2019
70f73d6
Add additional command words (unused for now)
florisla Apr 17, 2019
7e6fb9a
Define page size as a class variable
florisla Apr 17, 2019
43f8a95
Rewrite erase functionality
florisla Apr 19, 2019
d7cebbc
Move verification into Stm32Bootloader
florisla Apr 19, 2019
8d70272
Don't crash when read() doesn't return data
florisla Apr 19, 2019
8a1663b
Get serial port from env var STM32LOADER_SERIAL_PORT
florisla Apr 19, 2019
a6e7ac6
Start testing on Travis
florisla Apr 19, 2019
7181ec6
Don't choke on missing quotes around the port name
florisla Apr 19, 2019
c9ec831
Rename rs232 to uart
florisla Apr 19, 2019
970e3c1
Read -f ('family') value also from environment
florisla Apr 19, 2019
dadab77
Add some more comments to _encode_address
florisla Apr 19, 2019
023ef02
Bugfix: erase_memory erases in 1KiB pages, not 256 bytes
florisla Apr 19, 2019
2e25855
Merge branch 'version/0.4.x'
florisla Apr 19, 2019
9da03ca
Release: bump version number from v0.3.3-dev to v0.4.0-dev
florisla Apr 19, 2019
72760e6
Release: bump version number from v0.4.0-dev to v0.4.0
florisla Apr 19, 2019
c297af3
Bugfix: VERSION was set to None
florisla Apr 19, 2019
b32c128
Release: bump version number from v0.4.0 to v0.4.1-dev
florisla Apr 19, 2019
ca08caf
Add some more badges to README
florisla Apr 23, 2019
e546133
Add support for chip_id 0x444: STM32F03xx4/6
omerk May 1, 2019
3a96e4e
Tidy up get_uid() and format_uid()
omerk May 2, 2019
f13a6e9
Use early-return for the special UID cases
florisla May 2, 2019
524a198
Rename 'self' to 'cls' for the classmethod
florisla May 2, 2019
2b5567a
Add param docstring for get_uid 'device_id'
florisla May 2, 2019
c6ea0aa
Add some tests on get_uid and format_uid
florisla May 2, 2019
0ad7df1
Docs: acknowledge Omer Kilic
florisla May 2, 2019
301b86c
Merge branch 'omerk/chip-id-0x444'
florisla May 2, 2019
09e8fd1
Drop support for Python 3.2 and 3.3 in Trove classifiers
florisla Apr 19, 2019
0c0f6b6
Release: bump version number from v0.4.1-dev to v0.5.0-dev
florisla May 2, 2019
053cc53
Fix for Python 2
florisla May 2, 2019
ee53162
Release: bump version number from v0.5.0-dev to v0.5.0
florisla May 2, 2019
0bf8d0d
mass memory erase fixed
byq77 Jul 4, 2019
871a55b
setter fix, name fix for boot0 active state
byq77 Jul 13, 2019
22e5a72
fix
byq77 Jul 13, 2019
27a4297
-f option fix for F4 devices
byq77 Jul 14, 2019
476dcd7
Merge remote-tracking branch 'byq77/byq77-fixes'
florisla Aug 12, 2019
c13b027
docs: Move comment on Python2 setters to within the class
florisla Aug 12, 2019
637d98c
refactor: Split up read_device_details into _id and _uid
florisla Aug 12, 2019
73c44c5
docs: add more context to docstring about F4 oddity
florisla Aug 12, 2019
c67fa38
docs: Mention byq77 as a contributor
florisla Aug 12, 2019
9c73e8b
style(docs): Line length
florisla Aug 12, 2019
ade9748
Merge branch 'cleanup'
florisla Aug 12, 2019
68db5ee
refactor: Simplify detection of reset/boot0 capability
florisla May 13, 2019
a6b166c
fix(docs): Typo
florisla May 13, 2019
634e05f
Merge branch 'simplify-reset-boot0'
florisla Aug 12, 2019
feb0b0d
support for STM32L4 added
Aug 19, 2019
ce08cc1
Added some MCU ids.
stawiski Sep 26, 2019
2a24b6e
Add support for STM32F3
float32 Oct 20, 2019
380bd88
Add STM32G0 to ID
AlexKlimaj Dec 21, 2019
24ecbd9
Attempt to activate bootloader twice
hiviah Dec 21, 2019
5150d4d
clean(style): Blacken using latest black
florisla Dec 31, 2019
a912c76
docs: Add references to STM32L4 manual
florisla Dec 31, 2019
6fc4cf6
Merge branch 'rdaforno/stm32l4'
florisla Dec 31, 2019
4322196
docs: Add reference to RM0091
florisla Dec 31, 2019
3981e69
Merge branch 'new-stm32f0-ids'
florisla Dec 31, 2019
3710b6d
clean: Re-shuffle the STM32F3 IDs a bit
florisla Dec 31, 2019
b6e412b
Merge branch 'float32/stm32f3'
florisla Dec 31, 2019
8863210
Merge remote-tracking branch 'AlexKlimaj/STM32G0'
florisla Dec 31, 2019
0baa51e
clean(style): Reshuffle a bit
florisla Dec 31, 2019
67323f8
Merge branch 'bootloader_retry'
florisla Dec 31, 2019
dc2e552
Release: bump version number from v0.5.0 to v0.5.1-dev
florisla Dec 31, 2019
948d2e0
feat: Include version number in help text
florisla Dec 31, 2019
f9d652b
feat: Add --version argument
florisla Dec 31, 2019
4815c33
Merge branch '24-version'
florisla Dec 31, 2019
116ddb5
docs: Show how to download firmware to file
florisla Dec 31, 2019
1f5d8f8
Merge branch '20-read-example'
florisla Dec 31, 2019
da17ba1
feat: Support Python 3.8
florisla Dec 31, 2019
c8ca2f7
clean(lint)
florisla Dec 31, 2019
81b87a6
Merge branch '35-python-38'
florisla Dec 31, 2019
3abca05
docs: Update release notes
florisla Dec 31, 2019
8c5aad8
Release: bump version number from v0.5.1-dev to v0.5.1
florisla Dec 31, 2019
3f910b9
Release: bump version number from v0.5.1 to v0.5.2-dev
florisla Dec 31, 2019
e1347a2
docs: Mention --version argument in README
florisla Jan 2, 2020
4e020f7
docs: Change stm32loader from Python file to executable
florisla Jan 2, 2020
4f4c784
clean: Stop announcing and testing Python 2
florisla Jan 2, 2020
c9c0ba7
clean: Remove Python-2-isms
florisla Jan 2, 2020
84290e4
Merge branch '37-drop-python-2'
florisla Jan 2, 2020
a1ba069
docs: Describe basic contributor workflow
florisla Jan 2, 2020
64e9366
fix: Also install bump2version as development tool
florisla Jan 2, 2020
497e1f7
Merge branch '36-document-workflow'
florisla Jan 2, 2020
794e8ac
Port argument parsing to argparse
emilazy Jan 16, 2020
126ae5b
Add lookup information for H7 devices; protocol should remain the same
denniszollo Jan 20, 2021
6306d74
Merge pull request #40 from emilazy/use-argparse
florisla Feb 25, 2022
88279c0
feat: Add some unit tests on argument parsing
florisla Feb 25, 2022
3122583
clean(lint)
florisla Feb 25, 2022
2cab218
release: Drop Python 3.4, 3.5 and add 3.9 and 3.10
florisla Feb 27, 2022
802b043
Merge branch 'dzollo/H7_support'
florisla Feb 27, 2022
7501e16
feat: Flush input buffer after MCU reset
florisla Feb 28, 2022
85bc03e
docs: Improve code comments
florisla Feb 28, 2022
c018d70
Merge branch 'feature/flush-after-reset'
florisla Feb 28, 2022
40fb059
fix: Don't limit page count to 256 in extended_erase_memory
florisla Feb 28, 2022
21756b3
docs: Refer to alternative (/similar) tools
florisla Feb 28, 2022
1a496c0
feat: Add metadata for L0 family
florisla Feb 28, 2022
71d93b8
feat: Pass in device_family to the constructor
florisla Feb 28, 2022
18d038c
feat: Derive data_transfer_size and flash_page_size from device_family
florisla Feb 28, 2022
1a9e327
feat: Enable get_flash_size_and_uid also for L0 family
florisla Feb 28, 2022
34fe027
feat: Erase pages individually for L0 family
florisla Feb 28, 2022
db014b2
Merge branch 'feature/discern-l0-f4'
florisla Feb 28, 2022
611d871
docs: Describe GigaDevice tools
florisla Feb 28, 2022
749aca1
docs: Describe how to extend stm32loader
florisla Feb 28, 2022
5247d3d
docs: Show how to install from github
florisla Feb 28, 2022
ad8957a
docs: Describe the various ways to start stm32loader
florisla Feb 28, 2022
b9bc1d4
docs: Drop To Do items which are done
florisla Feb 28, 2022
4b3a86c
docs: Update Python versions
florisla Feb 28, 2022
f71daa2
docs(cosmetic)
florisla Feb 28, 2022
b97e2aa
Merge branch 'feature/more-docs'
florisla Feb 28, 2022
d047a36
docs: Improve comments
florisla Feb 28, 2022
53bc0ee
feat: Raise proper for L0 erase of page >= 256
florisla Feb 28, 2022
2a1f954
feat: Add unit tests for tricky erase and flash_size
florisla Feb 28, 2022
6776c29
feat: Use Tox and Github Actions for CI
florisla Mar 2, 2022
6c2fab7
Merge branch 'feature/github-actions'
florisla Mar 2, 2022
fa7d36e
Release: bump version number from v0.5.2-dev to v0.6.0-dev
florisla Mar 3, 2022
30f6141
Release: bump version number from v0.6.0-dev to v0.6.0
florisla Mar 3, 2022
8e22a86
feat: Add GitHub actions file to run lint
florisla Mar 8, 2022
bc0f46d
Merge branch 'feature/ci-lint'
florisla Mar 8, 2022
9e126b6
clean: Always use 'stm32loader' as the program name
florisla Mar 8, 2022
730db6b
docs: Auto-update the help text in README using cog
florisla Mar 8, 2022
0363f2e
docs: Describe recent changes in README and CHANGELOG
florisla Mar 8, 2022
c766e63
clean: Ignore .tox folder
florisla Mar 8, 2022
647e606
clean: Rename job 'tox' to 'pytest'
florisla Mar 8, 2022
6844fa7
docs(cosmetic): Capitalize help text
florisla Jun 21, 2022
1e1a650
stm32l0 fix
tosmaz Jan 3, 2023
9f508d6
doc: Add comment about special-case L0 mass erase
florisla Oct 9, 2023
1b701d2
Merge branch 'fix/65-stm32l0-erase'
florisla Oct 9, 2023
7a57203
Int fix, and family pass fix to Stm32Bootloader
florisla Oct 9, 2023
b890db2
doc: Add comment
florisla Oct 9, 2023
2a69700
Merge branch 'fix/64-65-parse-hex-int'
florisla Oct 9, 2023
0af1090
fix: Pass device family to Stm32Bootloader
tosmaz Jan 3, 2023
f389326
Merge branch 'fix/pass-device-family'
florisla Oct 9, 2023
43d0a00
feat: Add support for STM32WL
florisla Oct 9, 2023
402c8ca
clean(lint)
florisla Oct 9, 2023
fb4b6ed
dev: Support Python versions 3.9/3.10/3.11
florisla Oct 9, 2023
7fc0d22
doc: Update supported Python versions
florisla Oct 9, 2023
5bf8cbb
doc: Add new contributors
florisla Oct 9, 2023
13068c5
feat: Support BlueNRG-1 and BlueNRG-2
florisla Oct 9, 2023
7c21b4d
feat: Port to flit
florisla Oct 9, 2023
2e9e341
clean(lint)
florisla Oct 9, 2023
2ae257d
release: Bump version to 0.7.0
florisla Oct 9, 2023
261edec
fix: Add description
florisla Oct 9, 2023
f99d628
dev: Update list of supported Python versions
florisla Oct 9, 2023
600aa07
feat: Support uploading hex file
florisla Oct 10, 2023
22799eb
clean: Move argument parsing to separate file
florisla Oct 10, 2023
16a6f04
fix: Install intelhex for testing
florisla Oct 10, 2023
72287a9
feat: Allow to erase a specific region of the flash memory
florisla Oct 10, 2023
3d54467
fix(typo)
florisla Oct 10, 2023
ef01b69
doc: Use long-length arguments in examples
florisla Oct 10, 2023
f99cefa
doc: Describe how to erase a section of memory
florisla Oct 10, 2023
77bfa99
feat: Allow to un-protect flash from readout
florisla Oct 10, 2023
09e8ecc
clean: Avoid duplicates command keys and values
florisla Oct 10, 2023
148efdf
clean(lint)
florisla Oct 10, 2023
a26158d
dev: Port to bump-my-version
florisla Oct 11, 2023
b0aed64
release: Bump version number from v0.6.0 to v0.7.0-dev
florisla Oct 11, 2023
39cd5d4
fix: Configure H7 flash page size and data transfer size
florisla Oct 11, 2023
f2f9a5b
dev: Add 'releasenumber' part to bump config
florisla Oct 11, 2023
99c5f6a
fix: Don't erase when only address or length is known
florisla Oct 11, 2023
71eb788
fix: Use proper double quotes in __version_info__
florisla Oct 11, 2023
a709438
clean: Drop older Python releases from black
florisla Oct 11, 2023
32fef7c
release: Bump version number from v0.7.0-dev0 to v0.7.0-dev1
florisla Oct 11, 2023
8f3b830
fix: Don't rely on address every being None
florisla Oct 12, 2023
1ec7d92
doc: Recommend to use --length with --erase
florisla Oct 12, 2023
df4f1cf
release: Bump version number from v0.7.0-dev1 to v0.7.0-dev2
florisla Oct 12, 2023
03ca1fb
fix: Use correct device IDs for H7 series
florisla Oct 12, 2023
255e571
doc: Use more long-form arguments
florisla Oct 12, 2023
a93005f
dev: Use IntEnum for Reply
florisla Oct 12, 2023
eabb058
doc: Drop since-implemented things from 'Not supported'
florisla Oct 12, 2023
7880348
doc: Update release notes
florisla Oct 12, 2023
97f570c
fix(typo)
florisla Oct 12, 2023
7b34dba
clean(lint)
florisla Oct 12, 2023
252a8aa
release: Bump version number from v0.7.0-dev2 to v0.7.0
florisla Oct 12, 2023
d7addd5
doc: Describe the big bugfix of v0.7.0
florisla Oct 12, 2023
f98f476
fix: Use integer division
florisla Oct 13, 2023
f36b583
release: Bump version number from v0.7.0 to v0.7.1-dev0
florisla Oct 13, 2023
96290b7
clean: Extract method for 'range to pages' calculation
florisla Oct 18, 2023
afd83d0
fix: Print everything to stderr
florisla Oct 18, 2023
c56da3d
clean: Use long-form arguments
florisla Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[flake8]
max-line-length = 98
max-doc-length = 78
exclude =
.git,
.idea,
__pycache__,
build,
dist,
*.egg-info

# be compatible to black
# Missing trailing comma
# Whitespace before ':'
# line break before binary operator
ignore =
C812,
E203,
W503,

# Missing docstring in public function
# .next() is not a thing in Python 3
per-file-ignores =
tests/*:D103,
stm32loader/bootloader.py:B305,
61 changes: 61 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Lint

on:
- push
- pull_request

defaults:
run:
shell: bash

jobs:
black:
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./stm32loader"
flake8:
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
python-version:
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install lint dependencies
run: pip install flake8 pyserial intelhex
- name: Run flake8
run: flake8 stm32loader
pylint:
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
python-version:
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install lint dependencies
run: pip install pylint pyserial intelhex
- name: Run pylint
run: pylint stm32loader
33 changes: 33 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test

on:
- push
- pull_request

defaults:
run:
shell: bash

jobs:
pytest:
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "pypy-3.9"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: pip install tox tox-gh-actions pyserial pytest intelhex
- name: Run setup and tests as defined in tox.ini
run: tox
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build/
dist/
*.egg-info/
.tox/

__pycache__/
*.py[cod]
.nox/
16 changes: 16 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[FORMAT]
max-line-length=98

[MESSAGES CONTROL]
disable=
fixme, # TO DOs are not errors.
consider-using-f-string, # We're not on Python >= 3.6 yet.

[REPORT]
score=no

[BASIC]
good-names=
i,
e,
namespace,
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: python

matrix:
include:
# Lint using nox on native Python 3.6
- python: "3.6"
env: NOXSESSION="lint"

# Test using nox on native Python 3.5/3.6/3.7/3.8
- python: "3.5"
env: NOXSESSION="tests-3.5"
- python: "3.6"
env: NOXSESSION="tests-3.6"
- python: "3.7"
env: NOXSESSION="tests-3.7"
dist: xenial # necessary for Python 3.7
sudo: required # necessary for Python 3.7
- python: "3.8"
env: NOXSESSION="tests-3.8"
dist: xenial # necessary for Python 3.8
sudo: required # necessary for Python 3.8?

# Test using nox on non-native Python version 3.6
# (nox does not natively run on 3.4)
- python: "3.6"
env: NOXSESSION="tests-3.4"

install:
- pip install --upgrade pip setuptools nox pyserial progress
- pip install .

script: nox --session "$NOXSESSION"
58 changes: 58 additions & 0 deletions ALTERNATIVES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

# Alternative tools


## Stm32CubeProgrammer

Official cross-platform tool by ST, with GUI and CLI versions.

Supports all bootloader protocols (UART, I2C, SPI, USB DFU, CAN).
Supports OTP memory and option bytes.

https://www.st.com/en/development-tools/stm32cubeprog.html


## STM32 Flash loader demonstrator (Flasher-stm32)

Windows tool by ST.

It comes with a command-line version and source code.

https://www.st.com/en/development-tools/flasher-stm32.html


## STM32 ST-Link utility

This is replaced by Stm32CubProgrammer (see above).

https://www.st.com/en/development-tools/stsw-link004.html


## stm32flash

Open source flashing tool in C.

Supports UART and SPI, and covers many STM32 devices.
This is probably a good choice if you're looking for speed.

https://sourceforge.net/projects/stm32flash/


## ST-flash

This is open re-implementation of the ST-Link tools.

https://github.com/stlink-org/stlink st-flash


## stm32flash-lib

Java library allowing to flash STM32 microcontrollers over UART.

https://github.com/grevaillot/stm32flash-lib


## GigaDevice tools

GigaDevice offers the GD-Link Programmer to work with the GD-Link debug adapter,
and GigaDevice MCU ISP Programmer.
137 changes: 137 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@

# Changelog
What changed in which version.


## [0.7.0] - 2023-10-12

### Added
* Support ST BlueNRG-1 and BlueNRG-2 devices.
* Support ST STM32H7 series devices.
* Allow to erase specific pages of flash memory.
* Add command-line switch to protect flash against readout.
* Support Intel hex file format.
* Adopt `flit` as build system.
* Adopt `bump-my-version` as version bumper.

### Fixed
* Erasing was impossible due to --length not being supplied.

### Cleaned
* Move argument-parsing code to separate file.
* Use long-form argument names in help text and error messages.
* Use IntEnum for commands and responses.



## [0.6.0] - 2023-10-09

Yanked on 2023-10-12 due to bug when erasing. Use 0.7.0 instead.

### Added
* `#59` Continuous Integration: start running tests and linters on GitHub Actions.
* `#42` `#43` Find flash size for non-standard MCUs (F4, L0).
* Support STM32H7 series.
* Packaging: auto-generate the help output using `cog`.
* Support STM32WL.
* Support Python 3.9 - 3.11.

### Changed
* `#46` `#48` Flush the UART read buffer after MCU reset.
* Use argparse instead of optparse.
* Drop support for Python 2, 3.4 - 3.8.

### Fixed
* `#44` Support flash page size higher than 255.
* `#64` Properly parse address and length given as hexadecimal value.
* `#62` Properly pass device family argument.

### Documented
* `#13` Describe how to extend Stm32Loader.
* `#52` Describe alternative ways to execute the module.
* `#58` Add a list of similar tools.


## [0.5.1] - 2019-12-31
* `#25` Fix bug: Mass memory erase by byq77.
* `#28` Add support for STM32L4 by rdaforno.
* `#29` Add support for more STM32F0 ids by stawiski .
* `#30` Add support for STM32F3 by float32.
* `#32` Add support for STM32G0x1 by AlexKlimaj.
* `#33` More robust bootloader activation by hiviah.
* `#35` Support Python 3.8
* `#20` Add a 'read flash' example to README
* `#34` Add --version argument


## [0.5.0] - 2019-05-02
* `#17` Add support for STM32F03xx4/6 by omerk.
* Drop support for Python 3.2 and 3.3.


## [0.4.0] - 2019-04-19
* `#8`: Add support for STM32F7 mcus. By sam-bristow.
* `#9`: Support data writes smaller than 256 bytes. By NINI1988.
* `#10`: Make stm32loader useful as a library.
* `#4`: Bring back support for progress bar.
* `#12`: Allow to supply the serial port as an environment variable.
* `#11`: Support paged erase in extended (two-byte addressing) erase mode.
Note: this is not yet tested on hardware.
* Start using code linting and unit tests.
* Start using Continuous Integration (Travis CI).


## [0.3.3] - 2018-08-08
* Bugfix: write data, not [data]. By Atokulus.


## [0.3.2] - 2018-07-31
* Publish on Python Package Index.
* Make stm32loader executable as a module.
* Expose stm32loader as a console script (stm32loader.exe on Windows).


## [0.3.1] -- 2018-07-31
* Make stm32loader installable and importable as a package.
* Make write_memory faster (by Atokulus, see `#1`).


## [0.3.0] - 2018-04-27
* Add version number.
* Add this changelog.
* Improve documentation.
* Support ST BlueNRG devices (configurable parity).
* Add Wiznet W7500 / SweetPeas bootloader chip ID.
* Fix ack-related bugs in (un)protect methods.
* Add 'unprotect' command-line option.
* Read device UID.
* Read device flash size.
* Refactor __main__ functionality into methods.


## 2018-05
* Make RTS/DTR (boot0/reset) configurable (polarity, swap).


## 2018-04
* Restore Python 2 compatibility.


## 2018-03
* Add support for Python 3.
* Remove Psyco and progressbar support.
* Fix checksum calculation bug for paged erase.


## 2014-04
* Add `-g <address>` (GO command).
* Add known chip IDs.
* Implement extended erase for STM32 F2/F4.


## 2013-10
* Add Windows compatibility.


## 2009-04
* Add GPL license.
Loading