Jump to content

STM32

From base48
Revision as of 18:31, 29 September 2016 by imported>Rmarko (initial)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

STM32 programming

Boot mode configuration

BOOT0 BOOT1 Boot mode                              Address
  x     0   Main Flash memory                      0x8000000
  0     1   System memory (built-in bootloader)    0x1FFFB000
  1     1   Embedded SRAM                          0x20000000

  in Main flash memory and System memory boot modes address is aliased to 0x0

Legend

o o o BOOT1
o o o BOOT0
---

Boot to bootloader

R

Boot to main flash

R


Flashing

  • Flashing is done via USART1 (A9 TX A10 RX)

Converting Elf to Bin

Required if you only have elf files produced by your toolchain - stm32flash accepts only *.bin files.


arm-none-eabi-objcopy -O binary miniblink.elf miniblink.bin

Using stm32flash

Test connection with


stm32flash /dev/ttyUSB0

Flash and run from 0x0


stm32flash /dev/ttyUSB0 -w miniblink.bin -g 0x0

Pinout