Hi
We are using ESP32 IDF as sub module into our existing application and we have one requirement to update existing ESP32 IDF component file.
We know that whole component can be override but our requirement it to override only one from which is spiram_psram.c file as per our requirement.
So, Would you please suggest us like is there any way to do it?
Need help to overrite one of file from component into ESP32
Need help to overrite one of file from component into ESP32
Regards,
Ritesh Prajapati
Ritesh Prajapati
-
- Posts: 37
- Joined: Mon Aug 28, 2017 10:25 am
Re: Need help to overrite one of file from component into ESP32
Hi, Ritesh
You can locally change one IDF file by:
1. modify the files you want
2. goes into the IDF submodule directory.
3. commit all the changes
4. go back to your own repository
5. commit the submodule update (git add [submodule path]; git commit -m "submodule update: ..."), its actually an one-line change to the submodule
You have to notice that if you want to update the IDF later, you have to fetch the latest IDF master or release tag, and rebase the commits you've just made onto the master/release tag in the IDF submodule, and commit a submodule update in your own repo.
After this, if you think your changes is useful and general to other users, pull requests is welcome. Please see https://help.github.com/en/articles/about-pull-requests
You can locally change one IDF file by:
1. modify the files you want
2. goes into the IDF submodule directory.
3. commit all the changes
4. go back to your own repository
5. commit the submodule update (git add [submodule path]; git commit -m "submodule update: ..."), its actually an one-line change to the submodule
You have to notice that if you want to update the IDF later, you have to fetch the latest IDF master or release tag, and rebase the commits you've just made onto the master/release tag in the IDF submodule, and commit a submodule update in your own repo.
After this, if you think your changes is useful and general to other users, pull requests is welcome. Please see https://help.github.com/en/articles/about-pull-requests
Re: Need help to overrite one of file from component into ESP32
Hi,xiaoxufeng wrote: ↑Fri Apr 19, 2019 3:30 pmHi, Ritesh
You can locally change one IDF file by:
1. modify the files you want
2. goes into the IDF submodule directory.
3. commit all the changes
4. go back to your own repository
5. commit the submodule update (git add [submodule path]; git commit -m "submodule update: ..."), its actually an one-line change to the submodule
You have to notice that if you want to update the IDF later, you have to fetch the latest IDF master or release tag, and rebase the commits you've just made onto the master/release tag in the IDF submodule, and commit a submodule update in your own repo.
After this, if you think your changes is useful and general to other users, pull requests is welcome. Please see https://help.github.com/en/articles/about-pull-requests
I know those changes which we can do if we have access of IDF. Here, We are directly downloading ESP32 IDF from Internet and storing it as submodule into our project.
So, We can not directly change into submodule as it will create dirty change after that.
That is why I want steps or procedure to override that file into my component.
Hope now you will clear my requirement for same.
Regards,
Ritesh Prajapati
Ritesh Prajapati
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Need help to overrite one of file from component into ESP32
Sorry, we don't really have a way to override just one file... overrides happen on component levels only.
Re: Need help to overrite one of file from component into ESP32
Thanks for your quick response regarding same.ESP_Sprite wrote: ↑Sat Apr 20, 2019 12:46 amSorry, we don't really have a way to override just one file... overrides happen on component levels only.
Do you have any suggestion or solution to override single file because we need to include that support into existing SDK. Also, It is little bit risky to override whole component in which there are almost core libraries and other source files are present.
Just check from your end if possible otherwise I need to find any alternative solution for same.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to overrite one of file from component into ESP32
As part of your build script, reset the esp-idf submodule and then apply your patch to the file. If the patch fails, abort the build.
Re: Need help to overrite one of file from component into ESP32
Sorry. I didn't get your point for same.
Would you please clarify steps into details? Let me give my steps which we are following into our case.
1) We have our own SDK in which we are using ESP32 IDF as submodule
2) We are not doing any changes into ESP32 IDF but just using that IDF into our SDK
So, If we change anything into ESP32 IDF then it will show dirty changes into ESP32 IDF as we have adopted it as submodule directly from external IDF Link.
How I can reset ESP32 IDF submodule and Apply patch for same? I just want to clarify that we just need to update only one file into spiram_psram.c file as per our requirement.
Let me know if need any more details regarding same.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to overrite one of file from component into ESP32
How I can reset ESP32 IDF submodule
Using git commands
Using patch commandand Apply patch for same?
If you really want it to show clean then you should maintain your own fork of esp-idf.So, If we change anything into ESP32 IDF then it will show dirty changes
Re: Need help to overrite one of file from component into ESP32
Hi,WiFive wrote: ↑Sat Apr 20, 2019 5:29 amHow I can reset ESP32 IDF submodule
Using git commandsUsing patch commandand Apply patch for same?If you really want it to show clean then you should maintain your own fork of esp-idf.So, If we change anything into ESP32 IDF then it will show dirty changes
Yes. That is the last option to clone our own fork but we need to think for that as we are also providing our SDK to outside to develop their application.
Regards,
Ritesh Prajapati
Ritesh Prajapati
-
- Posts: 37
- Joined: Mon Aug 28, 2017 10:25 am
Re: Need help to overrite one of file from component into ESP32
Each component is treated as an individual part when maintaining the component. Back compatible are only ensured at the component level.
I'm afraid that overriding a single file may make you more risky when you update the IDF.
I'm afraid that overriding a single file may make you more risky when you update the IDF.
Ritesh wrote: ↑Sat Apr 20, 2019 4:03 amThanks for your quick response regarding same.ESP_Sprite wrote: ↑Sat Apr 20, 2019 12:46 amSorry, we don't really have a way to override just one file... overrides happen on component levels only.
Do you have any suggestion or solution to override single file because we need to include that support into existing SDK. Also, It is little bit risky to override whole component in which there are almost core libraries and other source files are present.
Just check from your end if possible otherwise I need to find any alternative solution for same.
Who is online
Users browsing this forum: Google [Bot] and 133 guests