Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-candidate' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed May 17, 2023
2 parents b7f406d + 9cedac9 commit 16b9764
Show file tree
Hide file tree
Showing 273 changed files with 18,793 additions and 3,583 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# Lib
/lib/ST25RFAL002/ @skotopes @DrZlo13 @hedger @gornekich
/lib/STM32CubeWB/ @skotopes @DrZlo13 @hedger @gornekich
/lib/stm32wb_copro/ @skotopes @DrZlo13 @hedger @gornekich
/lib/digital_signal/ @skotopes @DrZlo13 @hedger @gornekich
/lib/infrared/ @skotopes @DrZlo13 @hedger @gsurkov
/lib/lfrfid/ @skotopes @DrZlo13 @hedger @nminaylov
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- dev
- "release*"
tags:
- '*'
pull_request:
Expand All @@ -19,7 +18,7 @@ jobs:
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:
- name: 'Bundle scripts'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
tar czpf artifacts/flipper-z-any-scripts-${SUFFIX}.tgz scripts debug
tar czpf artifacts/flipper-z-any-scripts-${SUFFIX}.tgz scripts
- name: 'Build the firmware'
run: |
Expand Down Expand Up @@ -167,7 +166,7 @@ jobs:
target: [f7, f18]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
Expand All @@ -194,20 +193,22 @@ jobs:
TARGET="$(echo '${{ matrix.target }}' | sed 's/f//')"; \
./fbt TARGET_HW=$TARGET DEBUG=0 COMPACT=1 fap_dist updater_package
echo "sdk-file=$(ls dist/${{ matrix.target }}-*/flipper-z-${{ matrix.target }}-sdk-*.zip)" >> $GITHUB_OUTPUT
echo "hw-target-code=$TARGET" >> $GITHUB_OUTPUT
- name: Deploy uFBT with SDK
uses: flipperdevices/[email protected]
with:
task: setup
sdk-file: ${{ steps.build-fw.outputs.sdk-file }}
sdk-hw-target: ${{ steps.build-fw.outputs.hw-target-code }}

- name: Build test app with SDK
run: |
mkdir testapp
cd testapp
ufbt create APPID=testapp
ufbt
- name: Build example & external apps with uFBT
run: |
for appdir in 'applications/external' 'applications/examples'; do
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/lint_and_submodule_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- dev
- "release*"
tags:
- '*'
pull_request:
Expand All @@ -19,7 +18,7 @@ jobs:
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
Expand Down Expand Up @@ -64,7 +63,7 @@ jobs:
else
echo "Python Lint: all good ✨" >> $GITHUB_STEP_SUMMARY;
fi
- name: 'Check C++ code formatting'
id: syntax_check_cpp
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pvs_studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- dev
- "release*"
tags:
- '*'
pull_request:
Expand All @@ -20,7 +19,7 @@ jobs:
runs-on: [self-hosted, FlipperZeroShell]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: [self-hosted, FlipperZeroUnitTest]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: Checkout code
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/updater_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: [self-hosted, FlipperZeroUpdaterTest]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: false
submodules: false
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get flipper from device manager (mock)'
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
echo "tag=$(git tag -l --sort=-version:refname | grep -v "rc\|RC" | head -1)" >> $GITHUB_OUTPUT
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout latest release'
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.swp
*.swo
*.gdb_history
*.old


# LSP
Expand Down
12 changes: 9 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "lib/mlib"]
path = lib/mlib
url = https://github.com/P-p-H-d/mlib.git
[submodule "lib/STM32CubeWB"]
path = lib/STM32CubeWB
url = https://github.com/Flipper-Zero/STM32CubeWB.git
[submodule "lib/littlefs"]
path = lib/littlefs
url = https://github.com/littlefs-project/littlefs.git
Expand Down Expand Up @@ -34,3 +31,12 @@
[submodule "lib/heatshrink"]
path = lib/heatshrink
url = https://github.com/flipperdevices/heatshrink.git
[submodule "lib/st_cmsis_device_wb"]
path = lib/stm32wb_cmsis
url = https://github.com/STMicroelectronics/cmsis_device_wb
[submodule "lib/stm32wbxx_hal_driver"]
path = lib/stm32wb_hal
url = https://github.com/STMicroelectronics/stm32wbxx_hal_driver
[submodule "lib/stm32wb_copro"]
path = lib/stm32wb_copro
url = https://github.com/flipperdevices/stm32wb_copro.git
2 changes: 1 addition & 1 deletion .pvsoptions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/external/dap_link/lib/free-dap
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/cmsis_core -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/stm32wb_cmsis -e lib/stm32wb_copro -e lib/stm32wb_hal -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/external/dap_link/lib/free-dap
47 changes: 22 additions & 25 deletions .vscode/example/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
"args": {
"useSingleResult": true,
"env": {
"PATH": "${workspaceFolder};${env:PATH}",
"FBT_QUIET": 1
"PATH": "${workspaceFolder}${command:extension.commandvariable.envListSep}${env:PATH}"
},
"command": "fbt get_blackmagic",
"description": "Get Blackmagic device",
"command": "fbt -s get_blackmagic",
"description": "Get Blackmagic device"
}
}
],
Expand All @@ -28,20 +27,21 @@
"type": "cortex-debug",
"servertype": "openocd",
"device": "stlink",
"svdFile": "./debug/STM32WB55_CM4.svd",
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
// If you're debugging early in the boot process, before OS scheduler is running,
// you have to comment out the following line.
"rtos": "FreeRTOS",
"configFiles": [
"interface/stlink.cfg",
"./debug/stm32wbx.cfg",
"./scripts/debug/stm32wbx.cfg",
],
"postAttachCommands": [
"source scripts/debug/flipperversion.py",
"fw-version",
// "compare-sections",
"source debug/flipperapps.py",
"source scripts/debug/flipperapps.py",
"fap-set-debug-elf-root build/latest/.extapps",
// "source debug/FreeRTOS/FreeRTOS.py",
// "svd_load debug/STM32WB55_CM4.svd"
// "source scripts/debug/FreeRTOS/FreeRTOS.py",
]
// "showDevDebugOutput": "raw",
},
Expand All @@ -53,14 +53,16 @@
"type": "cortex-debug",
"servertype": "external",
"gdbTarget": "${input:BLACKMAGIC}",
"svdFile": "./debug/STM32WB55_CM4.svd",
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"postAttachCommands": [
"monitor swdp_scan",
"attach 1",
"set confirm off",
"set mem inaccessible-by-default off",
"source debug/flipperapps.py",
"source scripts/debug/flipperversion.py",
"fw-version",
"source scripts/debug/flipperapps.py",
"fap-set-debug-elf-root build/latest/.extapps",
// "compare-sections",
]
Expand All @@ -75,10 +77,12 @@
"servertype": "jlink",
"interface": "swd",
"device": "STM32WB55RG",
"svdFile": "./debug/STM32WB55_CM4.svd",
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"postAttachCommands": [
"source debug/flipperapps.py",
"source scripts/debug/flipperversion.py",
"fw-version",
"source scripts/debug/flipperapps.py",
"fap-set-debug-elf-root build/latest/.extapps",
]
// "showDevDebugOutput": "raw",
Expand All @@ -91,27 +95,20 @@
"type": "cortex-debug",
"servertype": "openocd",
"device": "cmsis-dap",
"svdFile": "./debug/STM32WB55_CM4.svd",
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"configFiles": [
"interface/cmsis-dap.cfg",
"./debug/stm32wbx.cfg",
"./scripts/debug/stm32wbx.cfg",
],
"postAttachCommands": [
"source debug/flipperapps.py",
"source scripts/debug/flipperversion.py",
"fw-version",
"source scripts/debug/flipperapps.py",
"fap-set-debug-elf-root build/latest/.extapps",
],
// "showDevDebugOutput": "raw",
},
{
"name": "fbt debug",
"type": "python",
"request": "launch",
"program": "./lib/scons/scripts/scons.py",
"args": [
"plugin_dist"
]
},
{
"name": "python debug",
"type": "python",
Expand Down
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"amiralizadeh9480.cpp-helper",
"marus25.cortex-debug",
"zxh404.vscode-proto3",
"augustocdias.tasks-shell-input"
"augustocdias.tasks-shell-input",
"rioj7.command-variable"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
"twxs.cmake",
"ms-vscode.cmake-tools"
]
}
}
1 change: 0 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ Make sure your Flipper is on, and your firmware is functioning. Connect your Fli
- `applications` - applications and services used in firmware
- `assets` - assets used by applications and services
- `furi` - Furi Core: OS-level primitives and helpers
- `debug` - debug tool: GDB plugins, an SVD file, etc.
- `documentation` - documentation generation system configs and input files
- `firmware` - firmware source code
- `lib` - our and 3rd party libraries, drivers, etc.
Expand Down
22 changes: 20 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,31 @@ distenv.PhonyTarget(
)

# Debug alien elf
debug_other_opts = [
"-ex",
"source ${FBT_DEBUG_DIR}/PyCortexMDebug/PyCortexMDebug.py",
# "-ex",
# "source ${FBT_DEBUG_DIR}/FreeRTOS/FreeRTOS.py",
"-ex",
"source ${FBT_DEBUG_DIR}/flipperversion.py",
"-ex",
"fw-version",
]

distenv.PhonyTarget(
"debug_other",
"${GDBPYCOM}",
GDBOPTS="${GDBOPTS_BASE}",
GDBREMOTE="${OPENOCD_GDB_PIPE}",
GDBPYOPTS='-ex "source ${FBT_DEBUG_DIR}/PyCortexMDebug/PyCortexMDebug.py" ',
GDBPYOPTS=debug_other_opts,
)

distenv.PhonyTarget(
"debug_other_blackmagic",
"${GDBPYCOM}",
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
GDBREMOTE="$${BLACKMAGIC_ADDR}",
GDBREMOTE="${BLACKMAGIC_ADDR}",
GDBPYOPTS=debug_other_opts,
)


Expand Down Expand Up @@ -335,3 +347,9 @@ vscode_dist = distenv.Install("#.vscode", distenv.Glob("#.vscode/example/*"))
distenv.Precious(vscode_dist)
distenv.NoClean(vscode_dist)
distenv.Alias("vscode_dist", vscode_dist)

# Configure shell with build tools
distenv.PhonyTarget(
"env",
"@echo $( ${FBT_SCRIPT_DIR}/toolchain/fbtenv.sh $)",
)
Loading

0 comments on commit 16b9764

Please sign in to comment.