grigorig / stcgal

Open Source STC MCU ISP flash tool
642 stars 135 forks source link

upload stc15f104e error #106

Open be-engineer opened 3 weeks ago

be-engineer commented 3 weeks ago

When I flashing stc15f104e with stcgal in platformio ,I got some error message as below,I use vscode in debian. what can I do

Processing STC15F104E (platform: intel_mcs51; board: STC15F104E)
--------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/intel_mcs51/STC15F104E.html
PLATFORM: Intel MCS-51 (8051) (2.2.0) > Generic STC15F104E
HARDWARE: STC15F104E 11MHz, 128B RAM, 4KB Flash
PACKAGES: 
 - tool-stcgal @ 1.110.0 (1.10) 
 - tool-vnproch55x @ 1.0.220407 
 - toolchain-sdcc @ 1.40100.12072 (4.1.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio/build/STC15F104E/firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Flash: [======    ]  62.9% (used 2578 bytes from 4096 bytes)
Configuring upload protocol...
AVAILABLE: stcgal
CURRENT: upload_protocol = stcgal
Looking for upload port...
Using manually specified: /dev/ttyCH341USB0
Uploading .pio/build/STC15F104E/firmware.hex
Waiting for MCU, please cycle power: done
Target model:
  Name: STC15F104E
  Magic: F294
  Code flash: 4.0 KB
  EEPROM flash: 1.0 KB
Target frequency: 3020.615 MHz
Target BSL version: 6.7.12Q
Target wakeup frequency: 1.460 KHz
Target options:
  reset_pin_enabled=True
  clock_source=internal
  clock_gain=low
  watchdog_por_enabled=True
  watchdog_stop_idle=True
  watchdog_prescale=64
  low_voltage_reset=True
  low_voltage_threshold=3
  eeprom_lvd_inhibit=True
  eeprom_erase_enabled=False
  bsl_pindetect_enabled=False
  por_reset_delay=short
  rstout_por_state=low
  uart2_passthrough=False
  uart2_pin_mode=normal
  cpu_core_voltage=unknown
Loading flash: 2578 bytes (Intel HEX)
Serial port error: pulse timeout
*** [upload] Error 1
be-engineer commented 3 weeks ago

platformio.ini file is:

[env:STC15F104E]
platform = intel_mcs51
board = STC15F104E
upload_speed = 19200
upload_port=/dev/ttyCH341USB0
upload_flags = 
    ;设置默认频率
    -t6000
    -b$UPLOAD_SPEED
    -Pstc15
    -p$UPLOAD_PORT