Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'ul_dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Mar 2, 2024
2 parents 40de14d + 88b354b commit 2522504
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 67 deletions.
61 changes: 52 additions & 9 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ if GetOption("fullenv") or any(

# Target for self-update package
dist_basic_arguments = [
"${ARGS}",
"--bundlever",
"${UPDATE_VERSION_STRING}",
]
Expand Down Expand Up @@ -182,6 +183,7 @@ fap_deploy = distenv.PhonyTarget(
"send",
"${SOURCE}",
"/ext/apps",
"${ARGS}",
]
]
),
Expand All @@ -208,7 +210,7 @@ distenv.Alias("jflash", firmware_jflash)

distenv.PhonyTarget(
"gdb_trace_all",
"$GDB $GDBOPTS $SOURCES $GDBFLASH",
[["${GDB}", "${GDBOPTS}", "${SOURCES}", "${GDBFLASH}"]],
source=firmware_env["FW_ELF"],
GDBOPTS="${GDBOPTS_BASE}",
GDBREMOTE="${OPENOCD_GDB_PIPE}",
Expand Down Expand Up @@ -272,19 +274,35 @@ distenv.PhonyTarget(
# Just start OpenOCD
distenv.PhonyTarget(
"openocd",
"${OPENOCDCOM}",
[["${OPENOCDCOM}", "${ARGS}"]],
)

# Linter
distenv.PhonyTarget(
"lint",
[["${PYTHON3}", "${FBT_SCRIPT_DIR}/lint.py", "check", "${LINT_SOURCES}"]],
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/lint.py",
"check",
"${LINT_SOURCES}",
"${ARGS}",
]
],
LINT_SOURCES=[n.srcnode() for n in firmware_env["LINT_SOURCES"]],
)

distenv.PhonyTarget(
"format",
[["${PYTHON3}", "${FBT_SCRIPT_DIR}/lint.py", "format", "${LINT_SOURCES}"]],
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/lint.py",
"format",
"${LINT_SOURCES}",
"${ARGS}",
]
],
LINT_SOURCES=[n.srcnode() for n in firmware_env["LINT_SOURCES"]],
)

Expand All @@ -307,7 +325,16 @@ firmware_env.Append(
)


black_commandline = "@${PYTHON3} -m black ${PY_BLACK_ARGS} ${PY_LINT_SOURCES}"
black_commandline = [
[
"@${PYTHON3}",
"-m",
"black",
"${PY_BLACK_ARGS}",
"${PY_LINT_SOURCES}",
"${ARGS}",
]
]
black_base_args = [
"--include",
'"(\\.scons|\\.py|SConscript|SConstruct|\\.fam)$"',
Expand All @@ -333,12 +360,28 @@ distenv.PhonyTarget(

# Start Flipper CLI via PySerial's miniterm
distenv.PhonyTarget(
"cli", [["${PYTHON3}", "${FBT_SCRIPT_DIR}/serial_cli.py", "-p", "${FLIP_PORT}"]]
"cli",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/serial_cli.py",
"-p",
"${FLIP_PORT}",
"${ARGS}",
]
],
)

# Update WiFi devboard firmware
# Update WiFi devboard firmware with release channel
distenv.PhonyTarget(
"devboard_flash", [["${PYTHON3}", "${FBT_SCRIPT_DIR}/wifi_board.py"]]
"devboard_flash",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/wifi_board.py",
"${ARGS}",
]
],
)


Expand All @@ -353,7 +396,7 @@ distenv.PhonyTarget(
distenv.PhonyTarget(
"get_stlink",
distenv.Action(
lambda **kw: distenv.GetDevices(),
lambda **_: distenv.GetDevices(),
None,
),
)
Expand Down
2 changes: 2 additions & 0 deletions applications/services/gui/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ Canvas* gui_direct_draw_acquire(Gui* gui) {
gui->direct_draw = true;
gui_unlock(gui);

canvas_set_orientation(gui->canvas, CanvasOrientationHorizontal);
canvas_frame_set(gui->canvas, 0, 0, GUI_DISPLAY_WIDTH, GUI_DISPLAY_HEIGHT);
canvas_reset(gui->canvas);
canvas_commit(gui->canvas);

Expand Down
3 changes: 3 additions & 0 deletions scripts/fbt_tools/fbt_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def generate(env):
"--interface=${SWD_TRANSPORT}",
"--serial=${SWD_TRANSPORT_SERIAL}",
"${SOURCE}",
"${ARGS}",
],
Touch("${TARGET}"),
]
Expand All @@ -162,6 +163,7 @@ def generate(env):
"-p",
"${FLIP_PORT}",
"${UPDATE_BUNDLE_DIR}/update.fuf",
"${ARGS}",
],
Touch("${TARGET}"),
]
Expand All @@ -180,6 +182,7 @@ def generate(env):
"--stack_type=${COPRO_STACK_TYPE}",
"--stack_file=${COPRO_STACK_BIN}",
"--stack_addr=${COPRO_STACK_ADDR}",
"${ARGS}",
]
],
"${COPROCOMSTR}",
Expand Down
41 changes: 36 additions & 5 deletions scripts/ufbt/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -316,26 +316,56 @@ else:

appenv.PhonyTarget(
"cli",
[["${PYTHON3}", "${FBT_SCRIPT_DIR}/serial_cli.py", "-p", "${FLIP_PORT}"]],
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/serial_cli.py",
"-p",
"${FLIP_PORT}",
"${ARGS}",
]
],
)

# Update WiFi devboard firmware
dist_env.PhonyTarget(
"devboard_flash", [["${PYTHON3}", "${FBT_SCRIPT_DIR}/wifi_board.py"]]
"devboard_flash",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/wifi_board.py",
"${ARGS}",
]
],
)

# Linter

dist_env.PhonyTarget(
"lint",
[["${PYTHON3}", "${FBT_SCRIPT_DIR}/lint.py", "check", "${LINT_SOURCES}"]],
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/lint.py",
"check",
"${LINT_SOURCES}",
"${ARGS}",
]
],
source=original_app_dir.File(".clang-format"),
LINT_SOURCES=[original_app_dir],
)

dist_env.PhonyTarget(
"format",
[["${PYTHON3}", "${FBT_SCRIPT_DIR}/lint.py", "format", "${LINT_SOURCES}"]],
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/lint.py",
"format",
"${LINT_SOURCES}",
"${ARGS}",
]
],
source=original_app_dir.File(".clang-format"),
LINT_SOURCES=[original_app_dir],
)
Expand Down Expand Up @@ -457,6 +487,7 @@ if dolphin_src_dir.exists():
"send",
"${SOURCE}",
"/ext/dolphin",
"${ARGS}",
]
],
source=ufbt_build_dir.Dir("dolphin"),
Expand Down
3 changes: 2 additions & 1 deletion scripts/ufbt/site_tools/ufbt_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
debug, debug_other, blackmagic:
Start GDB
devboard_flash:
Update WiFi dev board with the latest firmware
Update WiFi dev board.
Supports ARGS="..." to pass extra arguments to the update script, e.g. ARGS="-c dev"
Other:
cli:
Expand Down
Loading

0 comments on commit 2522504

Please sign in to comment.