Implement uploading files to file system SPIFFS for ESP8266 // Issue #382
This commit is contained in:
@@ -18,7 +18,7 @@ import atexit
|
||||
import re
|
||||
from glob import glob
|
||||
from os import environ, remove
|
||||
from os.path import basename, join
|
||||
from os.path import basename, isfile, join
|
||||
|
||||
from platformio.util import exec_command, where_is_program
|
||||
|
||||
@@ -190,6 +190,19 @@ def GetCompilerType(env):
|
||||
return None
|
||||
|
||||
|
||||
def GetActualLDScript(env):
|
||||
for f in env.get("LINKFLAGS", []):
|
||||
if f.startswith("-Wl,-T"):
|
||||
script = env.subst(f[6:].replace('"', "").strip())
|
||||
if isfile(script):
|
||||
return script
|
||||
for d in env.get("LIBPATH", []):
|
||||
path = join(env.subst(d), script)
|
||||
if isfile(path):
|
||||
return path
|
||||
return None
|
||||
|
||||
|
||||
def exists(_):
|
||||
return True
|
||||
|
||||
@@ -198,4 +211,5 @@ def generate(env):
|
||||
env.AddMethod(ConvertInoToCpp)
|
||||
env.AddMethod(DumpIDEData)
|
||||
env.AddMethod(GetCompilerType)
|
||||
env.AddMethod(GetActualLDScript)
|
||||
return env
|
||||
|
||||
Reference in New Issue
Block a user