diff --git a/MicroPython_BUILD/.gitignore b/MicroPython_BUILD/.gitignore
index 9538063..34ebe8c 100644
--- a/MicroPython_BUILD/.gitignore
+++ b/MicroPython_BUILD/.gitignore
@@ -30,7 +30,7 @@ sdkconfig.fw_esp32
sdkconfig.fw_esp32_ota
sdkconfig.fw_psram
sdkconfig.fw_psram_ota
-sdkconfig.fw_esp32_all
-sdkconfig.fw_esp32_all_psram
+sdkconfig.fw_all
+sdkconfig.fw_all_psram
make_firmwares.sh
diff --git a/MicroPython_BUILD/build_func.sh b/MicroPython_BUILD/build_func.sh
index 132ec8e..9e88447 100755
--- a/MicroPython_BUILD/build_func.sh
+++ b/MicroPython_BUILD/build_func.sh
@@ -352,18 +352,21 @@ check_Environment() {
fi
fi
if [ ! -d "xtensa-esp32-elf" ]; then
- if [ "${machine}" == "Linux" ]; then
- if [ "${linplatform}" == "i686" ]; then
- echo "unpacking ${machine}/xtensa-esp32-elf (32bit)"
- tar -xf ${machine}/xtensa-esp32-elf_32bit.tar.xz > /dev/null 2>&1
- else
- echo "unpacking ${machine}/xtensa-esp32-elf"
- tar -xf ${machine}/xtensa-esp32-elf.tar.xz > /dev/null 2>&1
- fi
- else
- echo "unpacking ${machine}/xtensa-esp32-elf"
- tar -xf ${machine}/xtensa-esp32-elf.tar.xz > /dev/null 2>&1
- fi
+ if [ "${machine}" == "Linux" ]; then
+ if [ "${linplatform}" == "i686" ]; then
+ echo "unpacking ${machine}/xtensa-esp32-elf (32bit)"
+ tar -xf ${machine}/xtensa-esp32-elf_32bit.tar.xz > /dev/null 2>&1
+ elif [ "${linplatform}" == "armv7l" ]; then
+ echo "unpacking ${machine}/xtensa-esp32-elf (arm)"
+ tar -xf ${machine}/xtensa-esp32-elf_arm.tar.xz > /dev/null 2>&1
+ else
+ echo "unpacking ${machine}/xtensa-esp32-elf"
+ tar -xf ${machine}/xtensa-esp32-elf.tar.xz > /dev/null 2>&1
+ fi
+ else
+ echo "unpacking ${machine}/xtensa-esp32-elf"
+ tar -xf ${machine}/xtensa-esp32-elf.tar.xz > /dev/null 2>&1
+ fi
if [ $? -ne 0 ]; then
echo "unpacking 'xtensa-esp32-elf' FAILED"
return 1
diff --git a/MicroPython_BUILD/components/micropython/esp32/machine_rtc.c b/MicroPython_BUILD/components/micropython/esp32/machine_rtc.c
index ad962bd..9e3cb20 100644
--- a/MicroPython_BUILD/components/micropython/esp32/machine_rtc.c
+++ b/MicroPython_BUILD/components/micropython/esp32/machine_rtc.c
@@ -90,8 +90,6 @@ machine_rtc_config_t machine_rtc_config = { 0, -1, 0, 0, 0 };
static TaskHandle_t sntp_handle = NULL;
xSemaphoreHandle sntp_mutex = NULL;
-static bool mach_rtc_isinit = false;
-
#define DEFAULT_SNTP_SERVER "pool.ntp.org"
//------------------------------
@@ -185,14 +183,10 @@ STATIC mp_obj_t mach_rtc_make_new(const mp_obj_type_t *type, size_t n_args, size
// check arguments
mp_arg_check_num(n_args, n_kw, 0, 0, false);
- if (mach_rtc_isinit) {
- mp_raise_msg(&mp_type_OSError, "RTC instance already created, only one can be used.");
- }
// setup the object
mach_rtc_obj_t *self = &mach_rtc_obj;
self->base.type = &mach_rtc_type;
- mach_rtc_isinit = true;
// return constant object
return (mp_obj_t)&mach_rtc_obj;
}
diff --git a/MicroPython_BUILD/components/micropython/esp32/mpversion.h b/MicroPython_BUILD/components/micropython/esp32/mpversion.h
index 9127d26..0ef8fe3 100644
--- a/MicroPython_BUILD/components/micropython/esp32/mpversion.h
+++ b/MicroPython_BUILD/components/micropython/esp32/mpversion.h
@@ -1,8 +1,8 @@
// MicroPython version info
-#define MICROPY_GIT_TAG "ESP32_LoBo_v3.1.10"
+#define MICROPY_GIT_TAG "ESP32_LoBo_v3.1.11"
#define MICROPY_GIT_HASH "g2ddee729"
-#define MICROPY_BUILD_DATE "2017-01-22"
+#define MICROPY_BUILD_DATE "2017-01-24"
#define MICROPY_VERSION_MAJOR (3)
#define MICROPY_VERSION_MINOR (1)
-#define MICROPY_VERSION_MICRO (10)
-#define MICROPY_VERSION_STRING "3.1.10"
+#define MICROPY_VERSION_MICRO (11)
+#define MICROPY_VERSION_STRING "3.1.11"
diff --git a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32.zip b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32.zip
index fb4b92e..d68889b 100644
Binary files a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32.zip and b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32.zip differ
diff --git a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_all.zip b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_all.zip
index b77009d..8f80385 100644
Binary files a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_all.zip and b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_all.zip differ
diff --git a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_ota.zip b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_ota.zip
index 702ef50..1840b87 100644
Binary files a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_ota.zip and b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_ota.zip differ
diff --git a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram.zip b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram.zip
index 0bb1d05..b52ce1e 100644
Binary files a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram.zip and b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram.zip differ
diff --git a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_all.zip b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_all.zip
index 3252157..e2e50a6 100644
Binary files a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_all.zip and b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_all.zip differ
diff --git a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_ota.zip b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_ota.zip
index dd068c1..0c0e22a 100644
Binary files a/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_ota.zip and b/MicroPython_BUILD/firmware/MicroPython_LoBo_esp32_psram_ota.zip differ
diff --git a/MicroPython_BUILD/firmware/esp32/MicroPython.bin b/MicroPython_BUILD/firmware/esp32/MicroPython.bin
index efc74b4..2298437 100644
Binary files a/MicroPython_BUILD/firmware/esp32/MicroPython.bin and b/MicroPython_BUILD/firmware/esp32/MicroPython.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32/bootloader/bootloader.bin b/MicroPython_BUILD/firmware/esp32/bootloader/bootloader.bin
index 0ca428a..a5fb41d 100644
Binary files a/MicroPython_BUILD/firmware/esp32/bootloader/bootloader.bin and b/MicroPython_BUILD/firmware/esp32/bootloader/bootloader.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_all/MicroPython.bin b/MicroPython_BUILD/firmware/esp32_all/MicroPython.bin
index bd76984..bd5b08e 100644
Binary files a/MicroPython_BUILD/firmware/esp32_all/MicroPython.bin and b/MicroPython_BUILD/firmware/esp32_all/MicroPython.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_all/bootloader/bootloader.bin b/MicroPython_BUILD/firmware/esp32_all/bootloader/bootloader.bin
index eb6cc9b..05764ec 100644
Binary files a/MicroPython_BUILD/firmware/esp32_all/bootloader/bootloader.bin and b/MicroPython_BUILD/firmware/esp32_all/bootloader/bootloader.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_ota/MicroPython.bin b/MicroPython_BUILD/firmware/esp32_ota/MicroPython.bin
index 09dce86..a081562 100644
Binary files a/MicroPython_BUILD/firmware/esp32_ota/MicroPython.bin and b/MicroPython_BUILD/firmware/esp32_ota/MicroPython.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_ota/bootloader/bootloader.bin b/MicroPython_BUILD/firmware/esp32_ota/bootloader/bootloader.bin
index e3c31fa..0d72f8c 100644
Binary files a/MicroPython_BUILD/firmware/esp32_ota/bootloader/bootloader.bin and b/MicroPython_BUILD/firmware/esp32_ota/bootloader/bootloader.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_psram/MicroPython.bin b/MicroPython_BUILD/firmware/esp32_psram/MicroPython.bin
index f09b184..efccd5b 100644
Binary files a/MicroPython_BUILD/firmware/esp32_psram/MicroPython.bin and b/MicroPython_BUILD/firmware/esp32_psram/MicroPython.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_psram/bootloader/bootloader.bin b/MicroPython_BUILD/firmware/esp32_psram/bootloader/bootloader.bin
index 1f39920..ce6b6c2 100644
Binary files a/MicroPython_BUILD/firmware/esp32_psram/bootloader/bootloader.bin and b/MicroPython_BUILD/firmware/esp32_psram/bootloader/bootloader.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_psram_all/MicroPython.bin b/MicroPython_BUILD/firmware/esp32_psram_all/MicroPython.bin
index a84c5ed..4a02338 100644
Binary files a/MicroPython_BUILD/firmware/esp32_psram_all/MicroPython.bin and b/MicroPython_BUILD/firmware/esp32_psram_all/MicroPython.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_psram_all/bootloader/bootloader.bin b/MicroPython_BUILD/firmware/esp32_psram_all/bootloader/bootloader.bin
index 89a6332..3dcb47d 100644
Binary files a/MicroPython_BUILD/firmware/esp32_psram_all/bootloader/bootloader.bin and b/MicroPython_BUILD/firmware/esp32_psram_all/bootloader/bootloader.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_psram_ota/MicroPython.bin b/MicroPython_BUILD/firmware/esp32_psram_ota/MicroPython.bin
index 9c3a980..477b2f9 100644
Binary files a/MicroPython_BUILD/firmware/esp32_psram_ota/MicroPython.bin and b/MicroPython_BUILD/firmware/esp32_psram_ota/MicroPython.bin differ
diff --git a/MicroPython_BUILD/firmware/esp32_psram_ota/bootloader/bootloader.bin b/MicroPython_BUILD/firmware/esp32_psram_ota/bootloader/bootloader.bin
index 8b29807..e34cb3a 100644
Binary files a/MicroPython_BUILD/firmware/esp32_psram_ota/bootloader/bootloader.bin and b/MicroPython_BUILD/firmware/esp32_psram_ota/bootloader/bootloader.bin differ
diff --git a/README.md b/README.md
index b5d164b..79e7e61 100644
--- a/README.md
+++ b/README.md
@@ -2,32 +2,31 @@
# with support for 4MB of psRAM
----
+
-**This repository can be used to build MicroPython for modules with psRAM as well as for regular ESP32 modules without psRAM.**
+> This repository can be used to build MicroPython for ESP32 boards/modules with **psRAM** as well as for ESP32 boards/modules **without psRAM.**
+> *Building on* **Linux**, **MacOS** *and* **Windows** (including **Linux Subsystem on Windows 10**) *is supported*.
+> MicroPython works great on ESP32, but the most serious issue is still (as on most other MicroPython boards) limited amount of free memory.
+> This repository contains all the tools and sources necessary to **build working MicroPython firmware** which can fully use the advantages of **4MB** (or more) of **psRAM**.
+> It is **huge difference** between MicroPython running with **less than 100KB** of free memory and running with **4MB** of free memory.
-**As of Sep 18, 2017 full support for psRAM is included into esp-idf and xtensa toolchain**
-
-*Building on* **Linux**, **MacOS** *and* **Windows** *is supported*
-
----
-
-MicroPython works great on ESP32, but the most serious issue is still (as on most other MicroPython boards) limited amount of free memory.
+
ESP32 can use external **SPIRAM** (psRAM) to expand available RAM up to 16MB.
Currently, there are several modules & development boards which incorporates **4MB** of psRAM:
-* **ESP-WROVER-KIT boards** from Espressif or [AnalogLamb](https://www.analoglamb.com/product/esp-wrover-kit-esp32-wrover-module/).
-* **Lolin32 Pro board** from [Wemos](https://wiki.wemos.cc/products:lolin32:lolin32_pro) - **recommended**.
-* **WiPy 3.0 board** from [Pycom](https://pycom.io/product/wipy-3/).
-* **ESP-WROVER** from Espressif or [ElecrtoDragon](http://www.electrodragon.com/product/esp32-wrover-v4-module-based-esp32/).
-* **ALB32-WROVER** (4 MB SPIRAM & 4/8/16 MB Flash) from [AnalogLamb](https://www.analoglamb.com/product/alb32-wrover-esp32-module-with-64mb-flash-and-32mb-psram/).
-* **S01**, **L01** and G01 OEM modules from [Pycom](https://pycom.io/webshop#oem-products).
+* **Lolin32 Pro** _board_ from [Wemos](https://wiki.wemos.cc/products:lolin32:lolin32_pro) - **`recommended`** ([buy](https://www.aliexpress.com/store/product/LOLIN32-Pro-V1-0-0-wifi-bluetooth-board-based-ESP-32-esp32-Rev1-ESP32-WROVER-MicroPython/1331105_32843682537.html)) ([Schematic](https://wiki.wemos.cc/_media/products:lolin32:sch_lolin32_pro_v1.0.0.pdf)).
+* **ESP-WROVER-KIT** _boards_ from Espressif, available from [ElectroDragon](http://www.electrodragon.com/product/esp32-wrover-kit/), [AnalogLamb](https://www.analoglamb.com/product/esp-wrover-kit-esp32-wrover-module/), ...
+* **WiPy 3.0** _board_ from [Pycom](https://pycom.io/product/wipy-3/).
+* **TTGO TAudio** _board_ ([eBay](https://www.ebay.com/itm/TTGO-TAudio-V1-0-ESP32-WROVER-SD-Card-Slot-Bluetooth-WI-FI-Module-MPU9250/152835010520?hash=item2395ad2fd8:g:Jt8AAOSwR2RaOdEp))
+* **ESP-WROVER** _module_ from Espressif, available from [ElectroDragon](http://www.electrodragon.com/product/esp32-wrover-v4-module-based-esp32/) and many other wendors.
+* **ALB32-WROVER** _module_ (4 MB SPIRAM & 4/8/16 MB Flash) from [AnalogLamb](https://www.analoglamb.com/product/alb32-wrover-esp32-module-with-64mb-flash-and-32mb-psram/).
+* **S01**, **L01** and **G01** _OEM modules_ from [Pycom](https://pycom.io/webshop#oem-products).
---
-Some basic [documentation](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki) specific to this **MicroPython** port is available.
+[Wiki pages](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki) with detailed documentation specific to this **MicroPython** port are available.
Some examples can be found in [modules_examples](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/tree/master/MicroPython_BUILD/components/micropython/esp32/modules_examples) directory.
@@ -50,13 +49,14 @@ This way many features not available in standard ESP32 MicroPython are enabled,
### Features
* MicroPython core based on latest build from [main Micropython repository](https://github.com/micropython/micropython)
-* added changes needed to build on ESP32 with psRAM
+* added changes needed to build for ESP32 with psRAM
* Default configuration has **2MB** of MicroPython heap, **20KB** of MicroPython stack, **~200KB** of free DRAM heap for C modules and functions
* MicroPython can be built in **unicore** (FreeRTOS & MicroPython task running only on the first ESP32 core, or **dualcore** configuration (MicroPython task running on ESP32 **App** core)
* ESP32 Flash can be configured in any mode, **QIO**, **QOUT**, **DIO**, **DOUT**
* **BUILD.sh** script is provided to make **building** MicroPython firmware as **easy** as possible
-* Internal filesystem is built with esp-idf **wear leveling** driver, so there is less danger of damaging the flash with frequent writes. File system parameters (start address, size, ...) can be set via **menuconfig**.
+* Internal Fat filesystem is built with esp-idf **wear leveling** driver, so there is less danger of damaging the flash with frequent writes.
* **SPIFFS** filesystem is supported and can be used instead of FatFS in SPI Flash. Configurable via **menuconfig**
+* Flexible automatic and/or manual filesystem configuration
* **sdcard** support is included which uses esp-idf **sdmmc** driver and can work in **SD mode** (*1-bit* and *4-bit*) or in **SPI mode** (sd card can be connected to any pins). For imformation on how to connect sdcard see the documentation.
* Files **timestamp** is correctly set to system time both on internal fat filesysten and on sdcard
* **Native ESP32 VFS** support for spi Flash & sdcard filesystems.
@@ -72,15 +72,17 @@ This way many features not available in standard ESP32 MicroPython are enabled,
* **i2c** module uses ESP32 hardware i2c driver
* **spi** module uses ESP32 hardware spi driver
* **adc** module improved, new functions added
+* **pwm** module, ESP32 hardware based
+* **timer** module improved, new timer types and features
* **curl** module added, many client protocols including FTP and eMAIL
-* **ssh** module added with sftp support
+* **ssh** module added with sftp/scp support and _exec_ function to execute program on server
* **display** module added with full support for spi TFT displays
* **mqtt** module added, implemented in C, runs in separate task
* **mDNS** module added, implemented in C, runs in separate task
* **telnet** module added, connect to **REPL via WiFi** using telnet protocol
* **ftp** server module added, runs as separate ESP32 task
* **GSM/PPPoS** support, connect to the Internet via GSM module
-* **OTA Update** supported
+* **OTA Update** supported, various partitions layouts
* **Eclipse** project files included. To include it into Eclipse goto File->Import->Existing Projects into Workspace->Select root directory->[select *MicroPython_BUILD* directory]->Finish. **Rebuild index**.
---
diff --git a/Tools/Linux/xtensa-esp32-elf_arm.tar.xz b/Tools/Linux/xtensa-esp32-elf_arm.tar.xz
new file mode 100644
index 0000000..f3e3026
Binary files /dev/null and b/Tools/Linux/xtensa-esp32-elf_arm.tar.xz differ