STM32 and Linux

The STM32F103c8t6 based blue-pill is a bargain, but the learning-curve is steeper compared to Arduino, so here is what I did

Install HID-bootloader

The boards from china comes with a serial bootloader, so you need either a USB-serial-port, or an ST-Link to program it, so the first thing we will have to do is install an USB bootloader.  There are plenty of guides available, but most is focusing on Windows, I don’t currently have a Windows computer, so here is what I use and do

st-flash --reset write stm32-tkg-hid-bootloader/F1/bootloader_only_binaries/tkg_hid_ 0x8000000
cd stm32-tkg-hid-bootloader/cli
make -f Makefile.linux
sudo install binaries_dist/tkg-flash /usr/local/bin
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="beba", GROUP="plugdev", MODE:="0666"' \
 | sudo dd of=/etc/udev/rules.d/49-bluepill.rules
sudo udevadm control --reload-rules
# Now plug-in the Blue-Pill
tkg-flash -info

DONE

This entry was posted in Arduino, Embedded, Hardware. Bookmark the permalink.