Skip to content

Commit 4a02f04

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.26.0 (Build 311259)
1 parent 4ec7a0c commit 4a02f04

25 files changed

+3315
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
build
2+
__pycache__/

CHANGES.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
1+
### Changes between Memfault SDK 0.26.0 and SDK 0.25.0 - Sept 15, 2021
2+
3+
#### :chart_with_upwards_trend: Improvements
4+
5+
- Added preview of the Memfault Diagnostic GATT Service (MDS). This service can
6+
be used to transparently forward data collected by the SDK to a Bluetooth Low
7+
Energy gateway and proxied to the cloud. See
8+
[ports/include/memfault/ports/ble/mds.h](ports/include/memfault/ports/ble/mds.h#L1)
9+
for more details!
10+
- Added reference port of MDS for the DA1469x SDK to
11+
[ports/dialog/da1469x/memfault_diagnostic_service.c](ports/dialog/da1469x/memfault_diagnostic_service.c#L1)
12+
- Implemented [utility python script](scripts/eclipse_patch.py#L1) which can be
13+
used for quickly adding a `memfault-firmware-sdk` port to an eclipse project.
14+
For more details, run
15+
16+
```bash
17+
python scripts/eclipse_patch.py --help
18+
```
19+
20+
- Added example project demonstrating integration of Memfault on Cypress'
21+
[CY8CKIT-064S0S2-4343W](https://www.cypress.com/documentation/development-kitsboards/psoc-64-standard-secure-aws-wi-fi-bt-pioneer-kit-cy8ckit)
22+
running [Amazon-FreeRTOS](https://github.com/aws/amazon-freertos) publishing
23+
data using an
24+
[AWS IoT MQTT broker](https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_cypress_psoc64.html).
25+
For more details about how to run the Memfault example, see
26+
[examples/cypress/CY8CKIT-064S0S2-4343W/README.md](examples/cypress/CY8CKIT-064S0S2-4343W/README.md).
27+
- Fixed a compiler warning emitted when using TI's GCC Compiler as reported by
28+
@albertskog in
29+
[issue #18](https://github.com/memfault/memfault-firmware-sdk/issues/18)
30+
31+
#### :house: Internal
32+
33+
- Apply some suggestions emitted by `flake8-pytest-style` linter to
34+
[scripts/tests/test_memfault_gdb.py](scripts/tests/test_memfault_gdb.py).
35+
136
### Changes between Memfault SDK 0.25.0 and SDK 0.24.2 - August 30, 2021
237

338
#### :chart_with_upwards_trend: Improvements
439

540
- Added a workaround to
6-
[`event_storage.h`](components/include/memfault/core/event_storage.h)
7-
to prevent compilation errors when using
41+
[`event_storage.h`](components/include/memfault/core/event_storage.h) to
42+
prevent compilation errors when using
843
[the unity test framework](http://www.throwtheswitch.org/unity) to generate
944
mocks.
1045
- Updated [`makefiles/MemfaultWorker.mk`](makefiles/MemfaultWorker.mk) to use

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
BUILD ID: 300504
2-
GIT COMMIT: b6e67d617
1+
BUILD ID: 311259
2+
GIT COMMIT: dcb7bcc1f

components/include/memfault/core/compiler_ti_arm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extern "C" {
2121
#define MEMFAULT_PACKED_STRUCT struct MEMFAULT_PACKED
2222
#define MEMFAULT_NORETURN __attribute__((noreturn))
2323
#define MEMFAULT_NAKED_FUNC __attribute__((naked))
24-
#define MEMFAULT_UNREACHABLE
24+
#define MEMFAULT_UNREACHABLE while(1)
2525
#define MEMFAULT_NO_OPT
2626

2727

components/include/memfault/default_config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,14 @@ extern "C" {
353353
#define MEMFAULT_HTTP_APIS_DEFAULT_PORT (443)
354354
#endif
355355

356+
#ifndef MEMFAULT_HTTP_APIS_DEFAULT_SCHEME
357+
#if (MEMFAULT_HTTP_APIS_DEFAULT_PORT == 80)
358+
#define MEMFAULT_HTTP_APIS_DEFAULT_SCHEME "http"
359+
#else
360+
#define MEMFAULT_HTTP_APIS_DEFAULT_SCHEME "https"
361+
#endif
362+
#endif
363+
356364
//
357365
// Util Configuration Options
358366
//

components/include/memfault/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ typedef struct {
1919
uint8_t patch;
2020
} sMfltSdkVersion;
2121

22-
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 25, .patch = 0 }
22+
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 26, .patch = 0 }
2323

2424
#ifdef __cplusplus
2525
}
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
################################################################################
2+
# \file Makefile
3+
# \version 1.0
4+
#
5+
# \brief
6+
# Top-level application make file.
7+
#
8+
################################################################################
9+
# \copyright
10+
# Copyright 2018-2019 Cypress Semiconductor Corporation
11+
# SPDX-License-Identifier: Apache-2.0
12+
#
13+
# Licensed under the Apache License, Version 2.0 (the "License");
14+
# you may not use this file except in compliance with the License.
15+
# You may obtain a copy of the License at
16+
#
17+
# http://www.apache.org/licenses/LICENSE-2.0
18+
#
19+
# Unless required by applicable law or agreed to in writing, software
20+
# distributed under the License is distributed on an "AS IS" BASIS,
21+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
# See the License for the specific language governing permissions and
23+
# limitations under the License.
24+
################################################################################
25+
26+
# Choose between "aws_demos" and "aws_tests"
27+
CY_AFR_BUILD=aws_demos
28+
29+
# Root location of AFR directory
30+
CY_AFR_ROOT=../../../../../..
31+
32+
# Build artifact location
33+
CY_BUILD_RELATIVE_LOCATION=$(CY_AFR_ROOT)/build/cy
34+
CY_BUILD_LOCATION=$(abspath $(CY_BUILD_RELATIVE_LOCATION))
35+
36+
# Memfault
37+
MEMFAULT_SDK_ROOT := ../../..
38+
MEMFAULT_PORT_ROOT := $(MEMFAULT_SDK_ROOT)/examples/cypress/CY8CKIT-064S0S2-4343W/src
39+
40+
MEMFAULT_COMPONENTS := core util panics metrics
41+
include $(MEMFAULT_SDK_ROOT)/makefiles/MemfaultWorker.mk
42+
43+
################################################################################
44+
# Basic Configuration
45+
################################################################################
46+
47+
# Target board/hardware
48+
TARGET=CY8CKIT_064S0S2_4343W
49+
50+
# Name of application (used to derive name of final linked file).
51+
APPNAME=$(CY_AFR_BUILD)
52+
53+
# Name of toolchain to use. Options include:
54+
#
55+
# GCC_ARM -- GCC 7.2.1, provided with ModusToolbox IDE
56+
# ARM -- ARM Compiler (must be installed separately)
57+
# IAR -- IAR Compiler (must be installed separately)
58+
#
59+
# See also: CY_COMPILER_PATH below
60+
TOOLCHAIN=GCC_ARM
61+
62+
# Default build configuration. Options include:
63+
#
64+
# Debug -- build with minimal optimizations, focus on debugging.
65+
# Release -- build with full optimizations
66+
CONFIG=Debug
67+
68+
# If set to "true" or "1", display full command-lines when building.
69+
VERBOSE=
70+
71+
72+
################################################################################
73+
# Feature Configuration
74+
################################################################################
75+
# Enable or disable BLE module
76+
BLE_SUPPORTED=1
77+
78+
# Set to 1 to add OTA defines, sources, and libraries (must be used with MCUBoot)
79+
# NOTE: Extra code must be called from your app to initialize AFR OTA Agent
80+
OTA_SUPPORT=0
81+
82+
# This platform always uses EXTERNAL_FLASH
83+
OTA_USE_EXTERNAL_FLASH:=1
84+
85+
# Define CY_TEST_APP_VERSION_IN_TAR here to test application version
86+
# in TAR archive at start of OTA image download.
87+
# NOTE: This requires that the version numbers here and in the header file match.
88+
# NOTE: This will create compile warnings such as
89+
# 'warning: "APP_VERSION_MAJOR" redefined'
90+
#
91+
# CY_TEST_APP_VERSION_IN_TAR=1
92+
#
93+
# APP_VERSION_MAJOR:=1
94+
# APP_VERSION_MINOR:=0
95+
# APP_VERSION_BUILD:=0
96+
97+
# CY_TFM_PSA_SUPPORTED feature cannot be disabled on this platform.
98+
CY_TFM_PSA_SUPPORTED=1
99+
100+
# Using new Bootloader with SWAP / STATUS
101+
CY_MCUBOOT_SWAP_USING_STATUS=1
102+
103+
################################################################################
104+
# Advanced Configuration
105+
################################################################################
106+
107+
# Enable optional code that is ordinarily disabled by default.
108+
#
109+
# Available components depend on the specific targeted hardware and firmware
110+
# in use. In general, if you have
111+
#
112+
# COMPONENTS=foo bar
113+
#
114+
# ... then code in directories named COMPONENT_foo and COMPONENT_bar will be
115+
# added to the build
116+
#
117+
COMPONENTS=
118+
119+
# Like COMPONENTS, but disable optional code that was enabled by default.
120+
DISABLE_COMPONENTS=
121+
122+
# By default the build system automatically looks in the Makefile's directory
123+
# tree for source code and builds it. The SOURCES variable can be used to
124+
# manually add source code to the build process from a location not searched
125+
# by default, or otherwise not found by the build system.
126+
SOURCES = \
127+
$(MEMFAULT_COMPONENTS_SRCS) \
128+
$(MEMFAULT_SDK_ROOT)/ports/freertos/src/memfault_metrics_freertos.c \
129+
$(MEMFAULT_SDK_ROOT)/ports/freertos/src/memfault_core_freertos.c \
130+
$(MEMFAULT_SDK_ROOT)/ports/freertos/src/memfault_freertos_ram_regions.c
131+
132+
# Like SOURCES, but for include directories. Value should be paths to
133+
# directories (without a leading -I).
134+
# TODO remove this once whd is update to new version
135+
INCLUDES = \
136+
$(CY_AFR_ROOT)/vendors/cypress/MTB/libraries/wifi-host-driver/WiFi_Host_Driver/resources/nvram/TARGET_CY8CKIT_064B0S2_4343W \
137+
$(MEMFAULT_COMPONENTS_INC_FOLDERS) \
138+
$(MEMFAULT_SDK_ROOT)/ports/include \
139+
$(MEMFAULT_PORT_ROOT)
140+
141+
# Add additional defines to the build process (without a leading -D).
142+
DEFINES=
143+
144+
# Select softfp or hardfp floating point. Default is softfp.
145+
VFP_SELECT=
146+
147+
# Additional / custom C compiler flags.
148+
#
149+
# NOTE: Includes and defines should use the INCLUDES and DEFINES variable
150+
# above.
151+
CFLAGS=
152+
153+
# Additional / custom C++ compiler flags.
154+
#
155+
# NOTE: Includes and defines should use the INCLUDES and DEFINES variable
156+
# above.
157+
CXXFLAGS=
158+
159+
# Additional / custom assembler flags.
160+
#
161+
# NOTE: Includes and defines should use the INCLUDES and DEFINES variable
162+
# above.
163+
ASFLAGS=
164+
165+
# Additional / custom linker flags.
166+
LDFLAGS=-Wl,--build-id
167+
168+
# Additional / custom libraries to link in to the application.
169+
LDLIBS=
170+
171+
# Path to the linker script to use (if empty, use the default linker script).
172+
export LINKER_SCRIPT=cyb06xxa_cm4_dual.ld
173+
174+
# Custom pre-build commands to run.
175+
PREBUILD=
176+
177+
# Custom post-build commands to run.
178+
POSTBUILD=
179+
180+
181+
################################################################################
182+
# Paths
183+
################################################################################
184+
185+
# Relative path to the project directory (default is the Makefile's directory).
186+
#
187+
# This controls where automatic source code discovery looks for code.
188+
CY_APP_PATH=
189+
190+
# Relative path to the "base" library. It provides the core makefile build
191+
# infrastructure.
192+
CY_BASELIB_PATH=$(CY_AFR_ROOT)/vendors/cypress/MTB/psoc6/psoc6make
193+
194+
# Absolute path to the compiler's "bin" directory.
195+
#
196+
# The default depends on the selected TOOLCHAIN (GCC_ARM uses the ModusToolbox
197+
# IDE provided compiler by default).
198+
CY_COMPILER_PATH=
199+
200+
# Include aFR configuration make file
201+
include $(CY_AFR_ROOT)/projects/cypress/make_support/afr.mk
202+
203+
204+
################################################################################
205+
# Tools path
206+
################################################################################
207+
208+
# Locate ModusToolbox IDE helper tools folders in default installation
209+
# locations for Windows, Linux, and macOS.
210+
CY_WIN_HOME=$(subst \,/,$(USERPROFILE))
211+
CY_TOOLS_PATHS ?= $(wildcard \
212+
$(CY_WIN_HOME)/ModusToolbox/tools_* \
213+
$(HOME)/ModusToolbox/tools_* \
214+
/Applications/ModusToolbox/tools_*)
215+
216+
# If you install ModusToolbox IDE in a custom location, add the path to its
217+
# "tools_X.Y" folder (where X and Y are the version number of the tools
218+
# folder).
219+
CY_TOOLS_PATHS+=
220+
221+
# Default to the newest installed tools folder, or the users override (if it's
222+
# found).
223+
CY_TOOLS_DIR=$(lastword $(sort $(wildcard $(CY_TOOLS_PATHS))))
224+
225+
ifeq ($(CY_TOOLS_DIR),)
226+
$(error Unable to find any of the available CY_TOOLS_PATHS -- $(CY_TOOLS_PATHS))
227+
endif
228+
229+
$(info Tools Directory: $(CY_TOOLS_DIR))
230+
include $(CY_TOOLS_DIR)/make/start.mk

0 commit comments

Comments
 (0)