Updated on 2019-11-29

python -m pip install --index-url=https://mirrors.aliyun.com/pypi/simple/ --upgrade platformio esptool
esptool erase_flash

pio update

pio run --target clean
pio run --target erase
pio run --target upload --target monitor

pio check

pio device list
pio device monitor --baud 115200

Reference