The stm32l4 loader expects a count of 32 bits words while its granularity is
really 64 bits.
This patch fixes this to simplify count calculation in run_flash_loader().
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
All the loaders returns remaining work count in r2, except stm32l0/1.
Make these loaders behaving as the others to simplify run_flash_loader() code.
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
This patch invert source and destination registers in the stm32l0 and stm32l1
loaders, so that it follows the same ABI as other stm32 loaders.
Doing that, the run_flash_loader() function can be simplified a little.
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Per ST doc DM00035129.pdf "DocID022063 Rev 5", the STM32F415xx data sheet,
table 40 on page 110 of the PDF, 32-bit program operation is only possible
above 2.7 Volts.
In order to support programming on devices running at lower voltages, this
commit adds an 8-bit programming mode and the necessary tests to enable it
when the reported voltage is below 2.7 Volts.
The indentation of various st-link source files is highly inconsistent.
Reindent all source files to 4 space indentions for consistency.
I went with 4 space indentations, as it was the most common style.