My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

Open source flash program for the STM32 ARM processors using the ST bootloader.

For those looking for how to use this tool, or how to use the STM32 under Linux, see http://stm32.spacevs.com/

Update: Windows support has been added thanks to Gareth McMullin

I would love to know if you found this tool useful

Features

  • device identification
  • write to flash/ram
  • read from flash/ram
  • auto-detect Intel HEX or raw binary input format with option to force binary
  • flash from binary file
  • save flash to binary file
  • verify & retry up to N times on failed writes
  • start execution at specified address
  • software reset the device when finished if -g not specified
  • resume already initialized connection (for when reset fails)

Usage

Usage: ./stm32flash [-bvngfhc] [-[rw] filename] /dev/ttyS0
	-b rate		Baud rate (default 57600)
	-r filename	Read flash to file
	-w filename	Write flash to file
	-u		Disable the flash write-protection
	-e n		Only erase n pages before writing the flash
	-v		Verify writes
	-n count	Retry failed writes up to count times (default 10)
	-g address	Start execution at specified address (0 = flash start)
	-s start_page	Flash at specified page (0 = flash start)
	-f		Force binary parser
	-h		Show this help
	-c		Resume the connection (don't send initial INIT)
			*Baud rate must be kept the same as the first init*
			This is useful if the reset fails

Examples:
	Get device information:
		./stm32flash /dev/ttyS0

	Write with verify and then start execution:
		./stm32flash -w filename -v -g 0x0 /dev/ttyS0

	Read flash to file:
		./stm32flash -r filename /dev/ttyS0

	Start execution:
		./stm32flash -g 0x0 /dev/ttyS0
Powered by Google Project Hosting