Hi Mac people, you’re welcome to try this out and let us know if you run into any issues!
Mac OS: Upgrade MCU Firmware for Tone2 Pro
#make the tone_upgrade directory and cd into it
mkdir tone_upgrade
cd tone_upgrade
#install homebrew for mac os
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#install supporting packages
brew install libusb make automake mk-configure install-sh libtool pkg-config wget
echo 'export PATH="/usr/local/opt/m4/bin:$PATH"' >> ~/.zshrc
#clone into the libusb package and install it
git clone https://github.com/libusb/libusb.git
cd libusb
./autogen.sh
./configure
make
make install
cd ..
pkg-config --libs libusb-1.0
#clone into the stm8flash tool and build it
git clone https://github.com/vdudouyt/stm8flash.git
make -C stm8flash
#download new mcu firmware for tone2 pro
wget https://dl.khadas.com/Hardware/Tone2/MCU/Tone2_Pro_MCU_Firmware_210417.zip
unzip *.zip
#flash new firmware into the tone2 pro mcu
./stm8flash/stm8flash -cstlinkv2 -pstm8s003\?3 -s flash \
-w Tone2_Pro_MCU_Firmware_210417/Tone2_Pro_MCU_BOOT_APP_210417.hex
Example of a successful output:
tone_upgrade % ./stm8flash/stm8flash -cstlinkv2 -pstm8s003\?3 -s flash \
-w Tone2_Pro_MCU_Firmware_210417/Tone2_Pro_MCU_BOOT_APP_210417.hex
Determine FLASH area
Due to its file extension (or lack thereof), "Tone2_Pro_MCU_Firmware_210417/Tone2_Pro_MCU_BOOT_APP_210417.hex" is considered as INTEL HEX format!
8192 bytes at 0x8000... OK
Bytes written: 8192
Upgrade is DONE!