Skip to content

Commit

Permalink
Memfault Firmware SDK 0.30.4 (Build 438599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Memfault Inc committed May 4, 2022
1 parent bc438a7 commit 7660861
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ executors:
memfault-ci:
docker:
# TODO: create separate docker image + public Dockerfile
- image: memfault/ci:3.2.0
- image: memfault/ci:3.2.3
working_directory: ~/repo

commands:
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Changes between Memfault SDK 0.30.4 and SDK 0.30.3 - May 4, 2022

#### :chart_with_upwards_trend: Improvements

- minor updates to [`scripts/eclipse_patch.py`](scripts/eclipse_patch.py) to
support NXP's MCUXpresso IDE

### Changes between Memfault SDK 0.30.3 and SDK 0.30.2 - April 25, 2022

#### :chart_with_upwards_trend: Improvements
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BUILD ID: 433100
GIT COMMIT: 558716463
BUILD ID: 438599
GIT COMMIT: 3905e51c1
2 changes: 1 addition & 1 deletion components/include/memfault/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typedef struct {
uint8_t patch;
} sMfltSdkVersion;

#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 30, .patch = 3 }
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 30, .patch = 4 }

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static void prv_example_task(void *args) {
// disable the task watchdog now that this task is done in this run
MEMFAULT_TASK_WATCHDOG_STOP(example_task);

vTaskDelay(250 / portTICK_PERIOD_MS);
vTaskDelay(interval_ms / portTICK_PERIOD_MS);
}
}

Expand Down
39 changes: 33 additions & 6 deletions scripts/eclipse_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ def get_depth_from_parent(project_dir, memfault_dir):
common_prefix = os.path.commonprefix([memfault_dir, project_dir])
depth = 1
dirname = project_dir

# some projects are in the root of the project dir- if the memfault dir is
# in the same directory, return a PROJECT_LOC value of 0 for the link
# position
if dirname == common_prefix:
return dirname, 0

# for the normal case, walk the directory parents until we find the common
# parent for the project and memfault dirs
while True:
parent_dir = os.path.dirname(dirname)
if os.path.samefile(parent_dir, common_prefix):
Expand Down Expand Up @@ -100,8 +109,9 @@ def files_to_link(dir_glob, virtual_dir, common_prefix, parent_dir):
# Note:
# - xtensa targets (i.e ESP) use CMake/Make so no need to add to eclipse based projects
# - skip adding "memfault_demo_http" from demo component
if "xtensa" in file_name or "http" in file_name:
if "xtensa" in file_name or ("http" in os.path.relpath(file_name, start=common_prefix)):
continue
logging.debug("Adding %s", file_name)

yield get_file_element(file_name, virtual_dir, common_prefix, parent_dir)

Expand Down Expand Up @@ -257,7 +267,13 @@ def patch_cproject(

def _find_include_nodes(option):
return option.get("id", "").startswith(
"ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths"
(
# this is the element id used by Dialog's Smart Snippets Studio
# IDE (and possibly others)
"ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths",
# this is the element id used by NXP's MCUXpresso IDE
"gnu.c.compiler.option.include.paths",
)
)

memfault_sdk_include_paths = [
Expand Down Expand Up @@ -313,7 +329,11 @@ def _find_linker_flags(option):


if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
logging.basicConfig(
format="%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s",
datefmt="%Y-%m-%d:%H:%M:%S",
level=logging.INFO,
)
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description="""
Expand Down Expand Up @@ -344,7 +364,10 @@ def _find_linker_flags(option):
parser.add_argument(
"-l",
"--location-prefix",
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",
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"
),
)

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

parser.add_argument(
"--output",
help="The directory to output result to. By default, the .project/.cproject files for the project will be overwritten",
help=(
"The directory to output result to. By default, the .project/.cproject files for the"
" project will be overwritten"
),
)
parser.add_argument(
"--verbose",
Expand Down Expand Up @@ -399,5 +425,6 @@ def _find_linker_flags(option):
)

logging.info(
"Hurray, .project & .cproject have been succesfully patched! Be sure to 'Refresh' project to synchronize changes!"
"Hurray, .project & .cproject have been succesfully patched! Be sure to 'Refresh' project"
" to synchronize changes!"
)

0 comments on commit 7660861

Please sign in to comment.