Skip to content

Commit 80179e5

Browse files
author
Janne Kiiskila
committed
README.md - white space fixes
Plenty of spaces where they should not be.
1 parent 6cd2c84 commit 80179e5

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

README.md

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

33
This is a simplified example with the following features:
4-
- Mbed OS 5.13 and Pelion Device Management Client 3.3.0
4+
- Mbed OS 5.13.0 and Pelion Device Management Client 3.3.0
55
- Support for FW Update
66
- 200 lines of code + credential sources
77

@@ -28,16 +28,16 @@ This section is intended for developers to get started, import the example appli
2828
## Requirements
2929

3030
- Mbed CLI >= 1.10.0
31-
31+
3232
For instructions on installing and using Mbed CLI, please see our [documentation](https://os.mbed.com/docs/mbed-os/latest/tools/developing-mbed-cli.html).
33-
33+
3434
- Install the `CLOUD_SDK_API_KEY`
3535

3636
`mbed config -G CLOUD_SDK_API_KEY ak_1MDE1...<snip>`
3737

3838
You should generate your own API key. Pelion Device Management is available for any Mbed developer. Create a [free trial](https://os.mbed.com/pelion-free-tier).
3939

40-
For instructions on how to generate your API key, please see our [documentation](https://cloud.mbed.com/docs/current/integrate-web-app/api-keys.html#generating-an-api-key).
40+
For instructions on how to generate your API key, please see our [documentation](https://cloud.mbed.com/docs/current/integrate-web-app/api-keys.html#generating-an-api-key).
4141

4242
## Deploying
4343

@@ -61,7 +61,7 @@ This repository is in the process of being updated and depends on few enhancemen
6161
- Press 'i' to print endpoint name
6262
- Press Ctrl-C to to unregister
6363
- Press 'r' to reset storage and reboot (warning: it generates a new device ID!)
64-
64+
6565
## Further information and requirements
6666

6767
Check the public tutorial for further information:
@@ -73,13 +73,13 @@ Check the public tutorial for further information:
7373
- Device initializes but can't register to Pelion
7474

7575
Error: `client_error(3) -> Bootstrap server URL is not correctly formed`
76-
76+
7777
Solution: Format the the storage by pressing 'r' in the serial terminal.
78-
78+
7979
# Porting process to add support for an Mbed Enabled board
8080

8181
There are many steps involved in this process. We generally recomend the following steps:
82-
82+
8383
1. Configure the application using `mbed_app.json`
8484
- Configure the default connectivity
8585
- Configure the KVSTORE area to store credentials (internal or external memory)
@@ -104,19 +104,19 @@ You can extend or override the default configuration using `mbed_app.json` in th
104104
### a. Connectivity
105105

106106
Specify the default IP connectivity type for your target. It's essential with targets that lack default connectivity set in `targets.json` or for targets that support multiple connectivity options. For example:
107-
107+
108108
"target.network-default-interface-type" : "ETHERNET",
109-
109+
110110
The possible options are `ETHERNET`, `WIFI` and `CELLULAR`.
111-
111+
112112
Depending on connectivity type, you might have to specify more configuration options. Review the [documentation](https://os.mbed.com/docs/mbed-os/latest/porting/porting-connectivity.html) for further information.
113113

114114
### b. Storage for credentials
115115

116116
Start by getting familiar with the multiple [storage options](https://os.mbed.com/docs/mbed-os/latest/reference/storage.html) and configurations supported in Mbed OS.
117117

118118
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:
119-
119+
120120
+--------------------------+
121121
| |
122122
| |
@@ -151,19 +151,19 @@ You can extend or override the default configuration using `mbed_app.json` in th
151151
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.
152152

153153
- **Option 1:** Allocating credentials in internal memory
154-
154+
155155
**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.
156156

157-
"storage.storage_type" : "TDB_INTERNAL"
157+
"storage.storage_type" : "TDB_INTERNAL"
158158
"storage_tdb_internal.internal_base_address": "(MBED_ROM_START+1024*1024)",
159159
"storage_tdb_internal.internal_size" : "(128*1024)",
160160

161161
- **Option 2:** Allocating credentials in external memory:
162-
162+
163163
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)).
164-
164+
165165
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)
166-
166+
167167
"storage.storage_type" : "FILESYSTEM",
168168
"storage_filesystem.blockdevice" : "SD",
169169
"storage_filesystem.filesystem" : "LITTLE",
@@ -175,15 +175,15 @@ You can extend or override the default configuration using `mbed_app.json` in th
175175
### c. Storage for firmware updates
176176

177177
Before enabling FW updates, it's recomended that the application is able to initialize the network and connect to Pelion DM.
178-
179-
Once the connection is successfull, you can follow the steps below to enable the platform to receive FW updates. Note the configuration for the application in this section should match with the one on the bootloader - see section below.
180-
178+
179+
Once the connection is successfull, you can follow the steps below to enable the platform to receive FW updates. Note the configuration for the application in this section should match with the one on the bootloader - see section below.
180+
181181
- Common configuration
182-
182+
183183
Regardless of where the firmware candidate is located (internal or external), there is a need to have a bootloader in place. The binary of the booloader can be specified with the `bootloader_img` option. The address and size of the bootloader determines the `application-details` and `bootloader-details` options. The value of `bootloader-details` can be obtained by running the binary on the target and observing the serial output.
184-
184+
185185
Review the [mbed-bootloader](https://github.com/ARMmbed/mbed-bootloader#configurations) guidelines on how these options should be selected. Review the [bootloader configuration](2.-Bootloader-configuration) section below for more information.
186-
186+
187187
Copy the compiled bootloader from `mbed-bootloader/BUILDS/<TARGET>/<TOOLCHAIN>-TINY/mbed-bootloader.bin` to `bootloader/mbed-bootloader-<TARGET>.bin`.
188188

189189
Edit `mbed-os-pelion-example/mbed_app.json` and modify the target configuration to match with the one in `bootloader_app.json`.
@@ -195,34 +195,34 @@ You can extend or override the default configuration using `mbed_app.json` in th
195195
- `target.app_offset` is relative offset to `flash-start-address` you specified in `mbed_app.json` and `bootloader_app.json`, and is the hex value of the offset specified by `application-start-address` in `bootloader_app.json`. For example, `(MBED_CONF_APP_FLASH_START_ADDRESS+65*1024)` dec equals `0x10400` hex.
196196

197197
- `target.header_offset` is also relative offset to the `flash-start-address` you specified in the `bootloader_app.json`, and is the hex value of the offset specified by `update-client.application-details`. For example, `(MBED_CONF_APP_FLASH_START_ADDRESS+64*1024)` dec equals `0x10000` hex.</span>
198-
198+
199199
An example of this configuration can be seen for the `NUCLEO_F429ZI` platform.
200-
200+
201201
"update-client.application-details" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE)",
202202
"update-client.bootloader-details" : "0x08007300",
203203
"target.bootloader_img" : "bootloader/mbed-bootloader-<target>",
204204
"target.header_offset" : "0x8000",
205205
"target.app_offset" : "0x8400",
206-
206+
207207
- **Option 1:** Allocating the firmware update candidate in internal memory
208208

209209
**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.
210-
210+
211211
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP",
212212
"update-client.storage-address" : "(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS+MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
213213
"update-client.storage-size" : "(1024*1024-MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
214214
"update-client.storage-page" : 1,
215215

216216
- **Option 2:** Allocating the firmware update candidate in external memory
217-
217+
218218
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.
219-
219+
220220
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)
221-
221+
222222
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE",
223223
"update-client.storage-address" : "(1024*1024*64)",
224224
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - APPLICATION_ADDR) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
225-
225+
226226
## 2. Bootloader configuration
227227

228228
The bootloader is required to perform FW Updates. The steps below explain how to create a new configuration and binary for the bootloader.
@@ -242,7 +242,7 @@ The bootloader is required to perform FW Updates. The steps below explain how to
242242
"update-client.storage-locations" : 1,
243243
"kvstore-size": "2*64*1024",
244244
"update-client.storage-page": 1
245-
245+
246246
1. Compile the bootloader using the `bootloader_app.json` configuration you've just edited:
247247

248248
mbed compile -t <TOOLCHAIN> -m <TARGET> --profile=tiny.json --app-config=.../mbed-os-pelion-example/bootloader/bootloader_app.json>
@@ -262,7 +262,7 @@ In addition to having an example application succesfully connected to Pelion DM,
262262
- Mbed OS integration tests
263263

264264
See [mbed-os/TESTS/integration/README.md](https://github.com/ARMmbed/mbed-os/blob/sip-workshop/TESTS/integration/README.md) (sip-workshop branch)
265-
265+
266266
`mbed test -t <toolchain> -m <platform> -n *integration-* -DINTEGRATION_TESTS -v `
267267

268268
- Pelion Client tests, including firmware update.

0 commit comments

Comments
 (0)