MicroPython on ESP32 with SPIRAM support

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: MicroPython on ESP32 with SPIRAM support

Post by mattyt » Mon Mar 05, 2018 10:34 pm

loboris wrote:
Sat Mar 03, 2018 2:56 pm
There is no remaining GPL licensed code in the repository as of now.
Just wanted to say thanks for your effort to remove the GPL code! Much appreciated.

mosi
Posts: 28
Joined: Tue Oct 07, 2014 12:07 am

Re: MicroPython on ESP32 with SPIRAM support

Post by mosi » Fri Mar 09, 2018 12:07 am

loboris wrote:
Sun Feb 04, 2018 8:14 pm

Why have you enabled the Bluetooth ? It is not supported (yet) and could potentially cause the problem.
Bluetooth is not supported in micropyton, or ESP32 WROVER in general?

Could you elaborate the difficulty of enabling bluetooth LE, simple GATT or bidirectional string messaging / kind of UART over BT in micropython?

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Fri Mar 09, 2018 10:05 am

mosi wrote:
Fri Mar 09, 2018 12:07 am
Bluetooth is not supported in micropyton, or ESP32 WROVER in general?

Could you elaborate the difficulty of enabling bluetooth LE, simple GATT or bidirectional string messaging / kind of UART over BT in micropython?
Bluetooth LE is not fully implemented in MicroPython mostly because I didn't had a time to do it yet.
Bleutooth Classic (UART over BT) will be implemented first, probably before the end of the month.

One of the problems is that BT needs a lot of memory (RAM) to work, it is not easy to implement it to work on boards without SPIRAM and still have big enough MicroPython heap.

zhao
Posts: 5
Joined: Mon Mar 19, 2018 2:15 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by zhao » Mon Mar 19, 2018 2:30 pm

I have two ESP32 board: M5Stack with 4M PSRAM and ESP-WROOM-32. Both boards can flash the standard firmware successfully from http://micropython.org/download and work well. But both boards fail to flash the firmware with SPIRAM support. ESPFlashDownloadTool and esptool.py were used but neither of them worked. Is there some difference to flash these two version of firmware? Please give me some advice. Thank you.

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Mon Mar 19, 2018 3:36 pm

zhao wrote:
Mon Mar 19, 2018 2:30 pm
I have two ESP32 board: M5Stack with 4M PSRAM and ESP-WROOM-32. Both boards can flash the standard firmware successfully from http://micropython.org/download and work well. But both boards fail to flash the firmware with SPIRAM support. ESPFlashDownloadTool and esptool.py were used but neither of them worked. Is there some difference to flash these two version of firmware? Please give me some advice. Thank you.
If you are building your firmware, you should use ./BUILD flash command to flash the firmware, it works on all platforms.

If you want to flash the the prebuilt firmware, there is a file flash.sh for every firmware available. It uses esptool.py to flash the firmware, you just have to change the com port used for flashing.
The default port is /dev/ttyUSB0 (for Linux), on Windows you can change it to COMxx.
You can also change the baudrate, if needed.

You can execute (in the directory where bootloader/bootloader.bin, MicroPython.bin and partitions_mpy.bin are):

Code: Select all

esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after no_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader/bootloader.bin 0xf000 phy_init_data.bin 0x10000 MicroPython.bin 0x8000 partitions_mpy.bin

zhao
Posts: 5
Joined: Mon Mar 19, 2018 2:15 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by zhao » Tue Mar 20, 2018 3:17 am

Thank you so much! I have flashed the firmware successfully with esptool.py. I just flashed the micropython.bin without bootloader.bin and partitions_mpy.bin. That's why I failed everytime in the past. For the firmware without SPIRAM support from http://micropython.org/download, it's enough to to flash the micropython.bin.
Thank you once again. I have been troubled by this problem for a long time. :lol:

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Tue Mar 20, 2018 8:30 am

zhao wrote:
Tue Mar 20, 2018 3:17 am
I just flashed the micropython.bin without bootloader.bin and partitions_mpy.bin.
If the bootloader.bin and/or partitions_mpy.bin are not changed, than it is enough to flash the micropython.bin.

For any further issues or questions you can also use the dedicated forum.

User avatar
Crypto
Posts: 2
Joined: Tue Mar 20, 2018 11:38 am
Location: https://bitmann.org

Re: MicroPython on ESP32 with SPIRAM support

Post by Crypto » Wed Mar 21, 2018 9:06 am

Useful.
very appreciate for this information ;)

formica
Posts: 8
Joined: Thu Mar 30, 2017 10:47 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by formica » Tue Mar 27, 2018 2:22 pm

@loboris, can you confirm that your micropython version works properly with pycom W01 oem module?
Did you try also the to use the extended RAM, external antenna, usb uploading using 'ampy' and the uasyncio library?

Regards
RM

demoontz
Posts: 18
Joined: Wed Feb 15, 2017 12:39 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by demoontz » Wed Mar 28, 2018 3:42 pm

hello!
flashed latest firmware MicroPython_LoBo_esp32_all.zip, i seen all modules included in description, but:
>>> import dht
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'dht'

smth i missed?
thanx
ps. do we have any chats?

Post Reply