-
Notifications
You must be signed in to change notification settings - Fork 122
BurnFirmware
Bogdan Bogush edited this page Apr 18, 2021
·
1 revision
The STM32 MCU firmware can be burned using ST-Link or USB-UART adapter. Programming via USB is not supported on STM32F103.
The device firmware is burned using ST-Link V2.
ST-Link is connected to the board's SWD pins as shown below.
Brand-new MCU may require to be powered on with connected BOOT0 pins and sometimes additionally with RST pins (available in new PCB).
After programming BOOT0 and RST pins must be unconnected.
- sudo apt-get install libusb-1.0-0-dev
- git clone https://github.com/texane/stlink.git
- cd stlink/
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- sudo make install
- sudo cp ../etc/udev/rules.d/* /etc/udev/rules.d/
- sudo udevadm control --reload-rules
- sudo udevadm trigger
- Connect ST-Link to board.
- Download firmware from Google Driver release directory.
- st-flash write nando_fw.bin 0x8000000
- Download and install STM32CubeProgrammer from https://www.st.com or Google Driver tools directory.
- Download firmware from Google Driver release directory.
- Write firmware using STM32CubeProgrammer programmer.
- Download and install STM32CubeProgrammer from https://www.st.com or Google Driver tools directory.
- Download firmware from Google Driver release directory.
- Write firmware using STM32CubeProgrammer programmer. On Linux permission for /dev/ttyUSBx must be granted (sudo chmod 777 /dev/ttyUSB0).