Lv_micropython for ESP32, version info does not match 1.11

Created lv_micropython with integrated custom fonts according instructions on:
https://github.com/littlevgl/lv_micropython
Binary was successful programmed to ESP32-WROVER-KIT_V4.1(containing ESP32D0WDQ6 chip with spiram and ILI9341 TFT-display) and is working fine :slight_smile:

On boot via REPL (Ctrl-D) it shows following version:
MicroPython v1.9.4-2072-gf89c8c4-dirty on 2020-01-10; ESP32 module (spiram) with ESP32

When entering following commands via REPL:

import sys
sys.implementation

it resullts in:
(name='micropython', version=(1, 11, 0), mpy=10757)

So micropython version seems to be 1.11. Why is this version not shown at the boot message?

On hard reset following messages are shown:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1e (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1e (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4824
load:0x40078000,len:10532
load:0x40080400,len:6728
entry 0x400806f0
W (301) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
ILI9341 initialization completed
Double buffer

What about the lines “flash read err, 1000” and “ets_main.c 371” ?
Is this OK or did I miss something?

Exists a “how to” for upgrading micropython sources from version e.g. 1.11 to actual 1.12 ?

Thanks for response!

I’m not sure about this one. Need to see where this message comes from.

This is the true version.

Have a look at micropython esp32 readme.
I believe you need to run: make erase, or you may have some other problem with your flash device, either hardware or configuration (for example, flash device voltage could be either 1.8V or 3.3V depends on your hardware).

No, this is something I’m doing from time to time.
I’ve opened a github issue to track this.

Updated to v1.12

Great - thanks for upgrade to 1.12 :slight_smile:

Minor subjects still exist:

On boot via REPL (Ctrl-D) it still shows following version:

MicroPython v1.9.4-2154-gd95332d-dirty on 2020-01-19

When entering following commands via REPL:

import sys
sys.implementation

it resullts in:

(name=‘micropython’, version=(1, 12, 0), mpy=10757)

So it’s version 1.12, but version is still not shown on boot.

On hard reset following message is still shown on “ESP-WROVER-KIT_V4.1”:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3e (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x3e (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4824
load:0x40078000,len:10532
load:0x40080400,len:6728
entry 0x400806f0
W (306) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
ILI9341 initialization completed
Double buffer

It works, but I have still no idea what’s the reason for “flash read err, 1000”.
When using the same firmware on “ESP32-DevKitC V4” the error does not occur.

On both boards the flash was erased before programming the new firmware to the board.
Strange but I think we should not spend to much time on this issue any more cause firmware runs on both boards. Think we just have to keep this bug in mind. Maybe somebody can explain sometime


Best regards,

Peter

I wonder if these problems are specific to lv_micropython, or not.
Did you try upstream micropython 1.12 on your boards?

Hello,

downloaded firmware
GENERIC-SPIRAM : esp32spiram-idf3-20191220-v1.12.bin
from https://micropython.org/download#esp32

Copied firmware to “ESP-WROVER-KIT_V4.1”. Following results:

REPL - Ctrl-D, soft reset:
Bildschirmfoto%20vom%202020-01-20%2011-49-38

Hard-reset:

So software version shown is OK, but the problem with “flash read err, 1000” also exists in pre-compiled firmware on “ESP-WROVER-KIT_V4.1”.

Then downloaded sources micropython-1.12.zip from:

https://micropython.org/download

Sources could be compiled and downloaded successfully to “ESP-WROVER-KIT_V4.1”.

But software version shown was 1.11 and the problem with “flash read err, 1000” also existed in compiled 1.11 sources on “ESP-WROVER-KIT_V4.1”. Verified version via commands “import sys” and “sys.implementation” which also showed version 1.11. So there seems to be the wrong ZIP-File available for download

Then directly cloned micropython sources from:
https://github.com/micropython/micropython
and checked out version 1.12 from these sources (Head set to 1f3719
). But I could not build this version successfully, aborted with:

Create build-GENERIC_SPIRAM/partitions.bin
make: *** Keine Regel vorhanden, um das Ziel „lib/berkeley-db-1.xx/btree/bt_close.c“,
benötigt von „build-GENERIC_SPIRAM/genhdr/qstr.i.last“, zu erstellen. Schluss.
make: Verzeichnis „/home/sengp/97_Downloads/micropython/ports/esp32“ wird verlassen

Think for me (us) it does not make sense to search the reason for this error and spend more time on it.

So i think we have following results:
1.) lv-micropython does not show the correct firmware version, corresponding to the ‘original’ micropython, might be nice to de-bug this in the future, but it has no priority.
2.) The ‘original’ micropython also produces “flash read err, 1000” on “ESP32-DevKitC V4”. The error does not seem to be critical, I may create an issue at the forum on https://forum.micropython.org

best regards,

Peter

1 Like

Hi @amirgon,

FYI. I have the same issue as @sengp regarding the version of the micropython displayed at booting:

MicroPython v1.9.4-2155-g627ed9545-dirty on 2020-01-25; ESP32 module (spiram) with ESP32
Type "help()" for more information.
>>> import sys
>>> sys.implementation
(name='micropython', version=(1, 12, 0), mpy=10757)
>>>

I built from lv_micropython.

Also, the ESP32 port of micropython now supports BLE regardless of IDF V3 or V4, pls see: https://github.com/micropython/micropython/commit/3032ae1155db4bd89786f715f5227967d2cb71cf

Will lv_micropython support merge that feature very soon?

Thanks,
Kaiyuan

Thanks for reporting this. This is a printing issue, possibly related to the build process. It does not affect functionality.
I’ve added an issue to track this.

I try to align lv_micropython to micropython’s releases, not randomly.
The most recent release v1.12 is already merged. The change you are referring to was just recently submitted and is not yet part of a formal stable release.

You can, however, try merging it yourself on your own fork. Usually merging micropython to lv_micropython is very straightforward.

Hi,
I just started with lvgl/micropython and has the same phenomenon: The repl reports the wrong version and sys.implementation does the right thing.
I tracked the source of the problem down to a file called “makeversionhdr.py” in lv_micropython/py/.
To determine the current version it scans the output of the command
git describe --dirty --alway, which indeed gives
v1.9.4-2908-gb1aac13b4
in the root directory of the repo of lv_micropython and
v1.13-150-gb7883ce74
for a fresh copy of the micropython repo.
May be, this method of determining the version may work for the “original” micropython but not for a fork?..don’t know.
Ideally makeversionhdr.py would scan the file docs/conf.py for better results?

Cheers!
mcc