I'm looking for a definitive source of information about the build envrionment used for ESP32* (and ESP8266) micropython firmware releases.
I had inferred from the constant integration tests that the release builds were based on the 4.0.2 IDF. However, it seems from tools/autobuild* that a v4.2 IDF is used for esp32 and v4.4 is used for esp32s*/c*. Ideally, I'd also like to confirm which specific commit of the IDF is used for the releases and if there are any other patches applied (eg. tools/ci.sh in the v1.18 releases used the 142bb32c5 commit from v4.4 IDF, but master now uses the v4.4 tag).
I'd like to build my own images using build environments that are as close to the official builds as possible. Any tips or pointers would be appreciated. Ideally, there is a script somewhere that creates the build environment for releases and I have just not found it yet .
Details of build environment for micropython releases (esp. ESP32)
Re: Details of build environment for micropython releases (esp. ESP32)
The README in the esp32 port talks about the versions: https://github.com/micropython/micropyt ... nvironment
Near the end of that section it says:
Near the end of that section it says:
- ESP32-S3 currently requires v4.4 or later.
- ESP32-S2 and ESP32-C3 require v4.3.1 or later.
Re: Details of build environment for micropython releases (esp. ESP32)
I'm currently also looking into this, I've build mine now with all the supported ESP-IDF versions and none of them works. I'm wondering if one of them works for you?
-
- Posts: 59
- Joined: Mon Mar 29, 2021 1:36 am
- Location: Brisbane Australia
Re: Details of build environment for micropython releases (esp. ESP32)
The README is not always accurate though. E.g. see my post here.
I agree with the OP. Every time I go to build a custom image I have to stuff around to work out which IDF version firstly builds, and then works without odd issues. At least there needs be an easy way to determine the specific IDF version that was used to build each release of MicroPython.
Re: Details of build environment for micropython releases (esp. ESP32)
I'm not sure whether the relesaes do this as well, but following all steps from tools/ci.sh always worked for me; it should because it's also what every build on github uses to build from (almost) scratch on a clean machine
Re: Details of build environment for micropython releases (esp. ESP32)
Thanks, this one: https://github.com/micropython/micropyt ... ools/ci.sh ? How should I exactly read and execute this? I'm using a Generic ESP32. Where do I run this script or..?
Re: Details of build environment for micropython releases (esp. ESP32)
See also https://github.com/micropython/micropyt ... _esp32.yml that's the toplevel stuff. Basically: in a shell with access to build tools like make/git you'd run
Alternatively if you have the idf installed already just run ci_esp32_build and/or copy/paste the relevant commands from ci.sh. For example I have the SDK in ~/espsdk or so so I just run 'source ~/espsdk/export.sh' then copy/paste the relevant build commands from the ci_esp32_build function instead of executing it completely.
Code: Select all
source tools/ci.sh
ci_esp32_idf402_setup
ci_esp32_build
Re: Details of build environment for micropython releases (esp. ESP32)
Thanks for the pointers, and I have used the github workflow scripts myself to clean up my own commits to PRs (eg. catch code formatting probs and IDF compatibility). However, these are not what is used to build the release versions (just as vaildation tests of commits to PR requests on micropython). Eg. ci.sh use v4.0.2 ESP IDF for esp32 and v4.4 IDF for esp32/[sc][23], but the release for v1.18 uses a v4.2 IDF for esp32 (and some specific or modified release of v4.4 as v1.18 compilations against v4.4 IDF don't produce a working repl (but master does) - at least for some recent releases of v4.4 IDF).stijn wrote: ↑Sat Apr 23, 2022 1:19 pmSee also https://github.com/micropython/micropyt ... _esp32.yml that's the toplevel stuff. Basically: in a shell with access to build tools like make/git you'd runAlternatively if you have the idf installed already just run ci_esp32_build and/or copy/paste the relevant commands from ci.sh. For example I have the SDK in ~/espsdk or so so I just run 'source ~/espsdk/export.sh' then copy/paste the relevant build commands from the ci_esp32_build function instead of executing it completely.Code: Select all
source tools/ci.sh ci_esp32_idf402_setup ci_esp32_build
The ci.sh scripts are great references for identifying (and replicating) a good build environment for micropython. It'd be good to have access to reproducible instructions for the release builds as well.