Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for how to update IDF version #889

Closed
johnboiles opened this issue Aug 22, 2022 · 10 comments
Closed

Documentation for how to update IDF version #889

johnboiles opened this issue Aug 22, 2022 · 10 comments

Comments

@johnboiles
Copy link

johnboiles commented Aug 22, 2022

Forgive me if this is documented anywhere, I haven't been able to find it. I frequently use new IDF features as they're released and am trying to figure out how to build a custom platform-espressif32 using a specific SHA from IDF. I'm happy to help document and possibly automate this once I understand how to do it.

I see that there's a builder/main.py script and a builder/frameworks/espidf.py script. My understanding is that those get invoked to build platform-espressif32 and framework-espidf respectively, but I don't see anywhere that the actual IDF version, SHA, or local path gets set.

Looking at the framework-espidf package tar.gz files, it looks like it has pretty much all of IDF in there. I see IDF_PATH is set from FRAMEWORK_DIR, but I don't see where the IDF files get into FRAMEWORK_DIR to begin with.

Help here would be much appreciated. And I'm happy to document this (maybe in the README) once we have a procedure worked out. @Jason2866 I know you've done this before (and thank you so much for doing it all those times!!) do you have the process written down anywhere?

@Jason2866
Copy link
Contributor

Jason2866 commented Aug 22, 2022

@johnboiles Currently it is not possible to update the IDF 4.4.x version in PlatformIO since the (c)make part in actual IDF4.4.x is updated and not anymore compatible to the older version and build process in PlatformIO.
To get the actual IDF 4.4.x version running i did some reverts in IDF of this part. Dirty.... For a real solution Platformio crew has to update this part. I do not have the knowledge for.
If this is done it is pretty straightforward, clone IDF repo. Activate the github actions in your fork. Tag the commit you want with a release tag. Github actions will do a complete IDF package. You just have to add to this zip a valid package.json (just take a look in a current used in Platformio). If the json is in the package you can use the zip in Platformio via platform_packages
My builds are here https://github.com/tasmota/esp-idf/releases
The *.org is the file without the not needed github history. The other small *.zip is the one with the cmake reverts to work with Platformio.
The *.py files you mentioned are the build routines to compile idf projects. The need a ready done framework.
The have nothing to do, to build a framework!

@johnboiles
Copy link
Author

Thank you @Jason2866!! I'll dig into your tasmota/esp-idf repo. Are the cmake reverts in your git or do you make them manually in the zip file after releasing the org version of the zip?

So then I can point platform_packages to the manually patched version of the zip right? Like this:

platform_packages = framework-espidf @ https://github.com/tasmota/esp-idf/releases/download/v4.4.2/esp-idf-v4.4.2.zip

@Jason2866
Copy link
Contributor

Yes, manually changed, since it is a dirty hack. It is not in the repo. Idk if the hack will work with newer IDF commits....
Your assumption how to use the framework is correct.

@johnboiles
Copy link
Author

Ok! I'll diff the contents of esp-idf-v4.4.2.zip and esp-idf-v4.4.2-org.zip to find out your hacks!

@valeros
Copy link
Member

valeros commented Aug 31, 2022

Hi @johnboiles ! Currently, PlatformIO supports only stable versions of frameworks and IDF is no exception. Once the stable v5.0 is released it will be updated here as well.

@johnboiles
Copy link
Author

IDF 4.4.2 is stable!

@valeros
Copy link
Member

valeros commented Sep 1, 2022

IDF 4.4.2 is stable!

Sorry, my bad, I misread the issue. There is no precise ETA, but support for v4.4.2 will be added within next weeks.

@Jason2866
Copy link
Contributor

Jason2866 commented Sep 2, 2022

@johnboiles I found the reason for failing. IDF Components Manager is now enabled by default.
If you change https://github.com/tasmota/esp-idf/commit/ee6844367a2816e4182ffb8db1909ff4fad344c9so
it will work again with PlatformIO. The change does disable the Component Manager by default.

@Jason2866
Copy link
Contributor

Jason2866 commented Sep 2, 2022

@johnboiles I have changed in my espressif IDF fork esp-idf/releases the github actions workflow. A release Tag now generates a small release which can be used directly with platformio. No more manually work :-)

@johnboiles
Copy link
Author

You are awesome @Jason2866!!!! I'm excited to try this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants