Build 1.12 with ESP-IDF 4.1 stable.

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
prem111
Posts: 127
Joined: Sun Feb 23, 2020 3:18 pm

Build 1.12 with ESP-IDF 4.1 stable.

Post by prem111 » Mon Sep 07, 2020 7:09 pm

How build micropython with ESP-IDF 4.1 stable, im give error:
make BOARD=GENERIC_SPIRAM

kconfiglib.KconfigError: /root/micropython-1.12/ports/esp32/esp-idf/Kconfig:166: '$COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE' not found (in 'source "$COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE"'). Check that environment variables are set correctly (e.g. $srctree, which is set to '/root/micropython-1.12/ports/esp32/esp-idf/'). Also note that unset environment variables expand to the empty string.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build 1.12 with ESP-IDF 4.1 stable.

Post by jimmo » Tue Sep 08, 2020 12:29 am

MicroPython has to be built at specific versions of the IDF as they make breaking changes between versions.

To move to 4.1 requires some changes to MicroPython's ESP32 port. See https://github.com/micropython/micropython/pull/6413 for a starting point.

prem111
Posts: 127
Joined: Sun Feb 23, 2020 3:18 pm

Re: Build 1.12 with ESP-IDF 4.1 stable.

Post by prem111 » Tue Sep 08, 2020 6:44 am

Ok thanks, but i have next problem in 1.12 and 1.13 is the same:
In file included from modnetwork.c:48:0:
/root/micropython-1.13/ports/esp32/esp-idf//components/tcpip_adapter/include/tcpip_adapter.h:15:2: error: #warning "This header is deprecated, please use new network related API in esp_netif.h" [-Werror=cpp]
#warning "This header is deprecated, please use new network related API in esp_netif.h"
^
cc1: all warnings being treated as errors
In file included from modsocket.c:49:0:
/root/micropython-1.13/ports/esp32/esp-idf//components/tcpip_adapter/include/tcpip_adapter.h:15:2: error: #warning "This header is deprecated, please use new network related API in esp_netif.h" [-Werror=cpp]
#warning "This header is deprecated, please use new network related API in esp_netif.h"
^
cc1: all warnings being treated as errors
../../py/mkrules.mk:88: recipe for target 'build-GENERIC_SPIRAM/genhdr/qstr.i.last' failed
make: *** [build-GENERIC_SPIRAM/genhdr/qstr.i.last] Error 1
make: *** Deleting file 'build-GENERIC_SPIRAM/genhdr/qstr.i.last'

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build 1.12 with ESP-IDF 4.1 stable.

Post by jimmo » Tue Sep 08, 2020 7:45 am

prem111 wrote:
Tue Sep 08, 2020 6:44 am
Ok thanks, but i have next problem in 1.12 and 1.13 is the same:
A specific MicroPython version must be built against a specific ESP-IDF version.

Current MicroPython (i.e. v1.13 and the current master) only work with ESP-iDF v3.3.2 and v4.0.1

If you want to use ESP-IDF 4.1, you must update MicroPython code to match the corresponding changes in 4.1. Otherwise it will not compile. The pull request I linked to is an example of the sort of changes that are involved.

Post Reply