Skip to content

Fota update for following targets 1. DISCO_L475VG_IOT01A 2. K64F 3. K66F 4. NUCLEO_F411RE 5. NUCLEO_F429ZI #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ There is a more advanced example of the client with support for multiple operati

This table shows a list of boards that are supported.

Following board support's new update client and bootloader

FOTA Supported Board's | Connectivity | Storage for credentials and FW candidate | Notes
------------------------------------| ------------------| ------------------------| --------------
NXP `K64F` | Ethernet | Internal Flash |
NXP `K66F` | Ethernet | Internal Flash |
ST `NUCLEO_F411RE` | Wi-Fi ESP8266 | SD card | Build-only
ST `NUCLEO_F429ZI` | Ethernet | Internal Flash | Build-only
ST `DISCO_L475VG_IOT01A` | Wi-Fi | QSPIF | Build-only

Migration guide for legacy targets previously supporting UC bootloader and now upgraded to support new update client and bootloaders.
Please check section # Migration Guide for Targets supporting new update client implementation and bootloaders (Temporary placeholder for official documentation)

Board | Connectivity | Storage for credentials and FW candidate | Notes
------------------------------------| ------------------| ------------------------| --------------
Cypress `CYTFM_064B0S2_4343W` | Wi-Fi | Internal flash for credentials + external flash for FW candidate | To use `mbed-os-example-pelion` with the `CYTFM_064B0S2_4343W` board, check out the `cytfm-064b0s2-4343w` branch and see [*Running PDMC example on the CYTFM_064B0S2_4343W*](../cytfm-064b0s2-4343w/TARGET_CYTFM_064B0S2_4343W/README.md).
Expand Down Expand Up @@ -412,3 +425,9 @@ Note platforms will be tested regularly in the Arm CI system. Please discuss wit
# Known-issues
Please review existing issues on [GitHub](https://github.com/ARMmbed/mbed-os-example-pelion/issues) and report any problem you may see.
# Migration Guide for Targets supporting new update client implementation and bootloaders (Temporary placeholder for official documentation)
1. Official documentation is still work in progress.
2. Current new bootloaders are compiled from https://github.com/PelionIoT/mbed-bootloader/tree/nanoclient feature branch which provide both the application and bootloader kvstore and update configurations.
3. The provided prebuild-bl folder contain several examples for new configuration system and will be expanded in future.
2 changes: 1 addition & 1 deletion TESTS/pelion-e2e-python-test-library.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/pelion-e2e-python-test-library/#b1254f39b5d4fe4a5805642f109bd6d6f27adaaa
https://github.com/ARMmbed/pelion-e2e-python-test-library/#3d6e3abf08fc3db63e345f228adb315cca61162c
2 changes: 1 addition & 1 deletion mbed-cloud-client.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/PelionIoT/mbed-cloud-client/#f277bdc5cf8f5dee22063a5d293c03d76a0a8da2
https://github.com/PelionIoT/mbed-cloud-client/#d7edc529ed3722c811ff401440ef58ea980bf543
2 changes: 1 addition & 1 deletion mbed-os.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/mbed-os/#f2278567d09b9ae9f4843e1d9d393526b9462783
https://github.com/ARMmbed/mbed-os/#3377f083b3a6bd7a1b45ed2cea5cf083b9007527
572 changes: 54 additions & 518 deletions mbed_app.json

Large diffs are not rendered by default.

481 changes: 481 additions & 0 deletions mbed_app_legacy.json

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions mbed_cloud_client_user_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ----------------------------------------------------------------------------
// Copyright 2019 ARM Ltd.
// Copyright 2019-2021 Pelion.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -33,12 +33,6 @@
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 512
#endif

/* set flag to enable update support in mbed Cloud client */
#define MBED_CLOUD_CLIENT_SUPPORT_UPDATE

/* set download buffer size in bytes (min. 1024 bytes) */
#define MBED_CLOUD_CLIENT_UPDATE_BUFFER 1024

#define MBED_CLOUD_DEV_UPDATE_CERT
#define MBED_CLOUD_DEV_UPDATE_ID

Expand Down
45 changes: 45 additions & 0 deletions mbed_cloud_client_user_config_legacy.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// ----------------------------------------------------------------------------
// Copyright 2021 Pelion.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------

#ifndef MBED_CLOUD_CLIENT_USER_CONFIG_LEGACY_H
#define MBED_CLOUD_CLIENT_USER_CONFIG_LEGACY_H

#define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
#define MBED_CLOUD_CLIENT_LIFETIME 3600

// Application can override the default transport mode via `target.macros_add` definition in mbed_app.json.
#if !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP) && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE)
#define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
#endif

#ifdef MBED_CONF_MBED_CLIENT_SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE MBED_CONF_MBED_CLIENT_SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
#else
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 512
#endif

/* set flag to enable update support in mbed Cloud client */
#define MBED_CLOUD_CLIENT_SUPPORT_UPDATE

/* set download buffer size in bytes (min. 1024 bytes) */
#define MBED_CLOUD_CLIENT_UPDATE_BUFFER 1024

#define MBED_CLOUD_DEV_UPDATE_CERT
#define MBED_CLOUD_DEV_UPDATE_ID

#endif /* MBED_CLOUD_CLIENT_USER_CONFIG_LEGACY_H */
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "mbed-bootloader-DISCO_L475VG_IOT01A-TARGET_BL_QSPIF",
"target_overrides": {
"*": {
"target.macros_add": [
"MBED_CONF_STORAGE_STORAGE_TYPE=TDB_INTERNAL",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS=(MBED_ROM_START + 38*1024)",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE=(2*16*1024)",
"MBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_DEFAULT_MBED_OS_BD",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=(0)",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=(((MBED_ROM_START + MBED_ROM_SIZE - APPLICATION_ADDR)/0x1000)*0x1000)"

],
"target.bootloader_img": "mbed-bootloader-95fa885.bin",
"target.header_offset" : "0x11800",
"target.app_offset" : "0x11A00",
"target.header_format": [
["magic", "const", "32le", "0x5c0253a3"],
["firmwareSize", "size", "32le", ["application"]],
["firmwareVersion", "const", "64le", "0x0"],
["firmwareDigest", "digest", "SHA256", "application"],
["precursorDigest", "digest", "SHA256", "application"]
]
}
}
}
Binary file not shown.
28 changes: 28 additions & 0 deletions prebuilt-bl/TARGET_K64F/TARGET_BL_INTERNAL_FLASH/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "mbed-bootloader-K64F-TARGET_BL_INTERNAL_FLASH",
"target_overrides": {
"*": {
"target.macros_add": [
"MBED_BOOTLOADER_FLASH_BANK_SIZE=MBED_ROM_SIZE/2",
"MBED_CONF_STORAGE_STORAGE_TYPE=TDB_INTERNAL",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS=(MBED_ROM_START + MBED_BOOTLOADER_FLASH_BANK_SIZE)",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE=(2*16*1024)",
"MBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_INTERNAL_FLASH_MBED_OS_BD",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS + MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=(MBED_BOOTLOADER_FLASH_BANK_SIZE - MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)"

],
"target.bootloader_img": "mbed-bootloader-95fa885.bin",
"target.header_offset" : "0x8000",
"target.app_offset" : "0x8200",
"target.restrict_size" : "0x77E00",
"target.header_format": [
["magic", "const", "32le", "0x5c0253a3"],
["firmwareSize", "size", "32le", ["application"]],
["firmwareVersion", "const", "64le", "0x0"],
["firmwareDigest", "digest", "SHA256", "application"],
["precursorDigest", "digest", "SHA256", "application"]
]
}
}
}
Binary file not shown.
28 changes: 28 additions & 0 deletions prebuilt-bl/TARGET_K66F/TARGET_BL_INTERNAL_FLASH/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "mbed-bootloader-K66F-TARGET_BL_INTERNAL_FLASH",
"target_overrides": {
"*": {
"target.macros_add": [
"MBED_BOOTLOADER_FLASH_BANK_SIZE=MBED_ROM_SIZE/2",
"MBED_CONF_STORAGE_STORAGE_TYPE=TDB_INTERNAL",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS=(MBED_ROM_START + MBED_BOOTLOADER_FLASH_BANK_SIZE)",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE=(2*48*1024)",
"MBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_INTERNAL_FLASH_MBED_OS_BD",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS + MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=(MBED_BOOTLOADER_FLASH_BANK_SIZE - MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)"

],
"target.bootloader_img": "mbed-bootloader-95fa885.bin",
"target.header_offset" : "0x8000",
"target.app_offset" : "0x8200",
"target.restrict_size" : "0xF7C00",
"target.header_format": [
["magic", "const", "32le", "0x5c0253a3"],
["firmwareSize", "size", "32le", ["application"]],
["firmwareVersion", "const", "64le", "0x0"],
["firmwareDigest", "digest", "SHA256", "application"],
["precursorDigest", "digest", "SHA256", "application"]
]
}
}
}
Binary file not shown.
31 changes: 31 additions & 0 deletions prebuilt-bl/TARGET_NUCLEO_F411RE/TARGET_BL_SD/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "mbed-bootloader-NUCLEO_F411RE-TARGET_BL_SD",
"target_overrides": {
"*": {
"target.macros_add": [
"MBED_CONF_STORAGE_STORAGE_TYPE=FILESYSTEM",
"MBED_CONF_STORAGE_FILESYSTEM_FILESYSTEM=LITTLE",
"MBED_CONF_STORAGE_FILESYSTEM_BLOCKDEVICE=SD",
"MBED_CONF_STORAGE_FILESYSTEM_EXTERNAL_BASE_ADDRESS=0x0",
"MBED_CONF_STORAGE_FILESYSTEM_EXTERNAL_SIZE=(1024*1024*64)",
"MBED_CONF_STORAGE_FILESYSTEM_INTERNAL_BASE_ADDRESS=(MBED_ROM_START+32*1024)",
"MBED_CONF_STORAGE_FILESYSTEM_RBP_INTERNAL_SIZE=(32*1024)",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS=0",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE=0",
"MBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_DEFAULT_MBED_OS_BD",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=(MBED_CONF_STORAGE_FILESYSTEM_EXTERNAL_SIZE)",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=(MBED_ROM_START + MBED_ROM_SIZE - APPLICATION_ADDR)"
],
"target.bootloader_img": "mbed-bootloader-95fa885.bin",
"target.header_offset" : "0x10000",
"target.app_offset" : "0x10200",
"target.header_format": [
["magic", "const", "32le", "0x5c0253a3"],
["firmwareSize", "size", "32le", ["application"]],
["firmwareVersion", "const", "64le", "0x0"],
["firmwareDigest", "digest", "SHA256", "application"],
["precursorDigest", "digest", "SHA256", "application"]
]
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "mbed-bootloader-NUCLEO_F429ZI-TARGET_BL_INTERNAL_FLASH",
"target_overrides": {
"*": {
"target.macros_add": [
"MBED_BOOTLOADER_FLASH_BANK_SIZE=MBED_ROM_SIZE/2",
"MBED_CONF_STORAGE_STORAGE_TYPE=TDB_INTERNAL",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS=(MBED_ROM_START + MBED_BOOTLOADER_FLASH_BANK_SIZE)",
"MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE=(2*64*1024)",
"MBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_INTERNAL_FLASH_MBED_OS_BD",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS + MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"MBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=(MBED_BOOTLOADER_FLASH_BANK_SIZE - MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)"

],
"target.bootloader_img": "mbed-bootloader-95fa885.bin",
"target.header_offset" : "0x8000",
"target.app_offset" : "0x8200",
"target.restrict_size" : "0xF7C00",
"target.header_format": [
["magic", "const", "32le", "0x5c0253a3"],
["firmwareSize", "size", "32le", ["application"]],
["firmwareVersion", "const", "64le", "0x0"],
["firmwareDigest", "digest", "SHA256", "application"],
["precursorDigest", "digest", "SHA256", "application"]
]
}
}
}