First up, let me just say that I’m blown away by Platform IO! Well done!
I notice that if I make changes to the platformio.ini file, it forces me to do a full clean re-build of my code base.
Am I missing something? I’d prefer not to have to wait 10+ minutes for a clean re-build every time, so I wonder if this can be disabled? Or maybe I’m being ignorant and there’s a really good reason for it?
platformio.ini contains many settings that require a complete rebuild of the project if they are changed. Examples are build flags, libraries, framework. You will also find that other build system such as maven behave in a similar fashion.
platformio.ini also contains settings that do not require a rebuild if changed, e.g. the upload port. However, PlatformIO does not keep the previous
platformio.ini version and does not have the smarts to decide if the difference require a rebuild. So any change will lead to a rebuild.
I find that I rarely need to change
platformio.ini. Therefore, rebuilds are hardly an issue. What do need to change so frequently that it is an issue?
Rebuild duration of more than 10 minutes sounds rather high as well. Am I correct in assuming that:
- You are using a heavy-weight framework like ESP-IDF or mbed
- You are running PlatformIO on a Windows computer with 8 GB of RAM and an active virus scanner.
Thanks for the detailed reply, appreciate it!
This sounds fair. I think it was just getting to know the platform and the initial project set up that caused me to make so many changes. For example I wanted to create a second build for a different dev board, change the default build to be debug, and needed to change the port. So when I was starting out, it was a bit of trial and error. It shouldn’t be so much of a problem once the project is underway though and now that I know what parameters work, I can easily copy and paste between projects.
I agree, 10 minute compiles are a killer and you are absolutely correct, I am using Mbed which is contributing so much to this. The PC I am using is decent enough with 16GB or RAM and I’m due for an upgrade soon so maybe this might help alleviate.
I agree! I just moved my project over to PlatformIO and I’m almost in shock about how fabulous it is!
I too have noticed that it recompiles everything after particulate edits. But (on my 2020 iMac) this takes just two seconds for about 4000 lines of code plus several big libraries - so I’m wondering how yours manages to take a full 10 minutes. Is it very very huge code?!
Mbed is supposed to take 10 min or more on the first build. In my experience, it is supposed to tske a few seconds afterwards