Skip to content

Commit

Permalink
feat: add double-tap-to-crash builds (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: Markus Tacker <[email protected]>
  • Loading branch information
maxd-nordic and coderbyheart committed Apr 8, 2024
1 parent 1f26e92 commit 60a2807
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:
matrix:
configuration:
- thingy91.low-power.memfault
# Double-tap to crash (dt2c) sends Button ID 42 and crashes on double tap of button
# to demonstrate the Memfault crash reporting feature.
- thingy91.low-power.memfault.dt2c
- thingy91.memfault.dt2c
- nrf9160dk.low-power.memfault
# Not enough flash for Memfault AND debug on Thingy:91,
# and it's not that useful anyway because debug builds
Expand Down Expand Up @@ -142,6 +146,11 @@ jobs:
echo "CONFIG_MEMFAULT_NCS_IMPLEMENT_METRICS_COLLECTION=n" >> firmware.conf
echo MEMFAULT_OVERLAY=overlay-memfault.conf >> $GITHUB_ENV
- name: Configure double-tap-to-crash
if: contains(matrix.configuration, 'dt2c')
working-directory: firmware
run: echo "CONFIG_UI_DOUBLE_TAP_TO_CRASH=y" >> firmware.conf

- name: Configure for NB-IoT only
working-directory: firmware
if: contains(matrix.configuration, 'nbiot')
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ Firmware for devices connecting to the
[thingy.world cloud backend](https://github.com/NordicPlayground/thingy-rocks-cloud-aws-js)
based on the `asset_tracker_v2` from the
[nRF Connect SDK](https://github.com/nrfconnect/sdk-nrf).

## Memfault demonstration (`double-tap-to-crash`)

The builds with `double-tap-to-crash` to feature will crash when the button is
double-tapped, meaning pressed in very short succession.

Because there is not crash notification from Memfault, the backend needs to poll
for the crash dump so it can show up quickly on the ThingyWorld dasboard.

For this to happen, press the button **once** before double tapping. These
builds are sending the button ID `42` which is the signal for the backend to
scan for new crash reports for 120 seconds.
40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,46 @@
"name": "thingy_world-${nextRelease.gitTag}-Thingy91-low-power.elf",
"label": "App Symbols ELF file for Thingy:91 firmware (low power)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.low-power.memfault.dt2c-*/merged.hex",
"name": "thingy_world-Thingy91-low-power-dt2c-${nextRelease.gitTag}.hex",
"label": "App with Bootloader HEX file for Thingy:91 (with double-tap-to-crash) (low power)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.low-power.memfault.dt2c-*/app_signed.hex",
"name": "thingy_world-Thingy91-low-power-dt2c-${nextRelease.gitTag}-signed.hex",
"label": "Firmware Update Image HEX file for Thingy:91 (with double-tap-to-crash) (low power)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.low-power.memfault.dt2c-*/app_update.bin",
"name": "thingy_world-Thingy91-low-power-dt2c-${nextRelease.gitTag}-app_upgrade.bin",
"label": "Firmware Update Image BIN file for Thingy:91 (with double-tap-to-crash) (low power)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.low-power.memfault.dt2c-*/zephyr.elf",
"name": "thingy_world-Thingy91-low-power-dt2c-${nextRelease.gitTag}.elf",
"label": "App Symbols ELF file for Thingy:91 (with double-tap-to-crash) firmware (low power)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.memfault.dt2c-*/merged.hex",
"name": "thingy_world-Thingy91-dt2c-${nextRelease.gitTag}.hex",
"label": "App with Bootloader HEX file for Thingy:91 (with double-tap-to-crash)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.memfault.dt2c-*/app_signed.hex",
"name": "thingy_world-Thingy91-dt2c-${nextRelease.gitTag}-signed.hex",
"label": "Firmware Update Image HEX file for Thingy:91 (with double-tap-to-crash)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.memfault.dt2c-*/app_update.bin",
"name": "thingy_world-Thingy91-dt2c-${nextRelease.gitTag}-app_upgrade.bin",
"label": "Firmware Update Image BIN file for Thingy:91 (with double-tap-to-crash)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.memfault.dt2c-*/zephyr.elf",
"name": "thingy_world-Thingy91-dt2c-${nextRelease.gitTag}.elf",
"label": "App Symbols ELF file for Thingy:91 (with double-tap-to-crash) firmware"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.low-power.memfault.nbiot-*/merged.hex",
"name": "thingy_world-${nextRelease.gitTag}-Thingy91-low-power-nbiot.hex",
Expand Down

0 comments on commit 60a2807

Please sign in to comment.