Conversation
|
|
|
Don't worry about the CLA for PebbleOS, I need to disable that |
gmarull
left a comment
There was a problem hiding this comment.
Initial comments: make sure to make this feature optional; otherwise we won't be able to merge back to the OSS repository.
f7efcd6 to
55ac7aa
Compare
8cc05ec to
15cbf97
Compare
Thanks @gmarull , I added a |
Sorry to come late, I've been busy with other urgent stuff. I think memfault should probably be disabled by default, maybe enabled just on platforms we want it to be default (asterix/obelix). Another question: how is communication authenticated? Is fw just reporting logs to the mobile and mobile holds credentials? |
|
@noahp how's things looking on this PR? Can we help in any way? We're aiming to start a beta test in 2-3 weeks. Any chance we might have coredumps and heart beats by then? We could do the wiring up for data for the heart beat |
## Summary
Add the Memfault SDK as a git submodule, and integrate it into the
project.
This enables tracking the following in Memfault:
- reboots (translated pebble reboot reason codes)
- heartbeat metrics
Some console commands are included to help test the integration:
- `mflt export` : dump serialized Memfault chunks
- `mflt heartbeat` : trigger a heartbeat
- `mflt metrics_dump` : print current heartbeat values
- `mflt device_info` : print device serial, software type, hardware
version
Memfault is enabled by default for `asterix` + `obelix`. Provide a
configure options, `--memfault {0,1}` to override the default.
TODO:
- log capture
- Memfault coredumps
## Testing
Flashed to an asterix board, and ran these test commands:
```bash
mflt heartbeat
mflt export
```
Uploaded the symbol file (`build/src/fw/tintin_fw.elf`) and chunks to
`app.memfault.com` and confirmed both processed correctly.
Note: reboot reason tracking is not implemented on the nRF5 platform
(see `reboot_reason.c`). We'll need a solution there, eg just a small
slice of .noinit ram ideally.
---
Signed-off-by: Noah Pendleton <noah@memfault.com>
Ok, I changed it to what you asked: enabled by default for asterix + obelix, otherwise opt-in.
Yes, Memfault data is sent with a Project Key, which is typically stored on the data relay (mobile app in this system): https://api-docs.memfault.com/#a8d3e36f-62f0-4120-9fc6-544ee04f3bb5 This PR is ready for review. There are some remaining items:
Data can be exported for upload by calling |
| # For Memfault build id, we want to make sure LTO does not force inline | ||
| # TODO for some reason, this is applying to jerryscript link step, which we don't want. | ||
| # conf.env.append_value( | ||
| # "LINKFLAGS", ["-Wl,--require-defined=g_memfault_build_id"] | ||
| # ) |
| # todo, figure out memfault support for FreeRTOS V8.2.1 | ||
| # "memfault-firmware-sdk/ports/freertos/src/*.c", |
I ended up setting this in `src/fw/wscript` instead, so remove the dead code. See reference here: coredevices#3 (comment) Signed-off-by: Noah Pendleton <noah@memfault.com>
I ended up setting this in `src/fw/wscript` instead, so remove the dead code. See reference here: #3 (comment) Signed-off-by: Noah Pendleton <noah@memfault.com>
I ended up setting this in `src/fw/wscript` instead, so remove the dead code. See reference here: coredevices#3 (comment) Signed-off-by: Noah Pendleton <noah@memfault.com>
I ended up setting this in `src/fw/wscript` instead, so remove the dead code. See reference here: coredevices/PebbleOS#3 (comment) Signed-off-by: Noah Pendleton <noah@memfault.com>
Summary
Add the Memfault SDK as a git submodule, and integrate it into the
project.
This enables tracking the following in Memfault:
Some console commands are included to help test the integration:
mflt export: dump serialized Memfault chunksmflt heartbeat: trigger a heartbeatmflt metrics_dump: print current heartbeat valuesmflt device_info: print device serial, software type, hardwareversion
TODO:
Testing
Flashed to an asterix board, and ran these test commands:
mflt heartbeat mflt exportUploaded the symbol file (
build/src/fw/tintin_fw.elf) and chunks toapp.memfault.comand confirmed both processed correctly.Note: reboot reason tracking is not implemented on the nRF5 platform
(see
reboot_reason.c). We'll need a solution there, eg just a smallslice of .noinit ram ideally.
Signed-off-by: Noah Pendleton noah@memfault.com