I want to use advanced scripting to add a custom target as described here Custom Targets — PlatformIO latest documentation
It works fine. I can do
pio run -t my_custom_target -e my_environment and it does what I want. But when I execute
pio run -t upload -e my_environment it also executes my custom script before uploading the firmware. But I don’t want it to do that. How can I accomplish that? The script should be independent of the build and upload process.
Thank you very much!