Hi!
I’m trying to debug mbed application with Nucleo-F429Zi and platformio.
Rebuild of the project is painfully slow due the size of mbed framework.
So I decided to choose build_type = debug in platformio.ini.
After successfully build I tried to start debug.
The debug process started as usual build and finished in terminal.
But then pio started the same build task in DEBUG CONSOLE with full project rebuild!
And after this second build it started the debugging, but then if you want to build your project it start to rebuild again.
@copperbot-d thanks for the fast answer.
That is not helped.
With skipping pre-debug it is not starting the build process in the regular console but it still running full rebuild in the debug console.
Please be aware that this response is now deprecated, as PIO now support natively .mbedignore files. More info here.
If you are looking for a working .mbedignore for Mbed 6.17, try this one.
OLD RESPONSE
By the way, not related to this specific issue, but regarding MBED framework build time: you can reduce it, using a script originally made by @KKoovalsky which apply a .mbedignore file inside mbed-framework folder from a PIO project.
Copy mbedignore_examples/PIO_MBED_6.6/.mbedignore file to the root of your PIO project.
Copy mbedignore.py script to the root of your PIO project.
Edit your platformio.ini and add this line:
extra_scripts = pre:mbedignore.py
That should reduce the build time. Check the README for more info. You may need to edit the .mbedignore file if you want to skip other components during the build.
Another option, if you don’t need MBED RTOS, you can just use MBED 6 bare metal profile, see this response.
@anikinmd do you have another PIO core installation in your system ? I just resolve the issue by deactivate Built-in PIOCore and Builtin Python in my VSCode PIO extension settings.
Needed to say that i installed the second pio core yesterday (I tryed to use CLion with pio instead of VSCode). The issue was found before I installed the second core.
Well, actually I first tried to deactivate my PIO core installation (remove python3.8 from my system path), to only have the built-in one of VSCode… and indeed I was still having this issue. So maybe there is a problem elsewhere.
It’s like VSCode always have two python environments when using PIO (even if I remove my global one), and got mad when switching between “pre-build” and “PIO debug”. Maybe it is related to this issue, it seems to appear mostly on Windows.
Deactivate built-in functionnality of the extension seems to work great, and force VSCode to look at the global python installation instead (with the PIO CORE). But new user who discovers PIO with VScode, and already have a python installation on their windows OS, could be facing the same issue.
I just created an account to say that THIS IS FIRE!
This script reduced my compiling time from 40 to 5 seconds
Im working on a big project, rebuilding every 3 minute and this is awesome!