dphans / micropython-ide-vscode

Micropython integrated development for VSCode
Apache License 2.0
57 stars 35 forks source link

Can not flash firmware or upload files on flashed MCU. #16

Open j3den opened 5 years ago

j3den commented 5 years ago

Hello. Fantastic plugin. Works well with a NodeMCU board well. Running on linux (Ubuntu Bionic) -> esptool.py v2.6 I have made a prototype PCB using the MCP2221 USB-UART bridge IC. It flashes fine when running the esptool command below from the terminal: esptool.py --port /dev/ttyACM0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20190529-v1.11.bin Here is the output in terminal:


Serial port /dev/ttyACM0
Connecting........_____....._____....._____....._____....._____.....__
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:ee:1b:fa
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 617880 bytes to 402086...
Wrote 617880 bytes (402086 compressed) at 0x00000000 in 19.2 seconds (effective 257.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Using the plugin, the firmware doesn't upload or when the firmware is already loaded, files are not "formatted" and the project uploaded.

The MCP2221 does not have an RTS/DTS pin(s) like the CP2102 (found on the NodeMCU) which means manually resetting the device. Maybe this is some cause of the issue?

Is there a possibility of a plugin where the user can place the ESP8266 in to program mode and the plugin then erases the files and uploads the project without the RTS?