Mbed OS Device Management example for various Silicon Labs boards.

DEPRECATED

This example application is not maintained and not recommended. It uses an old version of Mbed OS, Pelion DM, and Arm toolchain. It doesn't work with Mbed Studio.

Please use: https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-pelion/

This example is known to work great on the following platforms:

Follow the Quick-Start instructions: https://cloud.mbed.com/quick-start

Thunderboard Sense 2 EFM32 Giant Gecko 11

Example functionality

This example showcases the following device functionality:

  • On user button click, increment Pelion LWM2M button resource.
  • Allow the user to change the state of the board LED from Pelion LWM2M led_state resource and PUT request.

Use this example with Mbed CLI

1. Import the application into your desktop:

mbed import https://os.mbed.com/teams/SiliconLabs/code/pelion-example-common

cd pelion-example-common

2. Install the CLOUD_SDK_API_KEY

mbed config -G CLOUD_SDK_API_KEY <PELION_DM_API_KEY>

For instructions on how to generate your API key, please see the documentation.

3. Initialize firmware credentials (done once per repository). You can use the following command:

mbed dm init -d "<your company name in Pelion DM>" --model-name "<product model identifier>" -q --force

If above command do not work for your Mbed CLI, please consider upgrading Mbed CLI to version 1.8.x or above.

4. Compile and program:

mbed compile -t <toolchain> -m <TARGET_BOARD>

(supported toolchains : GCC_ARM / ARM / IAR)

Committer:
screamer
Date:
Wed Mar 27 19:02:10 2019 +0000
Revision:
5:1456ec2e8485
Parent:
3:66358c889c39
Improve inline documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
screamer 0:bf13418ff7b0 1 {
screamer 0:bf13418ff7b0 2 "macros": [
screamer 0:bf13418ff7b0 3 "MBEDTLS_USER_CONFIG_FILE=\"bootloader_mbedtls_user_config.h\"",
screamer 0:bf13418ff7b0 4 "SHOW_PROGRESS_BAR=0",
screamer 0:bf13418ff7b0 5 "MAX_COPY_RETRIES=1",
screamer 0:bf13418ff7b0 6 "MAX_BOOT_RETRIES=3",
screamer 0:bf13418ff7b0 7 "ARM_BOOTLOADER_USE_NVSTORE_ROT=1",
screamer 0:bf13418ff7b0 8 "ARM_UC_USE_PAL_CRYPTO=0",
screamer 0:bf13418ff7b0 9 "ARM_UC_USE_PAL_BLOCKDEVICE=1",
screamer 0:bf13418ff7b0 10 "ARM_UC_PAAL_TRACE_ENABLE=0",
screamer 0:bf13418ff7b0 11 "ARM_UC_PROFILE_MBED_CLOUD_CLIENT=1",
screamer 0:bf13418ff7b0 12 "ARM_UC_FEATURE_CRYPTO_PAL=0",
screamer 0:bf13418ff7b0 13 "ARM_UC_FEATURE_CRYPTO_MBEDTLS=1",
screamer 0:bf13418ff7b0 14 "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
screamer 0:bf13418ff7b0 15 "DEFAULT_MAX_APPLICATION_SIZE=(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - MBED_CONF_APP_APPLICATION_START_ADDRESS - NVSTORE_AREA_1_SIZE - NVSTORE_AREA_2_SIZE)",
screamer 0:bf13418ff7b0 16 "DISABLE_ERROR_DESCRIPTION=1",
screamer 0:bf13418ff7b0 17 "Mutex=PlatformMutex"
screamer 0:bf13418ff7b0 18 ],
screamer 0:bf13418ff7b0 19 "config": {
screamer 0:bf13418ff7b0 20 "application-start-address": {
screamer 0:bf13418ff7b0 21 "help": "Address to the beginning of the active application firmware in flash",
screamer 0:bf13418ff7b0 22 "value": null
screamer 0:bf13418ff7b0 23 },
screamer 0:bf13418ff7b0 24 "application-jump-address": {
screamer 0:bf13418ff7b0 25 "help": "Jump address for running the active application firmware",
screamer 0:bf13418ff7b0 26 "value": null
screamer 0:bf13418ff7b0 27 },
screamer 0:bf13418ff7b0 28 "max-application-size": {
screamer 0:bf13418ff7b0 29 "help": "Maximum size of the active application",
screamer 0:bf13418ff7b0 30 "value": null
screamer 0:bf13418ff7b0 31 },
screamer 0:bf13418ff7b0 32 "flash-start-address": {
screamer 0:bf13418ff7b0 33 "help": "Start address of internal flash. Only used in this config to help the definition of other macros.",
screamer 0:bf13418ff7b0 34 "value": null
screamer 0:bf13418ff7b0 35 },
screamer 0:bf13418ff7b0 36 "flash-size": {
screamer 0:bf13418ff7b0 37 "help": "Total size of internal flash. Only used in this config to help the definition of other macros.",
screamer 0:bf13418ff7b0 38 "value": null
screamer 0:bf13418ff7b0 39 }
screamer 0:bf13418ff7b0 40 },
screamer 0:bf13418ff7b0 41 "target_overrides": {
screamer 0:bf13418ff7b0 42 "*": {
screamer 0:bf13418ff7b0 43 "target.features_remove" : ["LWIP"],
screamer 0:bf13418ff7b0 44 "target.features_add" : ["COMMON_PAL"],
screamer 0:bf13418ff7b0 45 "target.extra_labels_remove" : ["PSA"],
screamer 0:bf13418ff7b0 46 "target.components_remove" : ["FLASHIAP"],
screamer 0:bf13418ff7b0 47 "platform.stdio-baud-rate" : 115200,
screamer 0:bf13418ff7b0 48 "platform.stdio-flush-at-exit" : false
screamer 0:bf13418ff7b0 49 },
screamer 0:bf13418ff7b0 50 "EFM32GG11_STK3701": {
screamer 0:bf13418ff7b0 51 "target.components_add" : ["QSPIF"],
screamer 0:bf13418ff7b0 52 "qspif.QSPI_FREQ" : 10000000,
screamer 0:bf13418ff7b0 53 "flash-start-address" : "0x00000000",
screamer 0:bf13418ff7b0 54 "flash-size" : "(2048*1024)",
screamer 0:bf13418ff7b0 55 "nvstore.area_1_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
screamer 0:bf13418ff7b0 56 "nvstore.area_1_size" : "(4*1024)",
screamer 0:bf13418ff7b0 57 "nvstore.area_2_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
screamer 0:bf13418ff7b0 58 "nvstore.area_2_size" : "(4*1024)",
screamer 0:bf13418ff7b0 59 "update-client.storage-address" : "(2*1024*1024)",
screamer 0:bf13418ff7b0 60 "update-client.storage-size" : "(2*1024*1024)",
screamer 0:bf13418ff7b0 61 "update-client.storage-locations" : 1,
screamer 0:bf13418ff7b0 62 "update-client.firmware-header-version": "2",
screamer 0:bf13418ff7b0 63 "update-client.application-details": "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)",
screamer 0:bf13418ff7b0 64 "application-start-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 65*1024)",
screamer 0:bf13418ff7b0 65 "max-application-size" : "DEFAULT_MAX_APPLICATION_SIZE"
screamer 3:66358c889c39 66 },
screamer 3:66358c889c39 67 "TB_SENSE_12": {
screamer 3:66358c889c39 68 "target.components_add" : ["SPIF"],
screamer 3:66358c889c39 69 "spif-driver.SPI_MOSI" : "PK0",
screamer 3:66358c889c39 70 "spif-driver.SPI_MISO" : "PK2",
screamer 3:66358c889c39 71 "spif-driver.SPI_CLK" : "PF7",
screamer 3:66358c889c39 72 "spif-driver.SPI_CS" : "PK1",
screamer 3:66358c889c39 73 "spif-driver.SPI_FREQ" : "5000000",
screamer 3:66358c889c39 74 "flash-start-address" : "0x00000000",
screamer 3:66358c889c39 75 "flash-size" : "(1024*1024)",
screamer 3:66358c889c39 76 "nvstore.area_1_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
screamer 3:66358c889c39 77 "nvstore.area_1_size" : "(4*1024)",
screamer 3:66358c889c39 78 "nvstore.area_2_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
screamer 3:66358c889c39 79 "nvstore.area_2_size" : "(4*1024)",
screamer 3:66358c889c39 80 "update-client.storage-address" : "(256*1024)",
screamer 3:66358c889c39 81 "update-client.storage-size" : "(768*1024)",
screamer 3:66358c889c39 82 "update-client.storage-locations" : "(1)",
screamer 3:66358c889c39 83 "update-client.application-details": "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)",
screamer 3:66358c889c39 84 "application-start-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 65*1024)",
screamer 3:66358c889c39 85 "max-application-size" : "DEFAULT_MAX_APPLICATION_SIZE"
screamer 0:bf13418ff7b0 86 }
screamer 0:bf13418ff7b0 87 }
screamer 0:bf13418ff7b0 88 }