Commit graph

16 commits

Author SHA1 Message Date
Marti Bolivar f2aaed8818 stm32loader.py: replace obsolete exception catch syntax.
For Python 3 support.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-08-10 17:20:39 -04:00
Marti Bolivar 2c1c5bfe6e stm32loader.py: Cosmetics.
Move the actual QUIET setting to above mdebug(); that was
confusing. Rename _wait_for_ask to _wait_for_ack.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 18:41:46 -04:00
Marti Bolivar 1631f8797d stm32loader.py: Updates for F2 and F4.
Support the extended erase memory command, which replaced the erase
memory command in the bootloader protocol as of version 3.0. This
takes a long time, so tweak _wait_for_ask to take an extra timeout for
special cases like this.

Use this under if __name__ == '__main__' to support F2 and
F4. Additionally, produce a human-readable report of the target chip
from its chip ID.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 18:35:21 -04:00
Marti Bolivar d60473d362 stm32loader.py: Improve error message on failed init.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 17:51:44 -04:00
Marti Bolivar 69f24a0d31 stm32loader.py: Use new-style classes.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 17:05:45 -04:00
Marti Bolivar a79304635a stm32loader.py: Don't use Psyco.
This script is I/O bound.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 16:59:46 -04:00
Marti Bolivar a158aa604e stm32loader.py: Use print function.
Towards py3k compatibility.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 16:59:14 -04:00
Marti Bolivar 29a69c2423 stm32loader.py: Remove unused code.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-07-24 16:53:40 -04:00
Marti Bolivar 27b40a52de stm32loader.py prints more information about what it's doing. 2011-04-08 18:58:58 -04:00
Marti Bolivar 12914284f5 Merge branch 'nzmichaelh-master' into master.
This provides DMA, IWDG, PWR, and BKP support, and fixes several bugs.

Conflicts:
	libmaple/adc.h
	libmaple/libmaple.h
	libmaple/ring_buffer.h
2011-02-16 01:17:21 -05:00
Michael Hope 0fcccd921e Added support for programming ELF files without converting first. 2010-09-29 20:28:39 +13:00
Michael Hope d470dc6daa Do basic validation on the boot version and chip IDs. 2010-09-29 20:21:52 +13:00
Michael Hope 97f6b77b58 Make the initial chip detection much more robust. 2010-09-29 20:20:32 +13:00
Michael Hope 3b48e21018 Changed the exception handling so that Ctrl-C passes through and isn't treated as a timeout. 2010-09-29 20:06:51 +13:00
Michael Hope 1169dc6e3b Added auto detection of the USB to serial port under Linux and MacOS. 2010-09-29 20:01:10 +13:00
bnewbold 2c2812b620 added stm32loader.py upload script 2010-08-31 17:45:26 -04:00