2020-12-10 03:28:15 +00:00
|
|
|
|
|
|
|
|
2021-04-16 02:35:10 +00:00
|
|
|
import subprocess
|
2020-12-10 04:44:35 +00:00
|
|
|
import configparser
|
2021-04-16 02:35:10 +00:00
|
|
|
import traceback
|
|
|
|
import sys
|
2021-04-16 02:59:46 +00:00
|
|
|
from readprops import readProps
|
2021-04-16 02:35:10 +00:00
|
|
|
|
2022-02-14 17:45:29 +00:00
|
|
|
Import("env")
|
|
|
|
env.Replace( MKSPIFFSTOOL=env.get("PROJECT_DIR") + '/bin/mklittlefs.py' )
|
2022-02-18 17:42:24 +00:00
|
|
|
try:
|
|
|
|
import littlefs
|
|
|
|
except ImportError:
|
2022-03-03 04:29:34 +00:00
|
|
|
env.Execute("$PYTHONEXE -m pip install littlefs-python")
|
2022-02-14 17:45:29 +00:00
|
|
|
|
2021-04-16 02:35:10 +00:00
|
|
|
Import("projenv")
|
|
|
|
|
2020-12-10 05:17:43 +00:00
|
|
|
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
2021-05-03 01:50:06 +00:00
|
|
|
verObj = readProps(prefsLoc)
|
2022-06-07 09:26:01 +00:00
|
|
|
print("Using meshtastic platformio-custom.py, firmare version " + verObj['long'])
|
2021-04-16 02:59:46 +00:00
|
|
|
# print("path is" + ','.join(sys.path))
|
2020-12-10 03:28:15 +00:00
|
|
|
|
|
|
|
# General options that are passed to the C and C++ compilers
|
|
|
|
projenv.Append(CCFLAGS=[
|
2021-05-03 01:50:06 +00:00
|
|
|
"-DAPP_VERSION=" + verObj['long'],
|
|
|
|
"-DAPP_VERSION_SHORT=" + verObj['short']
|
2021-04-16 02:35:10 +00:00
|
|
|
])
|