I have created a guide for Mac-users to install new firmware, maybe helpful for some. (It should be easy to adapt to Linux as well)
Get firmware file
+ Download GTM32.hex file into Downloads folder
Install myhex2bin ->
+ Download to Downloads folder
+ Double-click package to unpack
Install python3.5
https://www.python.org/downloads/mac-osx/
+ Download and install package
Install libusb
https://github.com/libusb/libusb
+ Click «Download ZIP» to download to Downloads folder
+ Double-click package to unpack
+ Terminal:
Code: Select all
cd ~/Downloads/libusb-master
./configure; make; sudo make install
Install pyusb
https://github.com/walac/pyusb
+ Click «Download ZIP» to download to Downloads folder
+ Double-click package to unpack
+ Terminal:
Code: Select all
cd ~/Downloads/pyusb-master
python3 setup.py install
Install pystlink
https://github.com/pavelrevak/pystlink
+ Click «Download ZIP» to download to Downloads folder
+ Double-click package to unpack
+ Terminal:
+ Connect ST-Link/2 to mac and printer
+ Terminal:
+ Check CPU, should be STM32F103xE
+ Terminal:
Code: Select all
python3 pystlink.py -v -c STM32F103xE
|Optional but recommended, upgrade ST-LINK
http://www.st.com/web/en/catalog/tools/PF258194
|+ Download tool
|+ Install Java JDK if required
|+ Disconnect ST-LINK/2 from printer and mac, reconnect only to mac
|+ Run upgrade tool
|+ Disconnect ST-LINK/2 from mac, reconnect to mac and printer
Convert hex to bin and flash
+ Please change filename to downloaded firmware file:
Terminal:
Code: Select all
~/Downloads/myhex2bin ~/Downloads/GTM32_V1.0.5.hex
python3 pystlink.py -v -c STM32F103xE flash:erase:verify:0x08000000:../GTM32_V1.0.5.bin
Done!