PlatformIO and custom compilation
Moderators: grovkillen, Stuntteam, TD-er
PlatformIO and custom compilation
Hello,
A simple question
I use PlatformIO to make my custom firmware.
But I'm using a version of the Github repository that is quite old.
The question I have is, each time I launch PlatformIO and my new firmware, is there a package update or do I have to copy the repository from time to time?
Regards
A simple question
I use PlatformIO to make my custom firmware.
But I'm using a version of the Github repository that is quite old.
The question I have is, each time I launch PlatformIO and my new firmware, is there a package update or do I have to copy the repository from time to time?
Regards
Re: PlatformIO and custom compilation
I'm not 100% sure I understand what you're asking.
Did you make changes to ESPEasy for your builds?
Or is it just changing the Custom.h file?
If it is just the Custom.h file, you can just fetch the latest sources and build it.
If you have made changes to ESPEasy, then I would suggest you work on a fork of the repository using Git and make a branch for yourself.
Then when you want to update the ESPEasy sources to the latest version, you just fetch and pull the 'mega' branch and then merge this 'mega' branch into your own branch.
Git will then identify any possible merge issues, or even try to handle those merge issues itself.
Did you make changes to ESPEasy for your builds?
Or is it just changing the Custom.h file?
If it is just the Custom.h file, you can just fetch the latest sources and build it.
If you have made changes to ESPEasy, then I would suggest you work on a fork of the repository using Git and make a branch for yourself.
Then when you want to update the ESPEasy sources to the latest version, you just fetch and pull the 'mega' branch and then merge this 'mega' branch into your own branch.
Git will then identify any possible merge issues, or even try to handle those merge issues itself.
Re: PlatformIO and custom compilation
For building (and optionally improving) ESPEasy using VSCode with PlatformIO and Github we have a documentation page: https://espeasy.readthedocs.io/en/lates ... ormIO.html
/Ton (PayPal.me)
Re: PlatformIO and custom compilation
I don't touch the code itself.
Only Custom.h
It's just a question of knowing whether I have to update all the mega files from time to time to benefit from corrections and new features, or whether the compilation takes care of updating my local files before compiling them.
Thanks Ath, I'll have a look at that link.
I'd like my local to always be updated with the latest available files.
Only Custom.h
It's just a question of knowing whether I have to update all the mega files from time to time to benefit from corrections and new features, or whether the compilation takes care of updating my local files before compiling them.
Thanks Ath, I'll have a look at that link.
I'd like my local to always be updated with the latest available files.
Re: PlatformIO and custom compilation
Just make sure to checkout the files using Git and not just downloading ZIP files from the release page.
Sometimes files get renamed or moved, so when copying a ZIP file over the old source code tree will then result in build issues and I've seen some issues when using ZIP files from the releases pages.
Sometimes files get renamed or moved, so when copying a ZIP file over the old source code tree will then result in build issues and I've seen some issues when using ZIP files from the releases pages.
Re: PlatformIO and custom compilation
So the recommendation is to save my Custom.h
Delete local content
Download the ZIP
Unzip it
replace my Custom.h
Compare Custom-sample.h to see if there are any new features.
and compile Custom.
And check for new versions from time to time.
Delete local content
Download the ZIP
Unzip it
replace my Custom.h
Compare Custom-sample.h to see if there are any new features.
and compile Custom.
And check for new versions from time to time.
Re: PlatformIO and custom compilation
And download the ZIP from GitHub, not from the releases page.
Re: PlatformIO and custom compilation
Yes, that's no problem, I'm used to it.
Regards
Regards
Re: PlatformIO and custom compilation
Well, if you don't intend/expect to change any of the ESPEasy code, you can also clone the repository to your computer, either via a fork, as described in the Development docs, or directly from the letscontrolit/ESPEasy repository, like this: (you'll need to have git installed on your system)
(NB: /development is just an example)
Then you can copy your Custom.h in the /development/ESPEasy/src folder, and use VSCode/PlatformIO to build the desired Custom environment.
To update your local repo, you would use these commands:
Then you can just rebuild, as the Custom.h file is still intact, because it's excluded from git updates or commits.
IMHO, this method is less work and less error-prone than downloading and extracting a zip file
Code: Select all
cd /development
git clone https://github.com/letscontrolit/ESPEasy
Then you can copy your Custom.h in the /development/ESPEasy/src folder, and use VSCode/PlatformIO to build the desired Custom environment.
To update your local repo, you would use these commands:
Code: Select all
cd /development/ESPEasy
git pull
IMHO, this method is less work and less error-prone than downloading and extracting a zip file
/Ton (PayPal.me)
Re: PlatformIO and custom compilation
Thank you for all this additional information.
And you confirmed that there is no automatic update before compilation.
That was my question, and I have my answer.
Now it's up to me to maintain the local sources.
Best Regards
And you confirmed that there is no automatic update before compilation.
That was my question, and I have my answer.
Now it's up to me to maintain the local sources.
Best Regards
Re: PlatformIO and custom compilation
Well, in VSCode there's the Sync button to update the repo, but that shouldn't be automatic, that should be up to you.
/Ton (PayPal.me)
Re: PlatformIO and custom compilation
I try
[Update]
I don't have this option
[Update 2]
my repository is probably not properly configured, I'm looking into it.
[Update]
I don't have this option
[Update 2]
my repository is probably not properly configured, I'm looking into it.
- Attachments
-
- Capture d’écran du 2024-09-26 22-31-29.png (15.53 KiB) Viewed 2067 times
-
- Capture d’écran du 2024-09-26 22-32-18.png (24.33 KiB) Viewed 2067 times
Re: PlatformIO and custom compilation
You'll see that option when opening the cloned git repo locally, you won't get that on an unzipped directory structure
/Ton (PayPal.me)
Re: PlatformIO and custom compilation
Okay, I'll watch it quietly after a good night's sleep.
Regards
Regards
Re: PlatformIO and custom compilation
Until I fully understand the Update mode above and get things right, downloading the ZIP, deleting the folder, decompressing the ZIP and comparing Custom.h is fine for the moment.
I don't compile every day, but only occasionally when I'm testing a new project or adding a device.
Thanks for all your advice and help on this update issue.
Best Regards
I don't compile every day, but only occasionally when I'm testing a new project or adding a device.
Thanks for all your advice and help on this update issue.
Best Regards
Who is online
Users browsing this forum: No registered users and 0 guests