An open source ecosystem for IoT development. Cross-platform code builder and library manager. Continuous and IDE integration. Arduino and MBED compatible. Ready for Cloud compiling.
SOLVED. here is how i did:
I added extra_scripts = prepost.py
to my [env:####] in platformio.ini under my project directory.
Then I wrote this simple Python script that calls up my shell script for the target uploadfs, prior to the upload:
``
Import("env")
import subprocess
def before_upload(source, target, env):
subprocess.call("./prep_spiffs.sh")
env.AddPreAction("uploadfs", before_upload)
``