Example application for MCUXpresso, based on the
lwip_httpscli_mbedTLS_freertos
sample from the SDK_2.10.1_MIMXRT1060-EVKB
from NXP.
See information about the base example project in
doc/readme.txt
.
This project adds the Memfault SDK as a Git submodule, and enables the Memfault demo console commands for testing Memfault end-to-end.
You can find some information about how this project was set up here:
-
clone this repo, with submodules:
❯ git clone --recurse-submodules https://github.com/memfault/mcuxpresso-rt1060-example.git
-
import the project into MCUXpresso
-
configure the Memfault project key in
lwip_httpscli_mbedTLS/httpsclient.c
-
build + flash to the board. connect an Ethernet cable with internet access.
-
open a serial terminal to the CMSIS-DAP UART port on the board to access the serial console:
# example, using pyserial-miniterm ❯ pyserial-miniterm --raw /dev/ttyACM0 115200
The board will automatically attempt to bring up the network interface on boot. If it fails, posting data from the board will not work, but the CLI will still be available for manually uploading chunk data.
A periodic timer runs that will attempt to upload any data generated by the Memfault library (core dumps, metrics, etc). A few example metrics are provided by default, see source/memfault_metrics_heartbeat_config.def.
The serial console provides some test commands:
post_chunks
will attempt to connect and upload Memfault data. Be sure to upload a symbol file to see decoded data on the Memfault web app (upload the.axf
file, either via the web app or using the Memfault CLI tool)crash [optional crash type number 0-4]
will trigger a crash and a coredump, which will be uploaded when the device reboots and reconnects
Note: be sure to detach the debugger before running the crash
/reboot
commands. Depending on configuration, that can prevent the board from correctly
resetting.