← index #6063Issue #5277
Related · medium · value 0.786
QUERY · ISSUE

Problems while building for ESP32 IDF v4.0 under Windows 10

openby aam83opened 2020-05-21updated 2026-03-24
port-esp32proposed-close

Hi!
It's my first time with both ESP32 and Micropython. We are trying to compile it because we will need to add modules in the future, but by the moment it was impossible for us.
We are working in Win10 64 bits.
We installed from Scracth MinGW 32-bits (msys2-i686-20190524.exe download) and added the modules required by windows_install_prerequisites.sh from IDF 4.
We installed ESP IDF 4.0 and re-executed windows_install_prerequisites.sh.
We also installed with PIP the remaining components listed in $IDF_PATH/requirements.txt.
We also executed install.sh and source export.sh in folder $IDF_PATH.
Our intalled Python version is: Python 3.8.3 (default, May 14 2020, 12:41:48) [GCC 10.1.0 32 bit] on win32
We cloned micropython, and make mpy-cross with some problems: make mpy-cross STRIP=echo SIZE=echo
We created a custom makefile_usr where we added the line "ESPIDF ?= $(HOME)/esp32/esp-idf"
The problems come after make -f makefile_usr:

adrianaznar@PCELEC13 MINGW32 ~/esp32/micropython/ports/esp32
$ make -f makefile_adri
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Building with ESP IDF v4
GEN build-GENERIC/sdkconfig.h
Traceback (most recent call last):
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1128, in _open
return open(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/adrianaznar/esp32/esp-idf/components/bootloader/Kconfig.projbuild'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1158, in _enter_file
self._file = self._open(filename)
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1141, in _open
raise IOError(
OSError: Could not open '/home/adrianaznar/esp32/esp-idf/components/bootloader/Kconfig.projbuild' (ENOENT: No such file or directory). Perhaps the $srctree environment variable (which was unset) is set incorrectly. Note that the current value of $srctree is saved when the Kconfig instance is created (for consistency and to cleanly separate instances).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/confgen.py", line 571, in <module>
main()
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/confgen.py", line 230, in main
config = kconfiglib.Kconfig(args.kconfig)
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 653, in init
self._parse_block(None, # end_token
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1583, in _parse_block
self._enter_file(sourced_file)
File "E:/msys32/home/adrianaznar/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1167, in _enter_file
.format(self._filename, self._linenr, e.message))
AttributeError: 'OSError' object has no attribute 'message'
make: *** [Makefile:403: build-GENERIC/sdkconfig.h] Error 1
(build-venv)

CANDIDATE · ISSUE

ESP32 - First time building micropython - Help 2

closedby ShanmugaCAopened 2019-10-29updated 2019-10-29

Hi,

This is in continuation of the "ESP32 - First time building micropython - Help #5269".
After creating the venv, unable to successfully execute the make for ESP32. Any help is appreciated.

  • The make submodules is success, no errors, here is the O/p:
    /micpyth/micropython/ports/esp32$ make submodules
    Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
    Building with ESP IDF v4
    Updating submodules: lib/berkeley-db-1.xx

  • Where as the make failed with multiple errors, here are the errors:

(venv) shanmuganathan@GHHPS3X2E:~/esp/micpyth/micropython/ports/esp32$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Building with ESP IDF v4
GEN build-GENERIC/sdkconfig.h
Traceback (most recent call last):
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1128, in _open
return open(filename)
FileNotFoundError: [Errno 2] No such file or directory: '~/esp/micpyth/micropython/ports/esp32/esp-idf/components/bt/host/bluedroid/Kconfig.in'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1158, in _enter_file
self._file = self._open(filename)
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1149, in _open
'"{}"'.format(self.srctree)))
OSError: Could not open '~/esp/micpyth/micropython/ports/esp32/esp-idf/components/bt/host/bluedroid/Kconfig.in' (ENOENT: No such file or directory). Perhaps the $srctree environment variable (which was unset) is set incorrectly. Note that the current value of $srctree is saved when the Kconfig instance is created (for consistency and to cleanly separate instances).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/confgen.py", line 548, in <module>
main()
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/confgen.py", line 221, in main
config = kconfiglib.Kconfig(args.kconfig)
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 656, in init
self.top_node) # prev_node
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1636, in _parse_block
node) # prev_node
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1587, in _parse_block
prev_node)
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1636, in _parse_block
node) # prev_node
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1636, in _parse_block
node) # prev_node
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1583, in _parse_block
self._enter_file(sourced_file)
File "/home/shanmuganathan/esp/micpyth/micropython/ports/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1167, in _enter_file
.format(self._filename, self._linenr, e.message))
AttributeError: 'OSError' object has no attribute 'message'
Makefile:380: recipe for target 'build-GENERIC/sdkconfig.h' failed
make: *** [build-GENERIC/sdkconfig.h] Error 1

Any clue ?
Where i am missing ?

Please help

thanks
Shanmuganathan

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied