MicroPython on ESP32 with SPIRAM support

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Sun Nov 05, 2017 10:43 pm

:!: Update
  • Updated esp-idf to commit abacf8d2a0347a4bf95315cdb227e9b8b1c93794 (2017/11/03)
  • Updated MicroPython core from latest main MicroPython-ESP32 port commits
  • Updated adc module
    • reading ESP32 hall sensor added
    • reading calibrated or raw ADC value added
    • route Vref to gpio and set Vref method added for precise calibration
  • Updated mqtt module
    • on unsubscribe callback added
    • subscribe & unsubscribe methods now waits for the response and returns True/False
    • on subscribe & on unsubscribe callbacks now gets the tuple argument with id and topic name
  • Fixed bug: os.stat('/flash') and os.stat('/sd') returns Errno 22
  • Other small bugfixes and improvements
Documentation for ADC, Mqtt, Curl and Neopixel modules will be available in a day or two.

You can support this project by donating via PayPal

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Thu Jan 04, 2018 6:17 pm

:!: Update

The repository was cleaned and reinitialized, you won't be able to update using git pull , sorry.
Please, delete or rename your old MicroPython directory and do the fresh clone:

Code: Select all

git clone https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo.git
  • BUILD.sh refactored, more options added, multiple commands are possible in command line, see Wiki
  • OTA module added, single, dual and triple partitions layouts are available, see Wiki
  • mDNS server is added, see Wiki
  • MicroPython task watchdog added
  • Onewire module added as C module, uses ESP32 RMT peripheral for very precise timing. Using devices in parasite power mode is enabled. Full support for all devices from DS18xxx temperature sensor family.
  • ADC module improved, see Wiki
  • Neopixel module updated, support for RGBW added, see Wiki
  • timer module refactored, works much better now, many new functions and timer types added, 8 additional timers can be used. CHRONO timer type works with 1 us resolution.
  • machine module updated, setting ESP32 log level added
  • utime.tick_xx functions now returns 64-bit value
  • SPI module updated
  • curl module updated to use the latest libcurl commits
  • SPIFFS driver refactored, now uses esp-idf spiffs driver, modified to enable directories. Faster and more reliable.
  • minor bugfixes, updates and improvements in many modules and drivers ...
  • esp-idf and Xtensa toolchain updated to the latest versions
  • The documentation is now awailable via repository Wiki. Some documentation is still missing, it will be updated during next couple of days.
  • Prebuilt firmware is available.
There were a large amount of changes during the last two months, please report any bug and issue you find.

You can support this project by donating via PayPal

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Sat Jan 13, 2018 8:31 pm

:!: Update:
  • More prebuilt firmwares added. Prebuilt firmwares can now be downloaded as zip file.
  • SPI module updated, some bugs fixed.
  • esp-idf and Xtenssa toolchain updated.
  • Updated _thread module, _thread.wait() function added. Class functions can now be used in threads. Wiki updated.
  • Updated utime module. Fixed bug in utime.sleep & utime.sleep_ms
  • Updated PWM module. Up to 8 channels can now be used. Some bug fixes and improvements. Wiki added.
You can support this project by donating via PayPal

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Sat Jan 27, 2018 9:02 pm

:!:
Updates summary:
Jan 13. ~ 27.
  • Fixed bug in spiffs driver affecting uos.listdir()
  • Fixed bug in unmounting sdcard causing issues with rshell
  • Updated PWM module, float values accepted in duty function
  • Updated RTC module, improved smpt functions, some bugs fixed
  • Updated utime module, added utime.ticks_base() function
  • Bug fix: LAN class not added to the network module
  • Fixed bug in machine.Timer preventing extended timers to function as intended
  • Updated OTA module, allow setting boot partition also for ota types
  • Updated SSH & Curl modules, some bugs fixed, latest libcurl version used
  • Updated mDNS module, now built with latest esp-idf mdns componnent, some api changes, see the Wiki
  • Updated _thread module, some bugfixes, thread lock / unlock implemented.
    Wiki page updated, detailed Example added
  • Full Onewire/ds18x20 module documentation added
  • Many other Wiki pages updated, more updates/additions soon...
  • Updated esp-idf to the latest commit
  • Added ARM Xtenssa toolchain, Build on Raspberry Pi and other ARM systems is now possible, thanks to Benoit Despatis
  • Added -fno-stack-protector in mpy-cross Makefile to address issues on some operating systems
Individual prebuilt firmware zip archives for various configurations are now available for download.
You can support this project by donating via PayPal
Thanks to all who donated.

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby rudi ;-) » Thu Feb 22, 2018 7:15 pm

ready now for I2C slave HW too?
missed it so started for IDF now
best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Thu Feb 22, 2018 7:29 pm

@rudi

The support for HW I2C slave in MicroPython is now finished, the update including it will be committed for the weekend.
I've tested I2C slave opperations quite a lot and it works with no problems. It is even possible to emulate some existing I2C devices.

I'm planning to open GitHub repository with an example of how to use I2C slave with esp-idf only next week.

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby rudi ;-) » Thu Feb 22, 2018 7:38 pm

loboris wrote:@rudi

The support for HW I2C slave in MicroPython is now finished, the update including it will be committed for the weekend.
I've tested I2C slave opperations quite a lot and it works with no problems. It is even possible to emulate some existing I2C devices.

I'm planning to open GitHub repository with an example of how to use I2C slave with esp-idf only next week.
thank you boris!
for info, did you by HW/ISR and poll ringbuffer or SOFT with polling/isr ?
i ask, cause want do a standalone example so perhabs we can save one work if you did already.
great work boris! ( do you be at eMbeddedWorld? it is only 800 km from you :) )
best wishes
rudi ;-)

edit: i should read in detail
"The support for HW I2C slave ".
so you did in HW and ringbuffer right?
so i would start a soft code example then and we have then HW and Soft example
ok?

edit:
damn: ... " with an example of how to use I2C slave with esp-idf only next week."
... i think i must pause today :)
my read is not the best today :)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

stegomon
Posts: 1
Joined: Fri Feb 23, 2018 10:23 am

Re: MicroPython on ESP32 with SPIRAM support

Postby stegomon » Fri Feb 23, 2018 10:43 am

First of all, thank you Boris for your fantastic work.

I have a question regarding bluetooth and the inclusion of header files associated with it. I have enabled Bluetooth and Bluedroid support in the Kconfig system.
I get the error

Code: Select all

fatal error: esp_bt.h: No such file or directory
when trying to include the header file "esp_bt.h" with the include command

Code: Select all

#include "esp_bt.h"
When including other header files, like "freertos/task.h" it works fine.

What could I do to resolve or troubleshoot this error?
Attachments
Kconfig_1.png
Kconfig_1.png (10.83 KiB) Viewed 16622 times
Kconfig_2.png
Kconfig_2.png (30.03 KiB) Viewed 16622 times

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Wed Feb 28, 2018 4:07 pm

:!:
Updates summary:
February 2018.
  • Changed the method of passing parameters from tasks/events/interrupts to MicroPython callbacks.
    There were some issues/crashes on executing MicroPython callback functions scheduled from FreeRTOS tasks, FreeRTOS events or interrupts. This is now fixed, and no more crashes related to this should happen. Affected were mqtt, uart, network and GSM modules.
    • Updated MicroPython scheduler functions
    • Updated all affected modules
  • esp-idf sdspi_host driver refactored
    Using SDCard in SPI mode and display at the same time now works
    Tested on M5Stack & Adafruit 2.4" TFT Featherwing
  • Display module refactored
    • the display module now uses (modified) esp-idf spi-master driver
    • 16-bit color mode added, some operations are faster than with 24-bit mode
    • low level display functions added (setspeed, select, deselect, writecmd, writecmddata, readcmd)
    • get TP calibration constants function added
    • Backlight on/off function added
    • M5Stack display support added
    • M5Stack & GENERIC display types added
    • display initialization sequence for unknown display types can now be handled from MicroPython
    • tpcalib frozen module updated
    • added option to select rotation in init() method
    • added option not to display splash in init() method
  • I2C module completely refactored, now MIT licensed
    • SLAVE mode added
      • ESP32 hardware i2c can now be used in slave mode
      • special buffer (register array) is defined for master <-> slave communication
      • master can read or write data to MicroPython I2C slave
      • master can send arbitrary command (optionally with data) to MicroPython I2C slave
      • callback functions on i2c slave write, read and command
      • Wiki pages will be updatad with the complete information later today or tommorow
    • Low level I2C functions added
    • esp-idf i2c driver modified for better handling of the slave functions
  • UART module updated
    • added callbacks on data, pattern and error
    • added flush() method
    • some bugs fixed
  • SPI module updated, improved coexistence with other modules using the spi interface
  • network module updated, added callback function on WiFi events
  • machine module updated, added method for reading internal ESP32 temperature sensor
  • _thread module updated, status of the system tasks is now available in _thread.list()
  • uos module updated, SDCard mode can now be configured from MicroPython
  • utime & utimeq modules updated
    time.ticks_xx() functions now returns consistent tick count after time update (including NTP update)
    fixed handling if time values in utimeq
  • rtc module updated
  • ftp server updated, should now support many more FTP clients
  • Updated curl module, mail functions can now be excluded from build (via menuconfig)
  • uftpserver frozen module updated
  • microWebServer frozen module updated, WebSockets support added
  • Added MPU9250 frozen module (available on M5Stack)
  • sys.platform now returns 'esp32_LoBo' for better identification of this MicroPython port
  • Experimental Bluetooth support, not yet finished, do not use for now
  • Experimental support for FTDI EVE display modules, not yet finished, do not use for now
  • LICENSE file added
  • License information in many source files updated/added
Many Wiki pages are updated, the rest will be updatad in the next couple of days
.
.
You can support this project by donating via PayPal
Thanks to all who donated.
Last edited by loboris on Mon Mar 05, 2018 2:55 pm, edited 1 time in total.

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: MicroPython on ESP32 with SPIRAM support

Postby loboris » Mon Mar 05, 2018 2:49 pm

:!:
I have started a new forum dedicated to this MicroPython port.
LoBo MicroPython for ESP32 forum
or with secure connection
LoBo MicroPython for ESP32 forum

Who is online

Users browsing this forum: No registered users and 13 guests