Page 1 of 1

[Solved] How to setup ESP32-S2 build environment?

Posted: Mon Apr 26, 2021 8:15 pm
by water

Code: Select all

make BOARD=GENERIC_S2
idf.py -D MICROPY_BOARD=GENERIC_S2 -B build-GENERIC_S2 build
Checking Python dependencies...
Python requirements from /home/mc3/espressif/esp-idf/requirements.txt are satisfied.
Executing action: all (aliases: build)
Running cmake in directory /home/mc3/micropython/ports/esp32/build-GENERIC_S2
Executing "cmake -G 'Unix Makefiles' -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DWARN_UNINITIALIZED=1 -DMICROPY_BOARD=GENERIC_S2 -DCCACHE_ENABLE=0 /home/mc3/micropython/ports/esp32"...
Warn about uninitialized values.
-- Found Git: /bin/git (found version "2.30.2")
-- Component directory /home/mc3/espressif/esp-idf/components/cbor does not contain a CMakeLists.txt file. No component will be added
CMake Error at /home/mc3/espressif/esp-idf/tools/cmake/targets.cmake:57 (message):
Unable to resolve 'esp32s2' for setting toolchain file.
Call Stack (most recent call first):
/home/mc3/espressif/esp-idf/tools/cmake/project.cmake:256 (__target_set_toolchain)
CMakeLists.txt:38 (project)


-- Configuring incomplete, errors occurred!
cmake failed with exit code 1
make: *** [Makefile:30: all] Error 2

Re: [Solved] How to setup ESP32-S2 build environment?

Posted: Thu Jul 15, 2021 2:15 pm
by water
Build ESP32-S2 required ESP-IDF version >= v4.3

Re: [Solved] How to setup ESP32-S2 build environment?

Posted: Thu Jul 15, 2021 10:34 pm
by mattyt
As an alternative, although not official, I recently pushed a container to the docker hub that can help with that:

Code: Select all

> docker run -ti --rm -v ~/my_micropython:/micropython micropython/build-micropython-esp32 bash -c -l "cd micropython && make -C mpy-cross && make -C ports/esp32 submodules && make -C ports/esp32 BOARD=GENERIC_S2"
Assuming you have a clone of MicroPython on your host at ~/my_micropython.