[FL-3486,FL-3392] fbt: various improvements and bug fixes (#2982)
* fbt: extapps: compact debug format for .faps * fbt: sdk: fixed symbol cache regen logic for removed-only symbols * lib: elf_file: early .fap file handle release * fbt: extapps: added FAP_VERSION define for application environments * github: added appsymbols artifact * api: updates for f18 * github: fixed early fap_dist * fbt: added flash_dap * ufbt: added flash_dap * fbt: reworked flash target; scripts: program.py->fwflash.py and changes * vscode: updated configuration * scripts: fwflash.py: ugly fixes for ufbt * scripts: fwflash.py: cleanup * fbt: flash: always use .elf file * scripts: fwflash: fixed elf file path Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
+6
-25
@@ -144,24 +144,20 @@ dist_env = env.Clone(
|
||||
],
|
||||
)
|
||||
|
||||
openocd_target = dist_env.OpenOCDFlash(
|
||||
flash_target = dist_env.FwFlash(
|
||||
dist_env["UFBT_STATE_DIR"].File("flash"),
|
||||
dist_env["FW_BIN"],
|
||||
OPENOCD_COMMAND=[
|
||||
"-c",
|
||||
"program ${SOURCE.posix} reset exit 0x08000000",
|
||||
],
|
||||
dist_env["FW_ELF"],
|
||||
)
|
||||
dist_env.Alias("firmware_flash", openocd_target)
|
||||
dist_env.Alias("flash", openocd_target)
|
||||
dist_env.Alias("firmware_flash", flash_target)
|
||||
dist_env.Alias("flash", flash_target)
|
||||
if env["FORCE"]:
|
||||
env.AlwaysBuild(openocd_target)
|
||||
env.AlwaysBuild(flash_target)
|
||||
|
||||
|
||||
firmware_jflash = dist_env.JFlash(
|
||||
dist_env["UFBT_STATE_DIR"].File("jflash"),
|
||||
dist_env["FW_BIN"],
|
||||
JFLASHADDR="0x20000000",
|
||||
JFLASHADDR="0x08000000",
|
||||
)
|
||||
dist_env.Alias("firmware_jflash", firmware_jflash)
|
||||
dist_env.Alias("jflash", firmware_jflash)
|
||||
@@ -213,21 +209,6 @@ dist_env.PhonyTarget(
|
||||
GDBPYOPTS=debug_other_opts,
|
||||
)
|
||||
|
||||
|
||||
dist_env.PhonyTarget(
|
||||
"flash_blackmagic",
|
||||
"$GDB $GDBOPTS $SOURCES $GDBFLASH",
|
||||
source=dist_env["FW_ELF"],
|
||||
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
|
||||
GDBREMOTE="${BLACKMAGIC_ADDR}",
|
||||
GDBFLASH=[
|
||||
"-ex",
|
||||
"load",
|
||||
"-ex",
|
||||
"quit",
|
||||
],
|
||||
)
|
||||
|
||||
flash_usb_full = dist_env.UsbInstall(
|
||||
dist_env["UFBT_STATE_DIR"].File("usbinstall"),
|
||||
[],
|
||||
|
||||
@@ -55,9 +55,21 @@ vars.AddVariables(
|
||||
"Blackmagic probe location",
|
||||
"auto",
|
||||
),
|
||||
EnumVariable(
|
||||
"SWD_TRANSPORT",
|
||||
help="SWD interface adapter type",
|
||||
default="auto",
|
||||
allowed_values=[
|
||||
"auto",
|
||||
"cmsis-dap",
|
||||
"stlink",
|
||||
"blackmagic_usb",
|
||||
"blackmagic_wifi",
|
||||
],
|
||||
),
|
||||
(
|
||||
"OPENOCD_ADAPTER_SERIAL",
|
||||
"OpenOCD adapter serial number",
|
||||
"SWD_TRANSPORT_SERIAL",
|
||||
"SWD interface adapter serial number",
|
||||
"auto",
|
||||
),
|
||||
(
|
||||
|
||||
@@ -20,8 +20,8 @@ Building:
|
||||
Build FAP app with appid={APPID}; upload & start it over USB
|
||||
|
||||
Flashing & debugging:
|
||||
flash, flash_blackmagic, *jflash:
|
||||
Flash firmware to target using debug probe
|
||||
flash, *jflash:
|
||||
Flash firmware to target using SWD probe. See also SWD_TRANSPORT, SWD_TRANSPORT_SERIAL
|
||||
flash_usb, flash_usb_full:
|
||||
Install firmware using self-update package
|
||||
debug, debug_other, blackmagic:
|
||||
|
||||
Reference in New Issue
Block a user