mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-07 19:01:54 -07:00
SDK: Better support for cmsis-dap --nobuild
This commit is contained in:
+9
-5
@@ -222,7 +222,7 @@ distenv.Depends(firmware_flash, enable_debug_target)
|
|||||||
firmware_jflash = distenv.AddJFlashTarget(firmware_env)
|
firmware_jflash = distenv.AddJFlashTarget(firmware_env)
|
||||||
distenv.Alias("jflash", firmware_jflash)
|
distenv.Alias("jflash", firmware_jflash)
|
||||||
|
|
||||||
distenv.PhonyTarget(
|
gdb_trace_all_target = distenv.PhonyTarget(
|
||||||
"gdb_trace_all",
|
"gdb_trace_all",
|
||||||
[["${GDB}", "${GDBOPTS}", "${SOURCES}", "${GDBFLASH}"]],
|
[["${GDB}", "${GDBOPTS}", "${SOURCES}", "${GDBFLASH}"]],
|
||||||
source=firmware_env["FW_ELF"],
|
source=firmware_env["FW_ELF"],
|
||||||
@@ -235,6 +235,7 @@ distenv.PhonyTarget(
|
|||||||
"quit",
|
"quit",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
distenv.Depends(gdb_trace_all_target, enable_debug_target)
|
||||||
|
|
||||||
# Debugging firmware
|
# Debugging firmware
|
||||||
firmware_debug = distenv.PhonyTarget(
|
firmware_debug = distenv.PhonyTarget(
|
||||||
@@ -245,7 +246,7 @@ firmware_debug = distenv.PhonyTarget(
|
|||||||
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
||||||
FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"],
|
FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"],
|
||||||
)
|
)
|
||||||
distenv.Depends(firmware_debug, firmware_flash)
|
distenv.Depends(firmware_debug, enable_debug_target)
|
||||||
|
|
||||||
firmware_blackmagic = distenv.PhonyTarget(
|
firmware_blackmagic = distenv.PhonyTarget(
|
||||||
"blackmagic",
|
"blackmagic",
|
||||||
@@ -269,21 +270,23 @@ debug_other_opts = [
|
|||||||
"fw-version",
|
"fw-version",
|
||||||
]
|
]
|
||||||
|
|
||||||
distenv.PhonyTarget(
|
debug_other_target = distenv.PhonyTarget(
|
||||||
"debug_other",
|
"debug_other",
|
||||||
"${GDBPYCOM}",
|
"${GDBPYCOM}",
|
||||||
GDBOPTS="${GDBOPTS_BASE}",
|
GDBOPTS="${GDBOPTS_BASE}",
|
||||||
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
||||||
GDBPYOPTS=debug_other_opts,
|
GDBPYOPTS=debug_other_opts,
|
||||||
)
|
)
|
||||||
|
distenv.Depends(debug_other_target, enable_debug_target)
|
||||||
|
|
||||||
distenv.PhonyTarget(
|
debug_other_blackmagic_target = distenv.PhonyTarget(
|
||||||
"debug_other_blackmagic",
|
"debug_other_blackmagic",
|
||||||
"${GDBPYCOM}",
|
"${GDBPYCOM}",
|
||||||
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
|
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
|
||||||
GDBREMOTE="${BLACKMAGIC_ADDR}",
|
GDBREMOTE="${BLACKMAGIC_ADDR}",
|
||||||
GDBPYOPTS=debug_other_opts,
|
GDBPYOPTS=debug_other_opts,
|
||||||
)
|
)
|
||||||
|
distenv.Depends(debug_other_blackmagic_target, enable_debug_target)
|
||||||
|
|
||||||
|
|
||||||
# Just start OpenOCD
|
# Just start OpenOCD
|
||||||
@@ -467,13 +470,14 @@ distenv.Depends(get_blackmagic_target, enable_debug_target)
|
|||||||
|
|
||||||
|
|
||||||
# Find STLink probe ids
|
# Find STLink probe ids
|
||||||
distenv.PhonyTarget(
|
get_stlink_target = distenv.PhonyTarget(
|
||||||
"get_stlink",
|
"get_stlink",
|
||||||
distenv.Action(
|
distenv.Action(
|
||||||
lambda **_: distenv.GetDevices(),
|
lambda **_: distenv.GetDevices(),
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
distenv.Depends(get_stlink_target, enable_debug_target)
|
||||||
|
|
||||||
# Prepare vscode environment
|
# Prepare vscode environment
|
||||||
vscode_dist = distenv.Install(
|
vscode_dist = distenv.Install(
|
||||||
|
|||||||
+2
-2
@@ -73,9 +73,9 @@ FBT_TOOLCHAIN_VERSIONS = (" 12.3.", " 13.2.")
|
|||||||
|
|
||||||
OPENOCD_OPTS = [
|
OPENOCD_OPTS = [
|
||||||
"-f",
|
"-f",
|
||||||
"interface/stlink.cfg",
|
"interface/cmsis-dap.cfg",
|
||||||
"-c",
|
"-c",
|
||||||
"transport select hla_swd",
|
"transport select swd",
|
||||||
"-f",
|
"-f",
|
||||||
"${FBT_DEBUG_DIR}/stm32wbx.cfg",
|
"${FBT_DEBUG_DIR}/stm32wbx.cfg",
|
||||||
"-c",
|
"-c",
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ firmware_debug = dist_env.PhonyTarget(
|
|||||||
GDBOPTS="${GDBOPTS_BASE}",
|
GDBOPTS="${GDBOPTS_BASE}",
|
||||||
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
||||||
)
|
)
|
||||||
|
dist_env.Depends(firmware_debug, enable_debug_target)
|
||||||
|
|
||||||
blackmagic_target = dist_env.PhonyTarget(
|
blackmagic_target = dist_env.PhonyTarget(
|
||||||
"blackmagic",
|
"blackmagic",
|
||||||
@@ -197,21 +198,23 @@ debug_other_opts = [
|
|||||||
"fw-version",
|
"fw-version",
|
||||||
]
|
]
|
||||||
|
|
||||||
dist_env.PhonyTarget(
|
debug_other_target = dist_env.PhonyTarget(
|
||||||
"debug_other",
|
"debug_other",
|
||||||
"${GDBPYCOM}",
|
"${GDBPYCOM}",
|
||||||
GDBOPTS="${GDBOPTS_BASE}",
|
GDBOPTS="${GDBOPTS_BASE}",
|
||||||
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
GDBREMOTE="${OPENOCD_GDB_PIPE}",
|
||||||
GDBPYOPTS=debug_other_opts,
|
GDBPYOPTS=debug_other_opts,
|
||||||
)
|
)
|
||||||
|
dist_env.Depends(debug_other_target, enable_debug_target)
|
||||||
|
|
||||||
dist_env.PhonyTarget(
|
debug_other_blackmagic_target = dist_env.PhonyTarget(
|
||||||
"debug_other_blackmagic",
|
"debug_other_blackmagic",
|
||||||
"${GDBPYCOM}",
|
"${GDBPYCOM}",
|
||||||
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
|
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
|
||||||
GDBREMOTE="${BLACKMAGIC_ADDR}",
|
GDBREMOTE="${BLACKMAGIC_ADDR}",
|
||||||
GDBPYOPTS=debug_other_opts,
|
GDBPYOPTS=debug_other_opts,
|
||||||
)
|
)
|
||||||
|
dist_env.Depends(debug_other_blackmagic_target, enable_debug_target)
|
||||||
|
|
||||||
flash_usb_full = dist_env.UsbInstall(
|
flash_usb_full = dist_env.UsbInstall(
|
||||||
dist_env["UFBT_STATE_DIR"].File("usbinstall"),
|
dist_env["UFBT_STATE_DIR"].File("usbinstall"),
|
||||||
|
|||||||
Reference in New Issue
Block a user