Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 1.79 KB

README.md

File metadata and controls

62 lines (45 loc) · 1.79 KB

Zephyr Specific Port

Overview

This directory contains an implementation of the dependency functions needed to integrate the Memfault SDK into the Zephyr RTOS.

The instructions below assume you have an environment already setup for building and flashing a Zephyr application. If you do not, see the official getting started guide.

Directories

The subdirectories within the folder are titled to align with the Zephyr release the porting files were tested against. If no breaking API changes have been made within Zephyr and a different release, the port may work there as well

Integrating SDK

  1. Depending on Zephyr version, apply .patch in release directory to Zephyr Kernel. Be sure to use the patch matching the Zephyr version in use.
$ cd $ZEPHYR_ROOT_DIR/
$ git apply $MEMFAULT_SDK_ROOT/ports/zephyr/[v2.0]/zephyr-integration.patch

Note that v2.2_v2.3/coredump-support.patch should be applied for Zephyr 2.2 and 2.3 only.

  1. Clone (or symlink) memfault-firmware-sdk in Zephyr Project
$ cd $ZEPHYR_ROOT_DIR/ext/lib/memfault
$ git clone https://github.com/memfault/memfault-firmware-sdk.git
  1. Implement device-specific dependencies.
void memfault_platform_get_device_info(sMemfaultDeviceInfo *info) {
  *info = (sMemfaultDeviceInfo) {
    .device_serial = "DEMOSERIAL",
    .software_type = "zephyr-main",
    .software_version = "1.15.0",
    .hardware_version = "disco_l475_iot1",
  };
}
sMfltHttpClientConfig g_mflt_http_client_config = {
  .api_key = "<YOUR PROJECT KEY HERE>",
};

Demo

An example integration and instructions can be found for the STM32L4 in $MEMFAULT_SDK_ROOT/examples/zephyr/README.md