Skip to content

Commit 0cb69f5

Browse files
author
Janne Kiiskila
committed
Remove alpha, add note about the mbed-cloud-client-example
We're not alpha anymore. We should tell about the other example too and explain why some people might want to use that. Wi-Fi needs to be spellt with the hyphen inbetween.
1 parent 2e880b9 commit 0cb69f5

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

README.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Pelion Client Mbed OS Example
22

3-
This is a simplified example with the following features:
3+
This is a simplified example for Mbed OS with the following features:
44
- Mbed OS 5.14.1 and Pelion Device Management Client 4.0.0
55
- Support for FW Update
66
- 200 lines of code + credential sources
77

8-
Note this application is considered **alpha** and given early access to Mbed Partners.
8+
There is an example of the client for multiple operating systems in [mbed-cloud-client-example](https://github.com/ARMmbed/mbed-cloud-client-example) repository. The underlying client library is the same for both. This Mbed OS only example is simpler as it only supports one OS, but if you want to do development in Linux and Mbed OS at the same time - you should use the [mbed-cloud-client-example](https://github.com/ARMmbed/mbed-cloud-client-example).
99

1010
## Supported platforms
1111

@@ -16,8 +16,8 @@ Platform | Connectivity | Storage for credentials
1616
NXP K64F | Ethernet | Internal Flash | Internal Flash |
1717
NXP K66F | Ethernet | Internal Flash | Internal Flash |
1818
ST NUCLEO_F429ZI | Ethernet | Internal Flash | Internal Flash |
19-
ST NUCLEO_F411RE | WiFi IDW01M1 | SD card | SD card |
20-
Ublox UBLOX_EVK_ODIN_W2 | WiFi | SD card | SD card |
19+
ST NUCLEO_F411RE | Wi-Fi IDW01M1 | SD card | SD card |
20+
Ublox UBLOX_EVK_ODIN_W2 | Wi-Fi | SD card | SD card |
2121

2222
<span class="notes">**(*) Note**: the platforms require further testing</span>
2323

@@ -50,12 +50,10 @@ This repository is in the process of being updated and depends on few enhancemen
5050

5151
## Compiling
5252

53-
```
5453
mbed target K64F
5554
mbed toolchain GCC_ARM
5655
mbed device-management init -d arm.com --model-name example-app --force -q
5756
mbed compile
58-
```
5957

6058
## Program Flow
6159

@@ -121,7 +119,6 @@ You can extend or override the default configuration using `mbed_app.json` in th
121119

122120
Then start designing the system memory map, the location of components (whether they are on internal or external memory), and the corresponding base addresses and sizes. You may want to create a diagram similar to the one below to help you to make design decisions:
123121

124-
```
125122
+--------------------------+
126123
| |
127124
| |
@@ -152,35 +149,30 @@ You can extend or override the default configuration using `mbed_app.json` in th
152149
| Bootloader |
153150
| |
154151
+--------------------------+ <-+ 0
155-
```
156152

157153
In cases where the MCU has two separate memory banks, it's appropiate to allocate the bootloader and base application in one bank, and KVSTORE storage at the begining of the second bank followed by a firmware candidate storage.
158154

159155
- **Option 1:** Allocating credentials in internal memory
160156

161157
**This is the preferred option whenever possible**. Make sure `TDB_INTERNAL` is the type of storage selected in `mbed_app.json`. Specify the base address depending on the available memory in the system. The size of this section should be aligned with the flash erase sector. The value should be multiple of 4 with a minimum of 24KB and upwards depending on the use case (for example the usage of certificate chain will increase the need of storage to hold those certificates). An example of this configuration can be seen for the `NUCLEO_F429ZI` platform in this application.
162158

163-
```
164159
"storage.storage_type" : "TDB_INTERNAL"
165160
"storage_tdb_internal.internal_base_address": "(MBED_ROM_START+1024*1024)",
166161
"storage_tdb_internal.internal_size" : "(128*1024)",
167-
```
168162

169163
- **Option 2:** Allocating credentials in external memory:
170164

171165
This is possible when the platform has an storage device wired to the MCU (could be on-board or external component). Make sure `FILESYSTEM` is specified as type of storage. The blockdevice and filesystem should be one of the supported in Mbed OS (see [docs](https://os.mbed.com/docs/mbed-os/latest/porting/blockdevice-port.html)).
172166

173167
An example of this configuration can be seen for the `K64F` platform in the [mbed-cloud-client-example](https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/mbed_app.json#L32)
174168

175-
```
176169
"storage.storage_type" : "FILESYSTEM",
177170
"storage_filesystem.blockdevice" : "SD",
178171
"storage_filesystem.filesystem" : "LITTLE",
179172
"storage_filesystem.internal_base_address" : "(32*1024)",
180173
"storage_filesystem.rbp_internal_size" : "(8*1024)",
181174
"storage_filesystem.external_base_address" : "(0x0)",
182175
"storage_filesystem.external_size" : "(1024*1024*64)",
183-
```
184176

185177
### c. Storage for firmware updates
186178

@@ -208,36 +200,30 @@ You can extend or override the default configuration using `mbed_app.json` in th
208200

209201
An example of this configuration can be seen for the `NUCLEO_F429ZI` platform.
210202

211-
```
212203
"update-client.application-details" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE)",
213204
"update-client.bootloader-details" : "0x08007300",
214205
"target.bootloader_img" : "bootloader/mbed-bootloader-<target>",
215206
"target.header_offset" : "0x8000",
216207
"target.app_offset" : "0x8400",
217-
```
218208

219209
- **Option 1:** Allocating the firmware update candidate in internal memory
220210

221211
**This is the preferred option whenever possible**. Make sure `ARM_UCP_FLASHIAP` is selected in `update-storage` in `mbed_app.json`. This area should be located at the end of the flash after the KVSTORE area. Specify the `storage-address`, `storage-size` and `storage-page` as required. The `application-details` option should point at the end of the bootloader area. An example of this configuration can be seen for the `NUCLEO_F429ZI` platform.
222212

223-
```
224213
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP",
225214
"update-client.storage-address" : "(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS+MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
226215
"update-client.storage-size" : "(1024*1024-MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
227216
"update-client.storage-page" : 1,
228-
```
229217

230218
- **Option 2:** Allocating the firmware update candidate in external memory
231219

232220
When using an external device to the MCU to store the firmware candidate, make sure `ARM_UCP_FLASHIAP_BLOCKDEVICE` is specified as type of `update-storage`. Specify the `storage-address`, `storage-size` and `storage-page` as required.
233221

234222
An example of this configuration can be seen for the `K64F` platform in the [mbed-cloud-client-example](https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/mbed_app.json#L32)
235223

236-
```
237224
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE",
238225
"update-client.storage-address" : "(1024*1024*64)",
239226
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - APPLICATION_ADDR) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
240-
```
241227

242228
## 2. Bootloader configuration
243229

@@ -247,7 +233,7 @@ The bootloader is required to perform FW Updates. The steps below explain how to
247233

248234
1. Edit the bootloader application configuration in this example (`bootloader/bootloader_app.json`) and add a new target entry. An example of this configuration can be seen for the `NUCLEO_F429ZI` platform:
249235

250-
```
236+
251237
"update-client.firmware-header-version" : "2",
252238
"mbed-bootloader.use-kvstore-rot" : 0,
253239
"mbed-bootloader.bootloader-size" : "APPLICATION_SIZE",
@@ -259,15 +245,13 @@ The bootloader is required to perform FW Updates. The steps below explain how to
259245
"update-client.storage-locations" : 1,
260246
"kvstore-size" : "2*64*1024",
261247
"update-client.storage-page" : 1
262-
```
263248

264249
1. Compile the bootloader using the `bootloader_app.json` configuration you've just edited:
265250

266251
`mbed compile -t <TOOLCHAIN> -m <TARGET> --profile=tiny.json --app-config=.../mbed-os-pelion-example/bootloader/bootloader_app.json>`
267252

268253
<span class="notes">**Note:** `mbed-bootloader` is primarily optimized for `GCC_ARM`, so you may want to compile it with that toolchain.
269-
Before jumping to the next step, you should compile and flash the bootloader and then connect over the virtual serial port to ensure the bootloader is running correctly. You can ignore errors related to checksum verification or falure to jump to application - these are expected at this stage.</span>
270-
254+
Before jumping to the next step, you should compile and flash the bootloader and then connect over the virtual serial port to ensure the bootloader is running correctly. You can ignore errors related to checksum verification or failure to jump to application - these are expected at this stage.</span>
271255

272256
## Validation and testing
273257

0 commit comments

Comments
 (0)