I checked the script again and it has issues with libusb installation. This problem can be solved simply. This error message was not found through your log files. You may have solved it.
The SWIM connection seem doesn’t right. I need your help to take a picture of the detailed connection diagram for me to see. When taking the picture, be careful to take a picture of the electrical network signal to facilitate troubleshooting.
Another possibility is that when updating the firmware, the connection is unstable. You could try to slightly press the pin header connection with your hands to allow the electrical signals to fully contact.
[khadas@khadass-MacBook-Air ~ % /bin/bash -c "$(curl -fsSL https://dl.khadas.com/products/tone2/firmware/tone2_pro/mcu/upgrade_mcu.sh)"
[i] Tone Board MCU upgrade (online script) - PRESS ANY KEY or Escape by Ctrl+C
/opt/homebrew/bin/brew
Warning: git 2.43.0 is already installed and up-to-date.
To reinstall 2.43.0, run:
brew reinstall git
Warning: libusb 1.0.26 is already installed and up-to-date.
To reinstall 1.0.26, run:
brew reinstall libusb
Warning: make 4.4.1 is already installed and up-to-date.
To reinstall 4.4.1, run:
brew reinstall make
Warning: automake 1.16.5 is already installed and up-to-date.
To reinstall 1.16.5, run:
brew reinstall automake
Warning: mk-configure 0.38.3 is already installed and up-to-date.
To reinstall 0.38.3, run:
brew reinstall mk-configure
Warning: libtool 2.4.7 is already installed and up-to-date.
To reinstall 2.4.7, run:
brew reinstall libtool
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
brew reinstall pkg-config
Warning: wget 1.21.4 is already installed and up-to-date.
To reinstall 1.21.4, run:
brew reinstall wget
-I/opt/homebrew/Cellar/libusb/1.0.26/include/libusb-1.0
[i] please connect your ST-Link paired with Tone Board and PRESS ANY KEY
Determine FLASH area
STLink: v2, JTAG: v24, SWIM: v4, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "tone2pro-mcu-boot-app-v1.4-221128.hex" is considered as INTEL HEX format!
8192 bytes at 0x8000... OK
Bytes written: 8192
[i] MCU Upgrade Complete!