mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
[FL-3299] furi_crash: added C2 status; added fw-version gdb command (#2638)
* furi_crash: added C2 status * debug: Added "fw-version" gdb command; vscode: updated configuration to use new command * debug: added fw-info command to debug_other session * Toolbox: versioned structure for Version * debug: fw-version: no longer needs an ELF file loaded * debug: flipperversion: removed unused variable * debug_other: print running fw version Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -39,10 +39,10 @@ def generate(env, **kw):
|
||||
"|openocd -c 'gdb_port pipe; log_output ${FBT_DEBUG_DIR}/openocd.log' ${[SINGLEQUOTEFUNC(OPENOCD_OPTS)]}"
|
||||
],
|
||||
GDBOPTS_BASE=[
|
||||
"-ex",
|
||||
"target extended-remote ${GDBREMOTE}",
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/gdbinit",
|
||||
"-ex",
|
||||
"target extended-remote ${GDBREMOTE}",
|
||||
],
|
||||
GDBOPTS_BLACKMAGIC=[
|
||||
"-q",
|
||||
@@ -61,6 +61,8 @@ def generate(env, **kw):
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/flipperapps.py",
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/flipperversion.py",
|
||||
"-ex",
|
||||
"fap-set-debug-elf-root ${FBT_FAP_DEBUG_ELF_ROOT}",
|
||||
"-ex",
|
||||
"source ${FBT_DEBUG_DIR}/PyCortexMDebug/PyCortexMDebug.py",
|
||||
@@ -68,6 +70,8 @@ def generate(env, **kw):
|
||||
"svd_load ${SVD_FILE}",
|
||||
"-ex",
|
||||
"compare-sections",
|
||||
"-ex",
|
||||
"fw-version",
|
||||
],
|
||||
JFLASHPROJECT="${FBT_DEBUG_DIR}/fw.jflash",
|
||||
)
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
"@UFBT_DEBUG_DIR@/stm32wbx.cfg"
|
||||
],
|
||||
"postAttachCommands": [
|
||||
"source @UFBT_DEBUG_DIR@/flipperversion.py",
|
||||
"fw-version",
|
||||
"source @UFBT_DEBUG_DIR@/flipperapps.py",
|
||||
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
|
||||
],
|
||||
@@ -49,6 +51,8 @@
|
||||
"@UFBT_DEBUG_DIR@/stm32wbx.cfg"
|
||||
],
|
||||
"postAttachCommands": [
|
||||
"source @UFBT_DEBUG_DIR@/flipperversion.py",
|
||||
"fw-version",
|
||||
"source @UFBT_DEBUG_DIR@/flipperapps.py",
|
||||
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
|
||||
],
|
||||
@@ -69,6 +73,8 @@
|
||||
"attach 1",
|
||||
"set confirm off",
|
||||
"set mem inaccessible-by-default off",
|
||||
"source @UFBT_DEBUG_DIR@/flipperversion.py",
|
||||
"fw-version",
|
||||
"source @UFBT_DEBUG_DIR@/flipperapps.py",
|
||||
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
|
||||
]
|
||||
@@ -86,6 +92,8 @@
|
||||
"svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
|
||||
"rtos": "FreeRTOS",
|
||||
"postAttachCommands": [
|
||||
"source @UFBT_DEBUG_DIR@/flipperversion.py",
|
||||
"fw-version",
|
||||
"source @UFBT_DEBUG_DIR@/flipperapps.py",
|
||||
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
|
||||
]
|
||||
|
||||
@@ -35,8 +35,6 @@ class GitVersion:
|
||||
or "unknown"
|
||||
)
|
||||
|
||||
branch_num = self._exec_git("rev-list --count HEAD") or "n/a"
|
||||
|
||||
try:
|
||||
version = self._exec_git("describe --tags --abbrev=0 --exact-match")
|
||||
except subprocess.CalledProcessError:
|
||||
@@ -45,7 +43,6 @@ class GitVersion:
|
||||
return {
|
||||
"GIT_COMMIT": commit,
|
||||
"GIT_BRANCH": branch,
|
||||
"GIT_BRANCH_NUM": branch_num,
|
||||
"VERSION": version,
|
||||
"BUILD_DIRTY": dirty and 1 or 0,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user