Comment flasher le STC8G1K08A avec stcgal

En utilisant stcgal, que vous pouvez installer avec

install_stcgal.sh
pip install stcgal

vous pouvez flasher le STC8G1K08A avec la commande suivante :

flash_stc8g.sh
stcgal -P stc8g -p /dev/ttyUSB0 -t 6000 myfirmware.hex

Testé avec stcgal 1.10 (version pip).

Exemple de sortie :

stcgal_output.txt
Waiting for MCU, please cycle power: done
Target model:
  Name: STC8G1K08A-8PIN
  Magic: F794
  Code flash: 8.0 KB
  EEPROM flash: 4.0 KB
Target frequency: 5.994 MHz
Target BSL version: 7.3.13U
Target wakeup frequency: 35.150 KHz
Target ref. voltage: 1195 mV
Target mfg. date: 2025-06-13
Target options:
  reset_pin_enabled=False
  clock_gain=high
  watchdog_por_enabled=False
  watchdog_stop_idle=True
  watchdog_prescale=64
  low_voltage_reset=False
  low_voltage_threshold=2
  eeprom_erase_enabled=True
  bsl_pindetect_enabled=False
  por_reset_delay=long
  rstout_por_state=high
  uart1_remap=False
  uart2_passthrough=True
  uart2_pin_mode=push-pull
  epwm_open_drain=True
  program_eeprom_split=8192
Loading flash: 2135 bytes (Intel HEX)
Target frequency: Target 6.000 MHz
Adjusted frequency: 5.997 MHz(-0.053%)
Switching to 115200 baud: done
Erasing flash: done
Writing flash: 2624 Bytes [00:00, 5299.67 Bytes/s]                                                                                                                                                                                          
Finishing write: done
Setting options: done
Target UID: F794C5251C85D0
Disconnected!

Check out similar posts by category: STC8