Generic Pelion Device Management example for various Renesas-based 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:

https://os.mbed.com/media/cache/platforms/GR-LYCHEE_and_cam.png.250x250_q85.png https://os.mbed.com/media/cache/platforms/GR-PEACH_C_trans.png.250x250_q85.png

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

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.

Instructions to use this program with Mbed CLI


1. Import the application into your desktop:

mbed import https://os.mbed.com/teams/Renesas/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)

Note

This platform and application is suitable for evaluation and initial development. For production purposes, we recommend to use a different variant with built-in security features - for more information please contact Renesas (https://en-support.renesas.com/mytickets)

Committer:
MACRUM
Date:
Sat Dec 15 12:47:53 2018 +0900
Revision:
0:6d2053b84a92
Child:
2:a5b5f3df19e8
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MACRUM 0:6d2053b84a92 1 {
MACRUM 0:6d2053b84a92 2 "macros": [
MACRUM 0:6d2053b84a92 3 "ARM_UC_USE_PAL_BLOCKDEVICE=1",
MACRUM 0:6d2053b84a92 4 "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
MACRUM 0:6d2053b84a92 5 "MBED_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
MACRUM 0:6d2053b84a92 6 "MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
MACRUM 0:6d2053b84a92 7 "PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
MACRUM 0:6d2053b84a92 8 "PAL_FS_MOUNT_POINT_PRIMARY=\"/fs\"",
MACRUM 0:6d2053b84a92 9 "MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
MACRUM 0:6d2053b84a92 10 "PAL_DTLS_PEER_MIN_TIMEOUT=5000"
MACRUM 0:6d2053b84a92 11 ],
MACRUM 0:6d2053b84a92 12 "target_overrides": {
MACRUM 0:6d2053b84a92 13 "*": {
MACRUM 0:6d2053b84a92 14 "platform.stdio-baud-rate" : 115200,
MACRUM 0:6d2053b84a92 15 "platform.stdio-convert-newlines" : true,
MACRUM 0:6d2053b84a92 16 "update-client.storage-address" : "(1024*1024*64)",
MACRUM 0:6d2053b84a92 17 "update-client.storage-size" : "(1024*1024*2)",
MACRUM 0:6d2053b84a92 18 "update-client.storage-locations" : "1",
MACRUM 0:6d2053b84a92 19 "mbed-trace.enable" : null,
MACRUM 0:6d2053b84a92 20 "nsapi.default-wifi-security" : "WPA_WPA2",
MACRUM 0:6d2053b84a92 21 "nsapi.default-wifi-ssid" : "\"SSID\"",
MACRUM 0:6d2053b84a92 22 "nsapi.default-wifi-password" : "\"PASSWORD\""
MACRUM 0:6d2053b84a92 23 },
MACRUM 0:6d2053b84a92 24 "GR_LYCHEE": {
MACRUM 0:6d2053b84a92 25 "target.features_add" : ["BOOTLOADER"],
MACRUM 0:6d2053b84a92 26 "target.components_add" : ["SD"],
MACRUM 0:6d2053b84a92 27 "target.extra_labels_add" : ["ESP32_DRIVER"],
MACRUM 0:6d2053b84a92 28 "target.network-default-interface-type" : "WIFI",
MACRUM 0:6d2053b84a92 29 "flash-start-address" : "0x18000000",
MACRUM 0:6d2053b84a92 30 "flash-size" : "(8*1024*1024)",
MACRUM 0:6d2053b84a92 31 "sotp-section-1-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
MACRUM 0:6d2053b84a92 32 "sotp-section-1-size" : "(4*1024)",
MACRUM 0:6d2053b84a92 33 "sotp-section-2-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
MACRUM 0:6d2053b84a92 34 "sotp-section-2-size" : "(4*1024)",
MACRUM 0:6d2053b84a92 35 "sotp-num-sections" : 2,
MACRUM 0:6d2053b84a92 36 "target.bootloader_img" : "bootloader/mbed-bootloader-GR_LYCHEE.bin",
MACRUM 0:6d2053b84a92 37 "target.header_offset" : "0x10000",
MACRUM 0:6d2053b84a92 38 "target.app_offset" : "0x10400",
MACRUM 0:6d2053b84a92 39 "update-client.application-details" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)"
MACRUM 0:6d2053b84a92 40 }
MACRUM 0:6d2053b84a92 41 },
MACRUM 0:6d2053b84a92 42 "config": {
MACRUM 0:6d2053b84a92 43 "format-storage-layer-on-error": {
MACRUM 0:6d2053b84a92 44 "help": "Whether to format the storage layer when it cannot be read - always disable for production devices!",
MACRUM 0:6d2053b84a92 45 "value": 1
MACRUM 0:6d2053b84a92 46 },
MACRUM 0:6d2053b84a92 47 "developer-mode": {
MACRUM 0:6d2053b84a92 48 "help": "Enable Developer mode to skip Factory enrollment",
MACRUM 0:6d2053b84a92 49 "value": 1
MACRUM 0:6d2053b84a92 50 },
MACRUM 0:6d2053b84a92 51 "main-stack-size": {
MACRUM 0:6d2053b84a92 52 "value": 6000
MACRUM 0:6d2053b84a92 53 },
MACRUM 0:6d2053b84a92 54 "flash-start-address": {
MACRUM 0:6d2053b84a92 55 "help": "Start address of internal flash. Only used in this config to help the definition of other macros.",
MACRUM 0:6d2053b84a92 56 "value": null
MACRUM 0:6d2053b84a92 57 },
MACRUM 0:6d2053b84a92 58 "flash-size": {
MACRUM 0:6d2053b84a92 59 "help": "Total size of internal flash. Only used in this config to help the definition of other macros.",
MACRUM 0:6d2053b84a92 60 "value": null
MACRUM 0:6d2053b84a92 61 },
MACRUM 0:6d2053b84a92 62 "sotp-section-1-address": {
MACRUM 0:6d2053b84a92 63 "help": "Flash sector address for SOTP sector 1",
MACRUM 0:6d2053b84a92 64 "macro_name": "PAL_INTERNAL_FLASH_SECTION_1_ADDRESS",
MACRUM 0:6d2053b84a92 65 "value": null
MACRUM 0:6d2053b84a92 66 },
MACRUM 0:6d2053b84a92 67 "sotp-section-1-size": {
MACRUM 0:6d2053b84a92 68 "help": "Flash sector size for SOTP sector 1",
MACRUM 0:6d2053b84a92 69 "macro_name": "PAL_INTERNAL_FLASH_SECTION_1_SIZE",
MACRUM 0:6d2053b84a92 70 "value": null
MACRUM 0:6d2053b84a92 71 },
MACRUM 0:6d2053b84a92 72 "sotp-section-2-address": {
MACRUM 0:6d2053b84a92 73 "help": "Flash sector address for SOTP sector 2",
MACRUM 0:6d2053b84a92 74 "macro_name": "PAL_INTERNAL_FLASH_SECTION_2_ADDRESS",
MACRUM 0:6d2053b84a92 75 "value": null
MACRUM 0:6d2053b84a92 76 },
MACRUM 0:6d2053b84a92 77 "sotp-section-2-size": {
MACRUM 0:6d2053b84a92 78 "help": "Flash sector size for SOTP sector 2",
MACRUM 0:6d2053b84a92 79 "macro_name": "PAL_INTERNAL_FLASH_SECTION_2_SIZE",
MACRUM 0:6d2053b84a92 80 "value": null
MACRUM 0:6d2053b84a92 81 },
MACRUM 0:6d2053b84a92 82 "sotp-num-sections": {
MACRUM 0:6d2053b84a92 83 "help": "Number of SOTP sections",
MACRUM 0:6d2053b84a92 84 "macro_name": "PAL_INT_FLASH_NUM_SECTIONS",
MACRUM 0:6d2053b84a92 85 "value": null
MACRUM 0:6d2053b84a92 86 }
MACRUM 0:6d2053b84a92 87 }
MACRUM 0:6d2053b84a92 88 }