Handle upload_flags option in platformio.ini // Resolve #368

This commit is contained in:
Ivan Kravets
2015-12-11 15:17:38 +02:00
parent e69bc34678
commit 9cc9912ef2
3 changed files with 12 additions and 2 deletions

View File

@ -4,6 +4,12 @@ Release History
PlatformIO 2.0
--------------
2.5.1 (2015-12-??)
~~~~~~~~~~~~~~~~~~
* Handle ``upload_flags`` option in `platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`_
(`issue #368 <https://github.com/platformio/platformio/issues/368>`_)
2.5.0 (2015-12-08)
~~~~~~~~~~~~~~~~~~

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION = (2, 5, 0)
VERSION = (2, 5, "1.dev0")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -76,7 +76,8 @@ commonvars.AddVariables(
# upload options
("UPLOAD_PORT",),
("UPLOAD_PROTOCOL",),
("UPLOAD_SPEED",)
("UPLOAD_SPEED",),
("UPLOAD_FLAGS",)
)
DefaultEnvironment(
@ -161,6 +162,9 @@ env.SConscriptChdir(0)
env.SConsignFile(join("$PIOENVS_DIR", ".sconsign.dblite"))
env.SConscript("$BUILD_SCRIPT")
if "UPLOAD_FLAGS" in env:
env.Append(UPLOADERFLAGS=["$UPLOAD_FLAGS"])
if environ.get("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT")):
env.SConscript(
environ.get("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT")))