如何使用 stcgal 烧录 STC8G1K08A
使用 stcgal,你可以通过以下命令安装:
install_stcgal.sh
pip install stcgal然后使用以下命令烧录 STC8G1K08A:
flash_stc8g.sh
stcgal -P stc8g -p /dev/ttyUSB0 -t 6000 myfirmware.hex已在 stcgal 1.10(pip 发布版)上测试通过。
示例输出:
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
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow