Skip to content

Commit

Permalink
fbt fixes pt4 (flipperdevices#1899)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
hedger and skotopes authored Oct 25, 2022
1 parent 984d89c commit 0adad32
Show file tree
Hide file tree
Showing 243 changed files with 302 additions and 740 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pvs_studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
pvs-studio-analyzer analyze \
@.pvsoptions \
--disableLicenseExpirationCheck \
-j$(grep -c processor /proc/cpuinfo) \
-f build/f7-firmware-DC/compile_commands.json \
-o PVS-Studio.log
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
[submodule "lib/microtar"]
path = lib/microtar
url = https://github.com/amachronic/microtar.git
[submodule "lib/scons"]
path = lib/scons
url = https://github.com/SCons/scons.git
[submodule "lib/mbedtls"]
path = lib/mbedtls
url = https://github.com/Mbed-TLS/mbedtls.git
Expand Down
2 changes: 1 addition & 1 deletion .vscode/example/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"configurations": [
{
"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",
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json",
"configurationProvider": "ms-vscode.cpptools",
Expand Down
19 changes: 19 additions & 0 deletions .vscode/example/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,25 @@
]
// "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",
"type": "python",
Expand Down
6 changes: 3 additions & 3 deletions .vscode/example/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"cortex-debug.enableTelemetry": false,
"cortex-debug.variableUseNaturalFormat": 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.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.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.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gdb-py",
"editor.formatOnSave": true,
Expand Down
16 changes: 12 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ Depends(fap_dist, firmware_env["FW_EXTAPPS"]["validators"].values())
Alias("fap_dist", fap_dist)
# distenv.Default(fap_dist)

plugin_resources_dist = list(
distenv.Install(f"#/assets/resources/apps/{dist_entry[0]}", dist_entry[1])
for dist_entry in firmware_env["FW_EXTAPPS"]["dist"].values()
distenv.Depends(
firmware_env["FW_RESOURCES"], firmware_env["FW_EXTAPPS"]["resources_dist"]
)
distenv.Depends(firmware_env["FW_RESOURCES"], plugin_resources_dist)


# Target for bundling core2 package for qFlipper
Expand Down Expand Up @@ -291,6 +289,16 @@ distenv.PhonyTarget(
"@echo $( ${BLACKMAGIC_ADDR} $)",
)


# Find STLink probe ids
distenv.PhonyTarget(
"get_stlink",
distenv.Action(
lambda **kw: distenv.GetDevices(),
None,
),
)

# Prepare vscode environment
vscode_dist = distenv.Install("#.vscode", distenv.Glob("#.vscode/example/*"))
distenv.Precious(vscode_dist)
Expand Down
3 changes: 2 additions & 1 deletion assets/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/core2_firmware
/resources/Manifest
/resources/apps/*
/resources/apps/*
/resources/dolphin/*
6 changes: 4 additions & 2 deletions assets/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ if assetsenv["IS_BASE_FIRMWARE"]:
assetsenv.Dir("#/assets/dolphin"),
DOLPHIN_RES_TYPE="external",
)
assetsenv.NoClean(dolphin_external)
if assetsenv["FORCE"]:
assetsenv.AlwaysBuild(dolphin_external)
assetsenv.Alias("dolphin_ext", dolphin_external)
assetsenv.Clean(dolphin_external, assetsenv.Dir("#/assets/resources/dolphin"))

# Resources manifest
resources = assetsenv.Command(
"#/assets/resources/Manifest",
assetsenv.GlobRecursive("*", "resources", exclude="Manifest"),
assetsenv.GlobRecursive(
"*", assetsenv.Dir("resources").srcnode(), exclude="Manifest"
),
action=Action(
'${PYTHON3} "${ASSETS_COMPILER}" manifest "${TARGET.dir.posix}" --timestamp=${GIT_UNIX_TIMESTAMP}',
"${RESMANIFESTCOMSTR}",
Expand Down
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Boxing_128x64/frame_6.bm
Binary file not shown.
32 changes: 0 additions & 32 deletions assets/resources/dolphin/L1_Boxing_128x64/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_6.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Cry_128x64/frame_7.bm
Binary file not shown.
41 changes: 0 additions & 41 deletions assets/resources/dolphin/L1_Cry_128x64/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_10.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_11.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_12.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_13.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_14.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_15.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_16.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_17.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_18.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_6.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_7.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_8.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Furippa1_128x64/frame_9.bm
Binary file not shown.
14 changes: 0 additions & 14 deletions assets/resources/dolphin/L1_Furippa1_128x64/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_6.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Laptop_128x51/frame_7.bm
Binary file not shown.
32 changes: 0 additions & 32 deletions assets/resources/dolphin/L1_Laptop_128x51/meta.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 0 additions & 32 deletions assets/resources/dolphin/L1_Leaving_sad_128x64/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_10.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_11.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_12.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_13.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_6.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_7.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_8.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Mad_fist_128x64/frame_9.bm
Binary file not shown.
23 changes: 0 additions & 23 deletions assets/resources/dolphin/L1_Mad_fist_128x64/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_10.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_11.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_6.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_7.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_8.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Painting_128x64/frame_9.bm
Binary file not shown.
32 changes: 0 additions & 32 deletions assets/resources/dolphin/L1_Painting_128x64/meta.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
23 changes: 0 additions & 23 deletions assets/resources/dolphin/L1_Read_books_128x64/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_1.bm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_3.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_4.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_5.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_6.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_7.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_8.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Recording_128x51/frame_9.bm
Binary file not shown.
14 changes: 0 additions & 14 deletions assets/resources/dolphin/L1_Recording_128x51/meta.txt

This file was deleted.

Binary file removed assets/resources/dolphin/L1_Sleep_128x64/frame_0.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Sleep_128x64/frame_1.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Sleep_128x64/frame_2.bm
Binary file not shown.
Binary file removed assets/resources/dolphin/L1_Sleep_128x64/frame_3.bm
Binary file not shown.
Loading

0 comments on commit 0adad32

Please sign in to comment.