步驟如下:
$ cd $ git clone https://github.com/vdudouyt/stm8flash.git $ vim Makefile +69 install: #mkdir -p $(DESTDIR)/usr/local/bin/ #cp $(BIN)$(BIN_SUFFIX) $(DESTDIR)/usr/local/bin/ mkdir -p $(PREFIX)/bin/ cp $(BIN)$(BIN_SUFFIX) $(PREFIX)/bin/ $ make $ make install $ stm8flash Usage: stm8flash [-c programmer] [-p partno] [-s memtype] [-b bytes] [-r|-w|-v] Options: -? Display this help -c programmer Specify programmer used (stlink, stlinkv2 or espstlink) -d port Specify the serial device for espstlink (default: /dev/ttyUSB0) -p partno Specify STM8 device -l List supported STM8 devices -s memtype Specify memory type (flash, eeprom, ram, opt or explicit address) -b bytes Specify number of bytes -r Read data from device to file -w Write data from file to device -v Verify data in device against file -V Print Date(YearMonthDay-Version) and Version format is IE: 20171204-1.0 -u Unlock. Reset option bytes to factory default to remove write protection.