mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
Убрал ошибку при одновременной сборки с ФС
This commit is contained in:
@@ -2,6 +2,17 @@
|
|||||||
import os
|
import os
|
||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
|
def before_build(): # source, target, env
|
||||||
|
print("Current Build targets", BUILD_TARGETS)
|
||||||
|
# Это всё потому что не работает "buildprog". При сборке прошивки Targets пустой, на всякий случай исключим все остальные
|
||||||
|
if (BUILD_TARGETS == ['upload'] or
|
||||||
|
BUILD_TARGETS == ['buildfs'] or
|
||||||
|
BUILD_TARGETS == ['uploadfs'] or
|
||||||
|
BUILD_TARGETS == ['uploadfsota'] or
|
||||||
|
BUILD_TARGETS == ['size']):
|
||||||
|
return
|
||||||
|
|
||||||
|
print("Clear BUILD_TIME, delete main.o !")
|
||||||
config = configparser.ConfigParser() # создаём объекта парсера INI
|
config = configparser.ConfigParser() # создаём объекта парсера INI
|
||||||
config.read("platformio.ini")
|
config.read("platformio.ini")
|
||||||
deviceName = config["platformio"]["default_envs"]
|
deviceName = config["platformio"]["default_envs"]
|
||||||
@@ -11,3 +22,7 @@ try:
|
|||||||
except OSError as e:
|
except OSError as e:
|
||||||
# If it fails, inform the user.
|
# If it fails, inform the user.
|
||||||
print("Error: %s - %s." % (e.filename, e.strerror))
|
print("Error: %s - %s." % (e.filename, e.strerror))
|
||||||
|
|
||||||
|
#env.AddPreAction("buildprog", before_build) # $BUILD_DIR/src/main.cpp.o
|
||||||
|
|
||||||
|
before_build()
|
||||||
Reference in New Issue
Block a user