diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index 35f537328fe674..2c403293423c73 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -27,7 +27,7 @@ if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") endif() include(${MBED_PATH}/tools/cmake/app.cmake) -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) endif() @@ -58,7 +58,6 @@ target_sources(${APP_TARGET} PRIVATE main/main.cpp main/ZclCallbacks.cpp ${GEN_DIR}/lighting-app/zap-generated/callback-stub.cpp - ${GEN_DIR}/lighting-app/zap-generated/CHIPClusters.cpp ${GEN_DIR}/lighting-app/zap-generated/IMClusterCommandHandler.cpp ${MBED_COMMON}/util/LEDWidget.cpp ${MBED_COMMON}/util/DFUManager.cpp diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index f7117f38497982..88baf7ae9a1487 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -27,7 +27,7 @@ if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") endif() include(${MBED_PATH}/tools/cmake/app.cmake) -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) endif() @@ -49,7 +49,7 @@ target_include_directories(${APP_TARGET} PRIVATE ${MBED_COMMON}/util/include ${GEN_DIR}/app-common ${GEN_DIR}/lock-app - ${NLIO_ROOT} + ${NLIO_ROOT} ) target_sources(${APP_TARGET} PRIVATE @@ -58,7 +58,6 @@ target_sources(${APP_TARGET} PRIVATE main/main.cpp main/ZclCallbacks.cpp ${GEN_DIR}/lock-app/zap-generated/callback-stub.cpp - ${GEN_DIR}/lock-app/zap-generated/CHIPClusters.cpp ${GEN_DIR}/lock-app/zap-generated/IMClusterCommandHandler.cpp ${MBED_COMMON}/util/LEDWidget.cpp ${MBED_COMMON}/util/DFUManager.cpp diff --git a/examples/ota-requestor-app/mbed/main/AppTask.cpp b/examples/ota-requestor-app/mbed/main/AppTask.cpp index 30a942fbd27788..e05d128ad1a7b0 100644 --- a/examples/ota-requestor-app/mbed/main/AppTask.cpp +++ b/examples/ota-requestor-app/mbed/main/AppTask.cpp @@ -513,4 +513,4 @@ bool AppTask::OnUpdateApplyHandler(void * context) } ChipLogProgress(NotSpecified, "\tApply new update %s", response == kUser_Response_confirm ? "CONFIRM" : "REJECT"); return response == kUser_Response_confirm; -} \ No newline at end of file +} diff --git a/examples/pigweed-app/mbed/main/include/CHIPProjectConfig.h b/examples/pigweed-app/mbed/main/include/CHIPProjectConfig.h index 6218e0765bf380..f4873be770c6c7 100644 --- a/examples/pigweed-app/mbed/main/include/CHIPProjectConfig.h +++ b/examples/pigweed-app/mbed/main/include/CHIPProjectConfig.h @@ -33,4 +33,4 @@ #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION MBED_CONF_APP_VERSION_NUMBER -#endif \ No newline at end of file +#endif diff --git a/examples/platform/mbed/ota/generate_ota_list_image.py b/examples/platform/mbed/ota/generate_ota_list_image.py index 71b48df3ba86c7..7743fd91b26591 100644 --- a/examples/platform/mbed/ota/generate_ota_list_image.py +++ b/examples/platform/mbed/ota/generate_ota_list_image.py @@ -47,13 +47,18 @@ } """ + def CreateOtaListFile(config, imagePath): data = json.loads(FILE_DATA_TEMPLATE) - data["deviceSoftwareVersionModel"][0]["vendorId"] = int(config["config"]["vendor-id"]["value"]) - data["deviceSoftwareVersionModel"][0]["productId"] = int(config["config"]["product-id"]["value"]) - data["deviceSoftwareVersionModel"][0]["softwareVersion"] = int(config["config"]["version-number"]["value"]) - data["deviceSoftwareVersionModel"][0]["softwareVersionString"] = config["config"]["version-number-str"]["value"].strip('"\\') + data["deviceSoftwareVersionModel"][0]["vendorId"] = int( + config["config"]["vendor-id"]["value"]) + data["deviceSoftwareVersionModel"][0]["productId"] = int( + config["config"]["product-id"]["value"]) + data["deviceSoftwareVersionModel"][0]["softwareVersion"] = int( + config["config"]["version-number"]["value"]) + data["deviceSoftwareVersionModel"][0]["softwareVersionString"] = config[ + "config"]["version-number-str"]["value"].strip('"\\') data["deviceSoftwareVersionModel"][0]["otaURL"] = str(imagePath) output_path = os.path.join(os.path.dirname(imagePath), FILE_NAME) @@ -61,9 +66,11 @@ def CreateOtaListFile(config, imagePath): with open(output_path, 'w') as jsonFile: json.dump(data, jsonFile) + def main(): if len(sys.argv) != 3: - print('Usage: ' + sys.argv[0] + ' ') + print('Usage: ' + sys.argv[0] + + ' ') exit(1) config_json_path = sys.argv[1] diff --git a/examples/platform/mbed/util/DFUManager.cpp b/examples/platform/mbed/util/DFUManager.cpp index cafbf48b67ee2b..a26b7f1f47d320 100644 --- a/examples/platform/mbed/util/DFUManager.cpp +++ b/examples/platform/mbed/util/DFUManager.cpp @@ -88,4 +88,4 @@ bool DFUManager::OnOtaUpdateApplyHandler(void * context) return true; } -#endif \ No newline at end of file +#endif diff --git a/examples/platform/mbed/util/include/DFUManager.h b/examples/platform/mbed/util/include/DFUManager.h index 5954c50a77eb9b..aed8b29bb9e7da 100644 --- a/examples/platform/mbed/util/include/DFUManager.h +++ b/examples/platform/mbed/util/include/DFUManager.h @@ -72,4 +72,4 @@ class DFUManager inline DFUManager & GetDFUManager(void) { return DFUManager::sDFUMgr; -} \ No newline at end of file +} diff --git a/src/platform/mbed/OTARequestorDriverImpl.cpp b/src/platform/mbed/OTARequestorDriverImpl.cpp index 83a7cf92d19f1d..4fb6be1577a31f 100644 --- a/src/platform/mbed/OTARequestorDriverImpl.cpp +++ b/src/platform/mbed/OTARequestorDriverImpl.cpp @@ -59,4 +59,4 @@ void OTARequestorDriverImpl::UpdateDownloaded() } } // namespace DeviceLayer -} // namespace chip \ No newline at end of file +} // namespace chip