Problem uploading program into STC89C52RC board

Hello,

I was trying to set up my computer to run some program on a STC89C52RC board, but something strange happed when I uploading the program. When I use Platform IO to upload the program, it will proceed to "Cycling power: done“ and my board shut down before I do anything. The word “done” appeared with “Cycling Power:”. At this step the power button won’t do anything when I press it. And the board will when back to normal when I stop the program manually in Platform IO or I disconnect and reconnect the USB cable.

But the same thing won’t happed when I use terminal to upload the program, the word “done” won’t pop up before I restart the board, and the program will run on the board with no issue. Can anyone help me with the problem?

Attached is an example of where I get stuck with the program:

> Executing task: platformio run --target upload <

Processing stc89c52rc (platform: intel_mcs51; board: stc89c52rc)
----------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/intel_mcs51/stc89c52rc.html
PLATFORM: Intel MCS-51 (8051) (1.2.3) > Generic STC89C52RC
HARDWARE: STC89C52RC 11MHz, 512B RAM, 8KB Flash
PACKAGES: 
 - tool-stcgal 1.104.0 (1.4) 
 - toolchain-sdcc 1.30804.10766 (3.8.4)
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/stc89c52rc/firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Flash: [          ]   2.8% (used 230 bytes from 8192 bytes)
Configuring upload protocol...
AVAILABLE: stcgal
CURRENT: upload_protocol = stcgal
Looking for upload port...
Use manually specified: /dev/tty.wchusbserial14610
Uploading .pio/build/stc89c52rc/firmware.hex
Cycling power: done

Strange, I don’t really have an idea of what’s going on… Possible timing issues?

You should file a bug at Issues · platformio/platform-intel_mcs51 · GitHub to get help from the developers.