mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 15:04:19 +00:00
Merge branch 'fz-dev' into dev
This commit is contained in:
commit
038d098c85
6 changed files with 38 additions and 4 deletions
|
@ -166,4 +166,4 @@ Games:
|
||||||
- `site_scons` - Build helpers
|
- `site_scons` - Build helpers
|
||||||
- `scripts` - Supplementary scripts and python libraries home
|
- `scripts` - Supplementary scripts and python libraries home
|
||||||
|
|
||||||
Also pay attention to `ReadMe.md` files inside of those directories.
|
Also pay attention to `ReadMe.md` files inside those directories.
|
||||||
|
|
|
@ -14,4 +14,4 @@ def resolve_port(logger, portname: str = "auto"):
|
||||||
logger.error("Failed to find connected Flipper")
|
logger.error("Failed to find connected Flipper")
|
||||||
elif len(flippers) > 1:
|
elif len(flippers) > 1:
|
||||||
logger.error("More than one Flipper is attached")
|
logger.error("More than one Flipper is attached")
|
||||||
logger.error("Failed to guess which port to use. Specify --port")
|
logger.error("Failed to guess which port to use")
|
||||||
|
|
|
@ -1,13 +1,25 @@
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
from flipper.utils.cdc import resolve_port
|
from flipper.utils.cdc import resolve_port
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
if not (port := resolve_port(logger, "auto")):
|
if not (port := resolve_port(logger, "auto")):
|
||||||
|
logger.error("Is Flipper connected over USB and isn't in DFU mode?")
|
||||||
return 1
|
return 1
|
||||||
subprocess.call(["python3", "-m", "serial.tools.miniterm", "--raw", port, "230400"])
|
subprocess.call(
|
||||||
|
[
|
||||||
|
os.path.basename(sys.executable),
|
||||||
|
"-m",
|
||||||
|
"serial.tools.miniterm",
|
||||||
|
"--raw",
|
||||||
|
port,
|
||||||
|
"230400",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -32,6 +32,7 @@ if not "%REAL_TOOLCHAIN_VERSION%" == "%FLIPPER_TOOLCHAIN_VERSION%" (
|
||||||
set "HOME=%USERPROFILE%"
|
set "HOME=%USERPROFILE%"
|
||||||
set "PYTHONHOME=%FBT_TOOLCHAIN_ROOT%\python"
|
set "PYTHONHOME=%FBT_TOOLCHAIN_ROOT%\python"
|
||||||
set "PYTHONPATH="
|
set "PYTHONPATH="
|
||||||
|
set "PYTHONNOUSERSITE=1"
|
||||||
set "PATH=%FBT_TOOLCHAIN_ROOT%\python;%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\protoc\bin;%FBT_TOOLCHAIN_ROOT%\openocd\bin;%PATH%"
|
set "PATH=%FBT_TOOLCHAIN_ROOT%\python;%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\protoc\bin;%FBT_TOOLCHAIN_ROOT%\openocd\bin;%PATH%"
|
||||||
set "PROMPT=(fbt) %PROMPT%"
|
set "PROMPT=(fbt) %PROMPT%"
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,13 @@ fbtenv_restore_env()
|
||||||
elif [ -n "${PROMPT:-""}" ]; then
|
elif [ -n "${PROMPT:-""}" ]; then
|
||||||
PROMPT="$(echo "$PROMPT" | sed 's/\[fbt\]//g')";
|
PROMPT="$(echo "$PROMPT" | sed 's/\[fbt\]//g')";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PYTHONNOUSERSITE="$SAVED_PYTHONNOUSERSITE";
|
||||||
|
PYTHONPATH="$SAVED_PYTHONPATH";
|
||||||
|
|
||||||
|
unset SAVED_PYTHONNOUSERSITE;
|
||||||
|
unset SAVED_PYTHONPATH;
|
||||||
|
|
||||||
unset SCRIPT_PATH;
|
unset SCRIPT_PATH;
|
||||||
unset FBT_TOOLCHAIN_VERSION;
|
unset FBT_TOOLCHAIN_VERSION;
|
||||||
unset FBT_TOOLCHAIN_PATH;
|
unset FBT_TOOLCHAIN_PATH;
|
||||||
|
@ -286,6 +293,12 @@ fbtenv_main()
|
||||||
PATH="$TOOLCHAIN_ARCH_DIR/bin:$PATH";
|
PATH="$TOOLCHAIN_ARCH_DIR/bin:$PATH";
|
||||||
PATH="$TOOLCHAIN_ARCH_DIR/protobuf/bin:$PATH";
|
PATH="$TOOLCHAIN_ARCH_DIR/protobuf/bin:$PATH";
|
||||||
PATH="$TOOLCHAIN_ARCH_DIR/openocd/bin:$PATH";
|
PATH="$TOOLCHAIN_ARCH_DIR/openocd/bin:$PATH";
|
||||||
|
|
||||||
|
SAVED_PYTHONNOUSERSITE="${PYTHONNOUSERSITE:-""}";
|
||||||
|
SAVED_PYTHONPATH="${PYTHONPATH:-""}";
|
||||||
|
|
||||||
|
PYTHONNOUSERSITE=1;
|
||||||
|
PYTHONPATH=;
|
||||||
}
|
}
|
||||||
|
|
||||||
fbtenv_main "${1:-""}";
|
fbtenv_main "${1:-""}";
|
||||||
|
|
|
@ -12,7 +12,15 @@ forward_os_env = {
|
||||||
"PATH": os.environ["PATH"],
|
"PATH": os.environ["PATH"],
|
||||||
}
|
}
|
||||||
# Proxying CI environment to child processes & scripts
|
# Proxying CI environment to child processes & scripts
|
||||||
for env_value_name in ("WORKFLOW_BRANCH_OR_TAG", "DIST_SUFFIX", "CUSTOM_FLIPPER_NAME", "HOME", "APPDATA"):
|
for env_value_name in (
|
||||||
|
"WORKFLOW_BRANCH_OR_TAG",
|
||||||
|
"DIST_SUFFIX",
|
||||||
|
"CUSTOM_FLIPPER_NAME",
|
||||||
|
"HOME",
|
||||||
|
"APPDATA",
|
||||||
|
"PYTHONHOME",
|
||||||
|
"PYTHONNOUSERSITE",
|
||||||
|
):
|
||||||
if environ_value := os.environ.get(env_value_name, None):
|
if environ_value := os.environ.get(env_value_name, None):
|
||||||
forward_os_env[env_value_name] = environ_value
|
forward_os_env[env_value_name] = environ_value
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue