mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-24 01:28:11 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
from SCons.Script import Action, Builder
|
||||
|
||||
|
||||
def exists(env):
|
||||
return True
|
||||
|
||||
|
||||
def DoxyBuild(env, target, source, doxy_env_variables=None):
|
||||
if doxy_env_variables:
|
||||
doxy_env = env.Clone()
|
||||
doxy_env.Append(ENV=doxy_env_variables)
|
||||
else:
|
||||
doxy_env = env
|
||||
|
||||
return doxy_env._DoxyBuilder(target, source)
|
||||
|
||||
|
||||
def generate(env):
|
||||
if not env["VERBOSE"]:
|
||||
env.SetDefault(
|
||||
DOXYGENCOMSTR="\tDOXY\t${TARGET}",
|
||||
)
|
||||
|
||||
env.SetDefault(
|
||||
DOXYGEN="doxygen",
|
||||
)
|
||||
|
||||
env.AddMethod(DoxyBuild)
|
||||
env.Append(
|
||||
BUILDERS={
|
||||
"_DoxyBuilder": Builder(
|
||||
action=[
|
||||
Action(
|
||||
[["$DOXYGEN", "$SOURCE"]],
|
||||
"$DOXYGENCOMSTR",
|
||||
),
|
||||
],
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -18,7 +18,7 @@ def GetDevices(env):
|
||||
def generate(env, **kw):
|
||||
env.AddMethod(GetDevices)
|
||||
env.SetDefault(
|
||||
FBT_DEBUG_DIR="${FBT_SCRIPT_DIR}/debug",
|
||||
FBT_DEBUG_DIR="${POSIXPATH('$FBT_SCRIPT_DIR')}/debug",
|
||||
)
|
||||
|
||||
if (adapter_serial := env.subst("$SWD_TRANSPORT_SERIAL")) != "auto":
|
||||
@@ -36,11 +36,11 @@ def generate(env, **kw):
|
||||
|
||||
env.SetDefault(
|
||||
OPENOCD_GDB_PIPE=[
|
||||
"|openocd -c 'gdb_port pipe; log_output ${FBT_DEBUG_DIR}/openocd.log' ${[SINGLEQUOTEFUNC(OPENOCD_OPTS)]}"
|
||||
"|openocd -c 'gdb_port pipe; log_output ${POSIXPATH('$FBT_DEBUG_DIR')}/openocd.log' ${[SINGLEQUOTEFUNC(OPENOCD_OPTS)]}"
|
||||
],
|
||||
GDBOPTS_BASE=[
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/gdbinit",
|
||||
"source ${POSIXPATH('$FBT_DEBUG_DIR')}/gdbinit",
|
||||
"-ex",
|
||||
"target extended-remote ${GDBREMOTE}",
|
||||
],
|
||||
@@ -57,17 +57,17 @@ def generate(env, **kw):
|
||||
],
|
||||
GDBPYOPTS=[
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/FreeRTOS/FreeRTOS.py",
|
||||
"source ${POSIXPATH('$FBT_DEBUG_DIR')}/FreeRTOS/FreeRTOS.py",
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/flipperapps.py",
|
||||
"source ${POSIXPATH('$FBT_DEBUG_DIR')}/flipperapps.py",
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/flipperversion.py",
|
||||
"source ${POSIXPATH('$FBT_DEBUG_DIR')}/flipperversion.py",
|
||||
"-ex",
|
||||
"fap-set-debug-elf-root ${FBT_FAP_DEBUG_ELF_ROOT}",
|
||||
"fap-set-debug-elf-root ${POSIXPATH('$FBT_FAP_DEBUG_ELF_ROOT')}",
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/PyCortexMDebug/PyCortexMDebug.py",
|
||||
"source ${POSIXPATH('$FBT_DEBUG_DIR')}/PyCortexMDebug/PyCortexMDebug.py",
|
||||
"-ex",
|
||||
"svd_load ${SVD_FILE}",
|
||||
"svd_load ${POSIXPATH('$SVD_FILE')}",
|
||||
"-ex",
|
||||
"compare-sections",
|
||||
"-ex",
|
||||
|
||||
@@ -6,7 +6,7 @@ import shutil
|
||||
|
||||
from fbt.sdk.cache import SdkCache
|
||||
from fbt.sdk.collector import SdkCollector
|
||||
from fbt.util import path_as_posix
|
||||
from fbt.util import PosixPathWrapper
|
||||
from SCons.Action import Action
|
||||
from SCons.Builder import Builder
|
||||
from SCons.Errors import UserError
|
||||
@@ -80,7 +80,7 @@ class SdkMeta:
|
||||
vars,
|
||||
target=Entry(self.MAP_FILE_SUBST),
|
||||
)
|
||||
return path_as_posix(expanded_vars)
|
||||
return PosixPathWrapper.fixup_separators(expanded_vars)
|
||||
|
||||
|
||||
class SdkTreeBuilder:
|
||||
@@ -149,7 +149,7 @@ class SdkTreeBuilder:
|
||||
meta.save_to(self.target[0].path)
|
||||
|
||||
def build_sdk_file_path(self, orig_path: str) -> str:
|
||||
return path_as_posix(
|
||||
return PosixPathWrapper.fix_path(
|
||||
posixpath.normpath(
|
||||
posixpath.join(
|
||||
self.SDK_DIR_SUBST,
|
||||
|
||||
@@ -32,7 +32,7 @@ def atexist_handler():
|
||||
|
||||
for bf in GetBuildFailures():
|
||||
for node in Flatten(bf.node):
|
||||
if node.exists and node.name.endswith(".html"):
|
||||
if node.exists and "pvs" in node.name and node.name.endswith(".html"):
|
||||
# macOS
|
||||
if sys.platform == "darwin":
|
||||
subprocess.run(["open", node.abspath])
|
||||
|
||||
Reference in New Issue
Block a user