My mother car) Based on gyroscooter with stm32 f103 controller
Original repository: https://github.com/EFeru/hoverboard-firmware-hack-FOC
./watch_run.sh
st-flash --reset write build/hover.bin 0x08000000
sudo apt-get install git make cmake libusb-1.0-0-dev gcc build-essential inotify-tools
in install_files you can find tar for linux
tar -jxf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
move unzipped folder to /opt/gcc-arm-none-eabi-10.3-2021.10
add this line to the end of [~/.bashrc] file
export PATH="/opt/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH"
relaunch terminal and check version:
arm-none-eabi-gcc --version
make
Original page here:
https://freeelectron.ro/installing-st-link-v2-to-flash-stm32-targets-on-linux/
download and build the ST-Link utilities:
cd ~/
mkdir stm32
cd stm32
git clone https://github.com/stlink-org/stlink
cd stlink
cmake .
make
Now we copy the built binaries to their place:
cd bin
sudo cp st-* /usr/local/bin
cd ../lib
sudo cp *.so* /lib32
then udev rules:
sudo cp stlink/config/udev/rules.d/49-stlinkv* /etc/udev/rules.d/
Now, plug the ST-Link device into the USB port, but DON’T CONNECT the target board, then type:
lsusb
st-info --probe
st-flash read dummy.bin 0 0xFFFF
If all ok - try upload firmware:
make
st-flash --reset write build/f1033.bin 0x08000000
st-flash --flash=256k erase 0x08000000 2048