Skip to content

Commit 7660861

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.30.4 (Build 438599)
1 parent bc438a7 commit 7660861

File tree

6 files changed

+45
-11
lines changed

6 files changed

+45
-11
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ executors:
1616
memfault-ci:
1717
docker:
1818
# TODO: create separate docker image + public Dockerfile
19-
- image: memfault/ci:3.2.0
19+
- image: memfault/ci:3.2.3
2020
working_directory: ~/repo
2121

2222
commands:

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### Changes between Memfault SDK 0.30.4 and SDK 0.30.3 - May 4, 2022
2+
3+
#### :chart_with_upwards_trend: Improvements
4+
5+
- minor updates to [`scripts/eclipse_patch.py`](scripts/eclipse_patch.py) to
6+
support NXP's MCUXpresso IDE
7+
18
### Changes between Memfault SDK 0.30.3 and SDK 0.30.2 - April 25, 2022
29

310
#### :chart_with_upwards_trend: Improvements

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
BUILD ID: 433100
2-
GIT COMMIT: 558716463
1+
BUILD ID: 438599
2+
GIT COMMIT: 3905e51c1

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 = 30, .patch = 3 }
22+
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 30, .patch = 4 }
2323

2424
#ifdef __cplusplus
2525
}

examples/esp32/apps/memfault_demo_app/main/console_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static void prv_example_task(void *args) {
170170
// disable the task watchdog now that this task is done in this run
171171
MEMFAULT_TASK_WATCHDOG_STOP(example_task);
172172

173-
vTaskDelay(250 / portTICK_PERIOD_MS);
173+
vTaskDelay(interval_ms / portTICK_PERIOD_MS);
174174
}
175175
}
176176

scripts/eclipse_patch.py

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ def get_depth_from_parent(project_dir, memfault_dir):
2020
common_prefix = os.path.commonprefix([memfault_dir, project_dir])
2121
depth = 1
2222
dirname = project_dir
23+
24+
# some projects are in the root of the project dir- if the memfault dir is
25+
# in the same directory, return a PROJECT_LOC value of 0 for the link
26+
# position
27+
if dirname == common_prefix:
28+
return dirname, 0
29+
30+
# for the normal case, walk the directory parents until we find the common
31+
# parent for the project and memfault dirs
2332
while True:
2433
parent_dir = os.path.dirname(dirname)
2534
if os.path.samefile(parent_dir, common_prefix):
@@ -100,8 +109,9 @@ def files_to_link(dir_glob, virtual_dir, common_prefix, parent_dir):
100109
# Note:
101110
# - xtensa targets (i.e ESP) use CMake/Make so no need to add to eclipse based projects
102111
# - skip adding "memfault_demo_http" from demo component
103-
if "xtensa" in file_name or "http" in file_name:
112+
if "xtensa" in file_name or ("http" in os.path.relpath(file_name, start=common_prefix)):
104113
continue
114+
logging.debug("Adding %s", file_name)
105115

106116
yield get_file_element(file_name, virtual_dir, common_prefix, parent_dir)
107117

@@ -257,7 +267,13 @@ def patch_cproject(
257267

258268
def _find_include_nodes(option):
259269
return option.get("id", "").startswith(
260-
"ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths"
270+
(
271+
# this is the element id used by Dialog's Smart Snippets Studio
272+
# IDE (and possibly others)
273+
"ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths",
274+
# this is the element id used by NXP's MCUXpresso IDE
275+
"gnu.c.compiler.option.include.paths",
276+
)
261277
)
262278

263279
memfault_sdk_include_paths = [
@@ -313,7 +329,11 @@ def _find_linker_flags(option):
313329

314330

315331
if __name__ == "__main__":
316-
logging.basicConfig(level=logging.INFO)
332+
logging.basicConfig(
333+
format="%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s",
334+
datefmt="%Y-%m-%d:%H:%M:%S",
335+
level=logging.INFO,
336+
)
317337
parser = argparse.ArgumentParser(
318338
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
319339
description="""
@@ -344,7 +364,10 @@ def _find_linker_flags(option):
344364
parser.add_argument(
345365
"-l",
346366
"--location-prefix",
347-
help="The default behavior will add memfault-firmware-sdk files to the eclipse project using paths relative to the project root. This can be used to control the root used instead",
367+
help=(
368+
"The default behavior will add memfault-firmware-sdk files to the eclipse project using"
369+
" paths relative to the project root. This can be used to control the root used instead"
370+
),
348371
)
349372

350373
parser.add_argument(
@@ -356,7 +379,10 @@ def _find_linker_flags(option):
356379

357380
parser.add_argument(
358381
"--output",
359-
help="The directory to output result to. By default, the .project/.cproject files for the project will be overwritten",
382+
help=(
383+
"The directory to output result to. By default, the .project/.cproject files for the"
384+
" project will be overwritten"
385+
),
360386
)
361387
parser.add_argument(
362388
"--verbose",
@@ -399,5 +425,6 @@ def _find_linker_flags(option):
399425
)
400426

401427
logging.info(
402-
"Hurray, .project & .cproject have been succesfully patched! Be sure to 'Refresh' project to synchronize changes!"
428+
"Hurray, .project & .cproject have been succesfully patched! Be sure to 'Refresh' project"
429+
" to synchronize changes!"
403430
)

0 commit comments

Comments
 (0)