ESP32 MPY-Jama, an excellent IDE for using Python on ESP32

I’ve had a longish break from using Python on ESP32. I’ve been busy working on projects using the Arduino IDE and the dialect of C it uses, and one of the reasons for preferring Arduino over Visual Code is that getting VSCode to run Pymakr with non-Pycom ESP32s has proven to be a major pain. For example, Pymakr gives errors on using libraries such as machine which is internal to MicroPython and should not be a cause of any issues.

Just the other day I went hunting for alternative IDEs. The one I used before, uPyCraft, is still on the Net, but updated last six years ago, and my Windows doesn’t want to touch it with a barge pole. Somewhere on Reddit I came across the Github page for ESP32 MPY-Jama and that appears to be the answer to my prayers.

Install it, and you see this screen:

Installation finished

All that remains is to plug in an ESP32. This IDE even has automatic port detection for locating the ESP32. It doesn’t matter if it is brand new or has Arduino IDE code on it, because once you are connected, you can click Firmware Tools, and it will let you erase the flash memory or upload firmware image:

Firmware tools

This in itself is sufficient cause to use this IDE on your ESP32, because after you go download the latest image for MicroPython ESP32, all you need to do is click on Upload firmware image, select your downloaded .bin file, and let Jama prepare your MicroPython installation on the chip. A major improvement over VSCode and all other systems I have tried to do this with, and you don’t have to to any of the old voodoo-like magic commands:

esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x1000 esp32-20190125-v1.10.bin

Your chip is now ready for coding, so head to the Code editor tab, and start writing your program. If you need libraries, just use the Upload button to get any necessary files, and put them either in the /root or in the /root/lib folders:

Lovely clean interface

After you click on the Connect device button, you can either let Jama find the ESP32, or select it fro a list if you have more than one connected to your computer. And after that, it’s ready to rock:

Everything is set up for you

And then go to Browse to see the list of files on the device at the moment. Find the file you want to edit, double click on it, and get to work. The icons above the work file are Add file, Save file, Run file on device, Undo, Redo and Search.

Working scene

Below your code, you have a REPL window. That’s where the system will show you any print statements and error messages. This setup has nice and clear error messages too, so fixing things is easy and fast.

And a great bonus is the way to see what your chip is doing and how it is feeling right now, when you go to the Menu tab and click on System:

The view into the system

I wish this sort of view was available in Arduino IDE too. Seeing the pin statuses, MicroPython version and even flash partitions is invaluable data. The only thing I have not found in this system is a way to change the partitioning, but that is not a big issue for me.

All in all I find this tool to be exactly what I wanted, a crisp and fast method of accessing an ESP32 and writing Python code for it.

Loading

0 thoughts on “ESP32 MPY-Jama, an excellent IDE for using Python on ESP32”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.