diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..eee6b79 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,63 @@ +name: Build +run-name: ${{ inputs.run_name }} + +env: + DEFAULT_PYTHON: 3.8 +on: + pull_request: null + push: + branches: + - main + workflow_dispatch: + inputs: + run_name: + description: 'Name of run to identify it from other runs' + required: false + type: string + +jobs: + build: + runs-on: ubuntu-latest + + # Image generated from: https://github.com/memfault/memfault-port-playground/tree/master/docker/nrf-connect-sdk + container: + image: memfault/nrf-connect-sdk:2024-01-05 + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + id: python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Install Zephyr SDK as CMake package + run: | + ${ZEPHYR_SDK_INSTALL_DIR}/setup.sh -c + + - name: Build app + run: | + cd $GITHUB_WORKSPACE + cd ../ + python -m venv venv + . venv/bin/activate + pip install -U pip==21.1 + pip install west==1.2.0 memfault-cli==1.0.4 + west init -l memfault-asset-tracker + west update --narrow -o=--depth=1 -o=--recurse-submodules --path-cache ~/zephyr-thingy91-path-cache + pip install -r zephyr/scripts/requirements.txt + pip install -r nrf/scripts/requirements-build.txt + west build -b thingy91_nrf9160_ns -p always memfault-asset-tracker -- \ + -DCONFIG_MEMFAULT_NCS_PROJECT_KEY=\"DUMMY_KEY\" \ + -DOVERLAY_CONFIG=overlay-memfault.conf \ + -DCONFIG_MEMFAULT_NCS_FW_VERSION_STATIC=y \ + -DCONFIG_MEMFAULT_NCS_FW_VERSION=\"${{ env.SOFTWARE_VERSION }}\" + + rm -rf ~/zephyr-thingy91-path-cache + cp -r ${PWD} ~/zephyr-thingy91-path-cache + + - name: Update Zephyr Project Cache + uses: actions/cache@v3 + with: + path: ~/zephyr-thingy91-path-cache + key: zephyr-thingy91-{{ checksum $GITHUB_WORKSPACE/west.yml }} diff --git a/overlay-memfault.conf b/overlay-memfault.conf index 162a70c..4915826 100644 --- a/overlay-memfault.conf +++ b/overlay-memfault.conf @@ -42,3 +42,7 @@ CONFIG_MEMFAULT_FOTA=y CONFIG_MEMFAULT_NCS_FW_VERSION_STATIC=y CONFIG_MEMFAULT_NCS_FW_VERSION="0.0.99-dev" + +# TODO: Remove after disabling just the self-test +# Disable shell to save space +CONFIG_MEMFAULT_SHELL=n diff --git a/src/main.c b/src/main.c index 853b762..1dc7b1c 100644 --- a/src/main.c +++ b/src/main.c @@ -525,32 +525,7 @@ void memfault_fota_download_callback(const struct fota_download_evt *evt) memfault_platform_reboot(); break; case FOTA_DOWNLOAD_EVT_ERROR: - /* - * FIXME: When multiple threads are send/read'ing from the modem - * at the same time, we get intermittent corruption issues. We should - * really figure out what is wrong here but for now we just keep retrying. - * - * Example error logs: - * - * location: GNSS timed out possibly due to too short GNSS time windows - * app_event_manager: LOCATION_MODULE_EVT_CLOUD_LOCATION_DATA_READY - * app_event_manager: DATA_EVT_DATA_READY - * app_event_manager: DATA_EVT_CLOUD_LOCATION_DATA_SEND - * app_event_manager: DATA_EVT_DATA_SEND_BATCH - * app_event_manager: CLOUD_EVT_DATA_SEND_QOS - * app_event_manager: CLOUD_EVT_CLOUD_LOCATION_UNKNOWN - * app_event_manager: LOCATION_MODULE_EVT_INACTIVE - * app_event_manager: CLOUD_EVT_DATA_SEND_QOS - * download_client: Downloaded 346112/424124 bytes (81%) - * download_client: Unexpected HTTP response: 403 forbidden - * fota_download: Download client error - * fota_download: Download client error - * dfu_target_mcuboot: MCUBoot image upgrade aborted. - * dfu_target_mcuboot: MCUBoot image upgrade aborted. - * FOTA failed -- trying again ... - */ - MEMFAULT_LOG_ERROR("FOTA failed -- trying again ..."); - prv_run_memfault_fota_check(); + MEMFAULT_LOG_ERROR("FOTA failed"); break; default: break; diff --git a/west.yml b/west.yml index 822f740..9e7a409 100644 --- a/west.yml +++ b/west.yml @@ -17,7 +17,7 @@ manifest: - name: memfault-firmware-sdk url: https://github.com/memfault/memfault-firmware-sdk path: modules/lib/memfault-firmware-sdk - revision: "1.5.2" + revision: "1.6.0" self: path: firmware