JetBrains / intellij-micropython

Plugin for MicroPython devices in PyCharm and IntelliJ
https://plugins.jetbrains.com/plugin/9777-micropython
Apache License 2.0
514 stars 107 forks source link

Upload to ESP32 failed #145

Open dmp2tech opened 3 years ago

dmp2tech commented 3 years ago

Hello, I have a problem uploading to my ESP32. When I try to upload with pycharm I have an error: ampy.pyboard.PyboardError: could not enter raw repl So I tried to upload directly from the terminal without a virtual environment. And it works. So I logged into the virtual environment, updated ampy to version 1.1.1 and was able to upload it from the terminal. On the other hand, I cannot upload with pycharm because it wants to update version 1.0.5. How do I get the extension to accept version 1.1.1 of ampy. I'm on big macos on.

Arcadia197 commented 3 years ago

Have you tried to change File -> Settings -> Languages&Frameworks -> MicroPython -> Device type to esp8266 in PyCharm?

As ampy is giving a pyboard error maybe you have forgotten to set this.

While esp32 is not directly supported it should work for most cases with the esp8266 settings (atleast it does for me) Just watch out if you want to include folder structures - this did not work for me

lensvol commented 3 years ago

This can be related to the issue solved here: https://github.com/vlasovskikh/intellij-micropython/pull/142

You can try to increase hardcoded delay on the following line and see if it helps: https://github.com/vlasovskikh/intellij-micropython/blob/0322fb7c50bed3e196ee253fbb0f613344a56a48/scripts/microupload.py#L121

Path to microupload.py can be found in the Terminal window that appears when you try to upload files.

kpostekk commented 3 years ago

You can try to increase hardcoded delay on the following line and see if it helps

Solution by @lensvol has worked for me. I have changed value from 0.5 to 2.5 and it works.

Zrzut ekranu 2021-05-26 o 21 48 18Zrzut ekranu 2021-05-26 o 21 47 38

You can open file by following command code "~/Library/Application Support/JetBrains/PyCharm2021.1/plugins/intellij-micropython/scripts/microupload.py"

jwoolaway commented 3 years ago

Running: OSx 11.5.2 PyCharm 2021.2 V 11.0.11+9-b1504.13 x86_64 Plug-in MicroPython 1.2 The described edit to: "/Users/<USER_NAME>/Library/Application Support/JetBrains/PyCharm2021.2/plugins/intellij-micropython/scripts/microupload.py" Fixed it.

jadn123 commented 2 years ago

Fix works for me as well. Can this be considered being fixed in a PR?

edwinm commented 2 years ago

It's August 21st 2022 and I still had to use this hack to get my file uploading to work.

I'm using a five days old build.

PyCharm 2022.2.1 (Community Edition) Build #PC-222.3739.56, built on August 16, 2022

Dear JetBrains, please fix this.

Elizaveta239 commented 2 years ago

Hi! We'll try to include it in the next update.

DansDesigns commented 2 years ago

Running: OSx 11.5.2 PyCharm 2021.2 V 11.0.11+9-b1504.13 x86_64 Plug-in MicroPython 1.2 The described edit to: "/Users/<USER_NAME>/Library/Application Support/JetBrains/PyCharm2021.2/plugins/intellij-micropython/scripts/microupload.py" Fixed it.

I just tried editing this file on Windows (Program Files\JetBrains\PyCharm.....\ etc) but there is no plugins\intellij-micropython\ folder.. I have downloaded the MicroPython Plugin from the Plugin Store, am I missing something?!

kpostekk commented 2 years ago

Have you checked app data folder?

DansDesigns commented 2 years ago

Have you checked app data folder?

ah Thank you i didnt think of checking there... In Users\AppData\JetBrains\ ...\plugins\ there is only intellij-micropython.zip in the plugins folder, should I extract it to the Program Files\JetBrains\ ...\plugins\ folder?

LouisCAD commented 2 years ago

@Elizaveta239 When will the next update be?

jaylinwylie commented 8 months ago

Are we still to do this hack? Kind of baffling that the ESP32 isnt already in the list.

ygorgasparin commented 2 months ago

Here works as well