MicroPython on ESP32 with SPIRAM support
Re: MicroPython on ESP-WROVER with 4MB of psRAM
ESP-WROVER-KIT is designed with with esp32 module footprint for ESP-WROVER (which has psRAM) or ESP-WROOM-32 module (without psRAM).
Adafruit offers only ESP-WROVER-KIT with ESP-WROOM-32.
AnalogLamb and Olimex have ESP-WROVER-KIT with ESP-WROVER.
Only SD card can be used in CD card connector. ESD protection diodes are recommended on every connector which can be touched by hand. It doesn't make much sense on such a bord with all MCU IO pins exposed. The design was probably copied from some other device.
Adafruit offers only ESP-WROVER-KIT with ESP-WROOM-32.
AnalogLamb and Olimex have ESP-WROVER-KIT with ESP-WROVER.
Only SD card can be used in CD card connector. ESD protection diodes are recommended on every connector which can be touched by hand. It doesn't make much sense on such a bord with all MCU IO pins exposed. The design was probably copied from some other device.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Thanks for the clarification.
As for uncritical "cut'n'paste" hardware design, words fail me
As for uncritical "cut'n'paste" hardware design, words fail me
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Update:
- Added native ESP32 VFS support, MicroPython's FatFS VFS is not used (it can still be selected via menuconfig).
It is now very simple to work with files from C modules using standard file functions.
Thanks to SHA2017 Badge Team https://github.com/SHA2017-badge/micropython-esp32 for initial support. - New MicroPython configuration options added to menuconfig
- Xtensa toolchain and eps-idf directories (for both standard & psRAM build) added to make the build process even easier
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Update:
You can also visit this Espressif forum topic for more detailes.
- Added support for SPIFFS filesystem on internal spi Flash
- SPIFFS or FatFS can be selected via menuconfig
- SFPIFFS fs image file can be prepared on host and flashed to ESP32
- File systems functions updated, improved, some bugfixes
- MicroPython sources updated
- BUILD.sh script updated with new options
You can also visit this Espressif forum topic for more detailes.
Last edited by loboris on Thu Jul 27, 2017 7:15 pm, edited 1 time in total.
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Update:
You can also visit this Espressif forum topic for more detailes.
- Added support for connecting sd card in SPI mode
- works only with master esp-idf, psRAM esp-idf branch does not have the necessary support yet
- main advantage (the only one?) of connecting sd card in SPI mode is that the card can be attached to any ESP32 pins
- Sd card working mode (SD-1-line, SD-4-line, SPI) can be selected via menuconfig
- sdcard module initialization syntax is changed: If the optional boolean parameter is True the working directory will be changed to sdcard root
Code: Select all
import sdcard sd = sdcard.SDCard([chdir_to_sd_root])
- umount method is added
Code: Select all
>>> uos.listdir('/') ['flash'] >>> sd = sdcard.SDCard() --------------------- Mode: SD (4bit) Name: SL08G Type: SDHC/SDXC Speed: default speed (25 MHz) Size: 7580 MB CSD: ver=1, sector_size=512, capacity=15523840 read_bl_len=9 SCR: sd_spec=2, bus_width=5 >>> uos.listdir('/') ['flash', 'sd'] >>> sd.umount() >>> uos.listdir('/') ['flash']
You can also visit this Espressif forum topic for more detailes.
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Update:
See GitHub repository for more info.
You can also visit this Espressif forum topic for more detailes.
- Added ymodem module
- Send or receive files to/from host via same uart on which REPL runs
- Text or binary files (like images, encoded data, ...) of any size can be sent or received reliably
- Terminal emulator with support for ymodem protocol must be used (like minicom on Linux or TeraTerm, ExtraPuTTY on Windows)
Code: Select all
>>> import ymodem, uos
>>>
>>> ymodem.recv('image1.bmp')
Receiving file, please start YModem transfer on host ...
(Press "a" to abort)
CCCC
File received, size=230456, original name: "tiger.bmp"
>>> uos.listdir()
['spiffs.info', 'lib', 'boot.py', 'yyy.txt', 'tiger240.jpg', 'tiger.jpg', 'image1.bmp']
>>> uos.stat('image1.bmp')
(32768, 0, 0, 0, 0, 0, 230456, 138, 138, 138)
>>>
>>> ymodem.send('image1.bmp')
Sending file, please start YModem receive on host ...
(Press "a" to abort)
CCC
Transfer complete, 230456 bytes sent
>>>
You can also visit this Espressif forum topic for more detailes.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Is it not possible to use rshell for file transfer with the ESP32?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: MicroPython on ESP-WROVER with 4MB of psRAM
rshell and ampy can be used, but I've had some problems transfering binary files (in fact, couldn't transfer any binary file).pythoncoder wrote:Is it not possible to use rshell for file transfer with the ESP32?
I also find it far more simple to send or receive the file directly from REPL than to exit REPL, start rshell, transfer file(s), back to repl ...
It is far more simple and more reliable.
Of course, when I need to transfer more files (or large files) I'm using ftpserver module. It works very fast and I've had no problems so far.
Re: MicroPython on ESP-WROVER with 4MB of psRAM
Update:
See GitHub repository for more info.
- Some changes needed to build with latest esp-idf commits
- Master esp-idf archive updated (for non-psRAM builds)
- improvements in _thread module
- _thread.start_new_thread() now returns thread id which can be used in some methods
- added methods suspend(th_id), resume(th_id), stop(th_id)
- inter-thread notifications:
- _thread.notify(th_id) send notification to the specific thread
- _thread.getnotification() check if a notification received from within the thread
- threads are tested with (relatively) complex modules like uftpserver and works wery well
- Updated uftpserver frozen module to quietly run in thread
- other small changes and bug fixes
Code: Select all
>>>
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== import machine, _thread, time
===
=== bled = machine.Pin(4, mode=machine.Pin.OUT)
=== gled = machine.Pin(0, mode=machine.Pin.OUT)
=== rled = machine.Pin(2, mode=machine.Pin.OUT)
===
=== bled.value(0)
=== gled.value(0)
=== rled.value(0)
===
===
=== def rgbleds(n, x):
=== ledon = 0
=== notif_exit = 4718
=== notif_print = 2
=== while x > 0:
=== if ledon == 0:
=== bled.value(1)
=== gled.value(0)
=== rled.value(0)
=== if ledon == 1:
=== gled.value(1)
=== bled.value(0)
=== rled.value(0)
=== if ledon == 2:
=== rled.value(1)
=== bled.value(0)
=== gled.value(0)
=== ledon = ledon + 1
=== if ledon > 2:
=== ledon = 0
=== time.sleep_ms(n)
=== x = x - 1
===
=== notif = _thread.getnotification()
=== if notif == notif_exit:
=== print("[rgbleds] Exiting")
=== return
=== elif notif == notif_print:
=== print("[rgbleds] I was notified")
=== elif notif != 0:
=== print("[rgbleds] Unknown notification %u" % (notif) )
===
===
=== lth=_thread.start_new_thread(rgbleds, (333,10000))
===
>>>
>>> _thread.notify(lth,7788)
True
>>> [rgbleds] Unknown notification 7788
_thread.notify(lth,2)
True
>>> [rgbleds] I was notified
>>> import uftpserver
>>> ftpth=_thread.start_new_thread(uftpserver.ftpserver, (3600,True))
Starting ftp server. Version 1.2
>>> FTPServer address: 192.168.0.21
>>> _thread.notify(ftpth,7788)
True
>>> [ftpserver] Notification 7788 unknown
>>> _thread.notify(ftpth,7591)
True
>>> [ftpserver] Received QUIT notification, exiting