Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official ESP32 Support #44

Open
kaybee335 opened this issue Feb 4, 2018 · 15 comments

Comments

@kaybee335
Copy link
Contributor

commented Feb 4, 2018

@vlasovskikh - Can the ESP32 be declared as officially supported now? There is now a huge ESP32 success sample space of at least 2 users :-)

I suggest that it be identified as a separate board/device type (ESP32) in the Frameworks menu as I suspect in the future there may be differences between the two that matter to the plugin (OTA/wireless support looks like it could be one of these areas from my early investigation).

In addition, I would like to suggest that the board/device type be passed as an optional parameter to the python scripts (possibly something like --devtype ESP8266 on the command line. We currently have ESP8266, Micro:bit and Pyboard). If not specified, it would default to None.

This would allow conditional execution of the couple of delay() statements in the scripts that are commented as being ESP8266 specific.

I also have a feeling that this may help in the area of Micro:bit support although I have not explored that yet. I plan on looking at the scripts in #40 today to see how/if they would fit into the existing scripting framework if you are not already doing so. I dug out my Micro:bit so I should be able to check things out pretty readily.

I would be happy to take care of the python side of the new option as part of the docopt update. It could be implemented initially with no 'behaviour' based on the option if you prefer. I am not comfortable enough with my weak, weak abilities to read kotlin to take care of the kotlin side of this so I would have to coordinate with you on the activity.

I know you are handling some of the board specifics in the kotlin code (i.e. defining vendor_id:port_id's to scan in order to detect serial ports) but it may be worth considering pushing all of this down to the python layer and creating an abstract devboard class in python that is then used to create concrete classes for the various board types. The class interface would be optimised for plugin operations such as uploading a file to the device, removing files, accessing the REPL, etc.

Just some thoughts for consideration, I recognise that I am much more comfortable in python so I could be trying to use my hammer in places it isn't wanted :-) Please feel free to tell me to butt out on this one.

@vlasovskikh vlasovskikh self-assigned this Feb 10, 2018
@vlasovskikh vlasovskikh changed the title 'Official' ESP32 Support? Official ESP32 Support Feb 10, 2018
@vlasovskikh

This comment has been minimized.

Copy link
Owner

commented Feb 10, 2018

@kaybee335 I still want to get my hands on a ESP32 board so I'll be able to investigate any possible issues before adding it as a device type. Meanwhile feel free to add more comments about the specifics of ESP32.

@kaybee335

This comment has been minimized.

Copy link
Contributor Author

commented Feb 11, 2018

@vlasovskikh - sure, understood. I gave not hit any differences so far between ESP8266 and ESP32 that directly impact the plugin in its current state. I do not believe this will remain true if a means of providing OTA/WiFi is added as an enhancement. So far, I have found no common ground between the two in terms of supporting this (webREPL is 8266 only, etc.). The other area of difference I have been bitten by is the removal the the _thread module from ESP8266 but this does not apply to the plugin.

If you are looking for recommendations on ESP32 boards, I am very happy with my Adafruit Feather ESP32 board. It seems to have the right blend of built-on stuff and accessible IO for most of things I do, certainly at the prototyping stage. The fact that I also have a couple of FeatherWings (OLED, GPS, relay) makes working with these quick and easy to check ideas out.

Another possibility would be the WiPy family of boards. I have a WiPy 2.0 and it is nice board although you really want to get the Expansion (or other) board that provides the USB/UART in order to program it easily (the other option is an external USB/UART and some microswitches for the programming IO lines).
It has a specific micropython firmware image so it would likely require board specific typehinting work as well.

If you are looking for something cheaper, the Geekcreit boards on Banggood seem to get pretty solid reviews. You would use the ESP32 daily build of micropython on these like the Adafruit board. I have a couple on order but they are literally on the slow boat from China :-) Note that if you are planning on using the deep sleep capabilities you want to make sure the ESP32 module has the updated device module on it otherwise some external circuitry is required.

https://www.banggood.com/ESP32-DevKit-ESP32-WiFiBluetooth-Development-Board-ESP-WROOM-32-Dual-Cores-Board-p-1138249.html

I also have a pyboard 1.1 on order so I should be able to help out on that side of things shortly as well.

@gaitskell

This comment has been minimized.

Copy link

commented Feb 11, 2018

Thank you for pushing on with explicit ESP32 support. This micro controller is a really useful device with strong/flexible communications and extended ADC/DAC support. (I'm using Adafruit ESP32 Feather boards.)

@iascchen

This comment has been minimized.

Copy link

commented Mar 2, 2018

I am trying to use esp32 in pycharm. and wish this feature can be added. thx.

@ghost

This comment has been minimized.

Copy link

commented Apr 10, 2018

atm we have two projects of micropython:
-official from micropython.org
-fork from micropython.org to https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/
last one is better by many things.
i`m using second firmware and after softreset by pycharm device not answering at all.

@greenoid

This comment has been minimized.

Copy link

commented Apr 25, 2018

I would like to use my generic ESP32 board (Wemos Lolin32) with PyCharm, Micropython plugin and the fork from https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/
I'll give it a try and see where the problems are.

@SensorsIot

This comment has been minimized.

Copy link

commented May 1, 2018

I also use the psRAM version on an ESP32. I get REPL, on COM64 but cannot run a program:
D:\Dropbox\MicroPython\Project1\venv\Scripts\python.exe C:\Users\andre.PyCharmCE2018.1\config\plugins\intellij-micropython/scripts/microupload.py -C D:/Dropbox/MicroPython/Project1 -v COM64 D:/Dropbox/MicroPython/Project1/boot.py
Connecting to COM64
Traceback (most recent call last):
File "C:\Users\andre.PyCharmCE2018.1\config\plugins\intellij-micropython/scripts/microupload.py", line 138, in
main(sys.argv[1:])
File "C:\Users\andre.PyCharmCE2018.1\config\plugins\intellij-micropython/scripts/microupload.py", line 56, in main
board = Pyboard(port)
File "D:\Dropbox\MicroPython\Project1\venv\lib\site-packages\ampy\pyboard.py", line 147, in init
raise PyboardError('failed to access ' + device)
ampy.pyboard.PyboardError: failed to access COM64

Ampy works at the command prompt. It seems that REPL blocks the Serial connection.
What is my mistake?

@MiLeG

This comment has been minimized.

Copy link

commented Aug 19, 2018

@SensorsIot I believe you did not close the REPL prompt before you uploaded. Serial programmers can't do their job while the port is busy. It's the same with Arduino and other serial communication.

@tcinbis

This comment has been minimized.

Copy link

commented Oct 3, 2018

Would be great to see the ESP32 as a feature in the future.

@Kortenbach

This comment has been minimized.

Copy link

commented Nov 21, 2018

ampy.pyboard.PyboardError: failed to access COM64
Ampy works at the command prompt. It seems that REPL blocks the Serial connection.
What is my mistake?

You can look at issue "LED blink example #72" for this.
I found that running Pycharm in elevated mode sometimes does the trick as well...

@junhuanchen

This comment has been minimized.

Copy link

commented Nov 22, 2018

support esp 8266 or 32 in mpfshell. you can try it. https://github.com/junhuanchen/intellij-mpfshell

@Kortenbach

This comment has been minimized.

Copy link

commented Dec 15, 2018

@junhuanchen : Could you please include a Readme.md file for your mpfshell?

@IainColledge

This comment has been minimized.

Copy link

commented Mar 12, 2019

I'm using this plugin with the NodeMCU ESP-32S and also with the WIFI KIT 32, no problems apart from REPL on Windows 10 is useless as is the ESP8266. Tiny Term is the workaround.

@x79133000

This comment has been minimized.

Copy link

commented Aug 16, 2019

Any news on the official ESP32 support yet?

@vlasovskikh

This comment has been minimized.

Copy link
Owner

commented Aug 19, 2019

I still haven't got a ESP32 device to test it. Looking for contributors who can support ESP32 and fix possible bugs in this area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.