fbt fixes pt4 (#1899)

* fbt: fixed py scripts for gdb
* fbt: removed compiled dolphin assets from tracked files; resolved cached dependency issues by globally disabling deps cache; changed dependency tracking for dolphin assets
* fbt: fix for "resources" node lookup
* toolchain: bump to v.16 with scons + x64 win binaries
* fbt: using scons from toolchain
* vscode: fixed paths for 64-bit Windows toolchain
* fbt: added colors!
* fbt: moved import validator to ansi lib coloring
* fbt: moved COMSTR vars to tools
* fbt: custom action for fap dist
* fbt: added OPENOCD_ADAPTER_SERIAL configuration var for openocd operations
* fbt: added get_stlink target
* docs: details on libs for faps
* vscode: added DAP config for using Flipper as a debugger for a 2nd Flipper
* fbt: blind deps fix for sdk_origin
* fbt: sdk: moved deployment actions to pure python
* Github: disable disableLicenseExpirationCheck option for pvs

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
hedger 2022-10-26 02:15:02 +04:00 committed by GitHub
parent 984d89c6d0
commit 0adad32418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
243 changed files with 302 additions and 740 deletions

View File

@ -65,7 +65,6 @@ jobs:
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }} pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
pvs-studio-analyzer analyze \ pvs-studio-analyzer analyze \
@.pvsoptions \ @.pvsoptions \
--disableLicenseExpirationCheck \
-j$(grep -c processor /proc/cpuinfo) \ -j$(grep -c processor /proc/cpuinfo) \
-f build/f7-firmware-DC/compile_commands.json \ -f build/f7-firmware-DC/compile_commands.json \
-o PVS-Studio.log -o PVS-Studio.log

3
.gitmodules vendored
View File

@ -22,9 +22,6 @@
[submodule "lib/microtar"] [submodule "lib/microtar"]
path = lib/microtar path = lib/microtar
url = https://github.com/amachronic/microtar.git url = https://github.com/amachronic/microtar.git
[submodule "lib/scons"]
path = lib/scons
url = https://github.com/SCons/scons.git
[submodule "lib/mbedtls"] [submodule "lib/mbedtls"]
path = lib/mbedtls path = lib/mbedtls
url = https://github.com/Mbed-TLS/mbedtls.git url = https://github.com/Mbed-TLS/mbedtls.git

View File

@ -2,7 +2,7 @@
"configurations": [ "configurations": [
{ {
"name": "Win32", "name": "Win32",
"compilerPath": "${workspaceFolder}/toolchain/i686-windows/bin/arm-none-eabi-gcc.exe", "compilerPath": "${workspaceFolder}/toolchain/x86_64-windows/bin/arm-none-eabi-gcc.exe",
"intelliSenseMode": "gcc-arm", "intelliSenseMode": "gcc-arm",
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", "compileCommands": "${workspaceFolder}/build/latest/compile_commands.json",
"configurationProvider": "ms-vscode.cpptools", "configurationProvider": "ms-vscode.cpptools",

View File

@ -79,6 +79,25 @@
] ]
// "showDevDebugOutput": "raw", // "showDevDebugOutput": "raw",
}, },
{
"name": "Attach FW (DAP)",
"cwd": "${workspaceFolder}",
"executable": "./build/latest/firmware.elf",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"device": "cmsis-dap",
"svdFile": "./debug/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"configFiles": [
"interface/cmsis-dap.cfg",
"./debug/stm32wbx.cfg",
],
"postAttachCommands": [
"source debug/flipperapps.py",
],
// "showDevDebugOutput": "raw",
},
{ {
"name": "fbt debug", "name": "fbt debug",
"type": "python", "type": "python",

View File

@ -6,13 +6,13 @@
"cortex-debug.enableTelemetry": false, "cortex-debug.enableTelemetry": false,
"cortex-debug.variableUseNaturalFormat": true, "cortex-debug.variableUseNaturalFormat": true,
"cortex-debug.showRTOS": true, "cortex-debug.showRTOS": true,
"cortex-debug.armToolchainPath.windows": "${workspaceFolder}/toolchain/i686-windows/bin", "cortex-debug.armToolchainPath.windows": "${workspaceFolder}/toolchain/x86_64-windows/bin",
"cortex-debug.armToolchainPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin", "cortex-debug.armToolchainPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin",
"cortex-debug.armToolchainPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin", "cortex-debug.armToolchainPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin",
"cortex-debug.openocdPath.windows": "${workspaceFolder}/toolchain/i686-windows/openocd/bin/openocd.exe", "cortex-debug.openocdPath.windows": "${workspaceFolder}/toolchain/x86_64-windows/openocd/bin/openocd.exe",
"cortex-debug.openocdPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/openocd/bin/openocd", "cortex-debug.openocdPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/openocd/bin/openocd",
"cortex-debug.openocdPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/openocd/bin/openocd", "cortex-debug.openocdPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/openocd/bin/openocd",
"cortex-debug.gdbPath.windows": "${workspaceFolder}/toolchain/i686-windows/bin/arm-none-eabi-gdb-py.bat", "cortex-debug.gdbPath.windows": "${workspaceFolder}/toolchain/x86_64-windows/bin/arm-none-eabi-gdb-py.bat",
"cortex-debug.gdbPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin/arm-none-eabi-gdb-py", "cortex-debug.gdbPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin/arm-none-eabi-gdb-py",
"cortex-debug.gdbPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gdb-py", "cortex-debug.gdbPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gdb-py",
"editor.formatOnSave": true, "editor.formatOnSave": true,

View File

@ -156,11 +156,9 @@ Depends(fap_dist, firmware_env["FW_EXTAPPS"]["validators"].values())
Alias("fap_dist", fap_dist) Alias("fap_dist", fap_dist)
# distenv.Default(fap_dist) # distenv.Default(fap_dist)
plugin_resources_dist = list( distenv.Depends(
distenv.Install(f"#/assets/resources/apps/{dist_entry[0]}", dist_entry[1]) firmware_env["FW_RESOURCES"], firmware_env["FW_EXTAPPS"]["resources_dist"]
for dist_entry in firmware_env["FW_EXTAPPS"]["dist"].values()
) )
distenv.Depends(firmware_env["FW_RESOURCES"], plugin_resources_dist)
# Target for bundling core2 package for qFlipper # Target for bundling core2 package for qFlipper
@ -291,6 +289,16 @@ distenv.PhonyTarget(
"@echo $( ${BLACKMAGIC_ADDR} $)", "@echo $( ${BLACKMAGIC_ADDR} $)",
) )
# Find STLink probe ids
distenv.PhonyTarget(
"get_stlink",
distenv.Action(
lambda **kw: distenv.GetDevices(),
None,
),
)
# Prepare vscode environment # Prepare vscode environment
vscode_dist = distenv.Install("#.vscode", distenv.Glob("#.vscode/example/*")) vscode_dist = distenv.Install("#.vscode", distenv.Glob("#.vscode/example/*"))
distenv.Precious(vscode_dist) distenv.Precious(vscode_dist)

3
assets/.gitignore vendored
View File

@ -1,3 +1,4 @@
/core2_firmware /core2_firmware
/resources/Manifest /resources/Manifest
/resources/apps/* /resources/apps/*
/resources/dolphin/*

View File

@ -68,15 +68,17 @@ if assetsenv["IS_BASE_FIRMWARE"]:
assetsenv.Dir("#/assets/dolphin"), assetsenv.Dir("#/assets/dolphin"),
DOLPHIN_RES_TYPE="external", DOLPHIN_RES_TYPE="external",
) )
assetsenv.NoClean(dolphin_external)
if assetsenv["FORCE"]: if assetsenv["FORCE"]:
assetsenv.AlwaysBuild(dolphin_external) assetsenv.AlwaysBuild(dolphin_external)
assetsenv.Alias("dolphin_ext", dolphin_external) assetsenv.Alias("dolphin_ext", dolphin_external)
assetsenv.Clean(dolphin_external, assetsenv.Dir("#/assets/resources/dolphin"))
# Resources manifest # Resources manifest
resources = assetsenv.Command( resources = assetsenv.Command(
"#/assets/resources/Manifest", "#/assets/resources/Manifest",
assetsenv.GlobRecursive("*", "resources", exclude="Manifest"), assetsenv.GlobRecursive(
"*", assetsenv.Dir("resources").srcnode(), exclude="Manifest"
),
action=Action( action=Action(
'${PYTHON3} "${ASSETS_COMPILER}" manifest "${TARGET.dir.posix}" --timestamp=${GIT_UNIX_TIMESTAMP}', '${PYTHON3} "${ASSETS_COMPILER}" manifest "${TARGET.dir.posix}" --timestamp=${GIT_UNIX_TIMESTAMP}',
"${RESMANIFESTCOMSTR}", "${RESMANIFESTCOMSTR}",

View File

@ -1,32 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 9
Active frames: 7
Frames order: 0 1 2 1 3 1 2 3 1 4 5 6 5 6 5 4
Active cycles: 1
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 2
Slot: 0
X: 78
Y: 16
Text: F*&K!!!
AlignH: Left
AlignV: Bottom
StartFrame: 2
EndFrame: 4
Slot: 1
X: 78
Y: 16
Text: What ya\nlookin at?!
AlignH: Left
AlignV: Center
StartFrame: 10
EndFrame: 15

View File

@ -1,41 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 8
Active frames: 4
Frames order: 0 1 2 3 4 2 3 4 5 6 7 6
Active cycles: 2
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 2
Slot: 0
X: 22
Y: 40
Text: I miss you
AlignH: Right
AlignV: Bottom
StartFrame: 9
EndFrame: 11
Slot: 0
X: 17
Y: 40
Text: my friend...
AlignH: Right
AlignV: Bottom
StartFrame: 12
EndFrame: 15
Slot: 1
X: 2
Y: 29
Text: Why are you\nalways away?
AlignH: Right
AlignV: Bottom
StartFrame: 9
EndFrame: 15

View File

@ -1,14 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 8
Active frames: 11
Frames order: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Active cycles: 1
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 0

View File

@ -1,32 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 51
Passive frames: 6
Active frames: 2
Frames order: 0 1 2 3 4 5 6 7
Active cycles: 4
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 1
Slot: 0
X: 60
Y: 23
Text: I have to rest
AlignH: Left
AlignV: Bottom
StartFrame: 7
EndFrame: 10
Slot: 0
X: 60
Y: 23
Text: but not today
AlignH: Left
AlignV: Bottom
StartFrame: 11
EndFrame: 13

View File

@ -1,32 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 4
Active frames: 42
Frames order: 0 1 2 1 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 11 12 4 3
Active cycles: 1
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 1
Slot: 0
X: 51
Y: 49
Text: Adios.
AlignH: Center
AlignV: Top
StartFrame: 6
EndFrame: 9
Slot: 0
X: 1
Y: 49
Text: Forgot something...
AlignH: Center
AlignV: Top
StartFrame: 42
EndFrame: 45

View File

@ -1,23 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 7
Active frames: 13
Frames order: 0 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 12 13 12 13
Active cycles: 1
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 1
Slot: 0
X: 67
Y: 24
Text: Am I a joke\nto you?!?!
AlignH: Left
AlignV: Center
StartFrame: 15
EndFrame: 19

View File

@ -1,32 +0,0 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 9
Active frames: 13
Frames order: 0 1 2 3 4 5 2 3 4 10 6 7 8 7 8 7 8 7 8 9 10 11
Active cycles: 1
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 1
Slot: 0
X: 57
Y: 24
Text: No mistakes,
AlignH: Left
AlignV: Center
StartFrame: 11
EndFrame: 14
Slot: 0
X: 57
Y: 21
Text: only happy\n accidents
AlignH: Left
AlignV: Center
StartFrame: 15
EndFrame: 18

Some files were not shown because too many files have changed in this diff Show More