Is there a way to get the current upload_port of my environment passed to the extra_script? I am trying to access this to run python logic against it at compile time.
Also, is there a way to pass variables to the extra_script from the platform.ini environment entry ?
I’ve noticed that print sys.argv[19] in my extra_script.py yields
UPLOAD_PORT=MTkyLjE2OC4xLjExNQ==
It seems obfuscated and I’m unsure if I can use this to get the information I need.
I’m currently using env.AddPreAction("$BUILD_DIR/src/password.o", setPassword)
I’m having problems with those defines set in setPassword like this: env.Append(CPPDEFINES=[('DEFAULT_WIFI_PASS', defaultWifi)])
Instead of setting them in just password.h is there a way to set them globally? I did it once by manipulating the BUILD_FLAGS. I thought there might be a clean way to do this.
Here is the one problem. PIO calls extra script after main scripts are processed. Would be good to have extra_script = pre:/path/to/extra_script.py. Current behaviour is post:/path...