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

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
water
Posts: 75
Joined: Sun Sep 24, 2017 9:16 am

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

Post by water » Mon Apr 26, 2021 8:15 pm

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

User avatar
water
Posts: 75
Joined: Sun Sep 24, 2017 9:16 am

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

Post by water » Thu Jul 15, 2021 2:15 pm

Build ESP32-S2 required ESP-IDF version >= v4.3

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

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

Post by mattyt » Thu Jul 15, 2021 10:34 pm

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.

Post Reply