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:
screamer
Date:
Wed Feb 20 15:09:22 2019 +0000
Branch:
smcc-2.1.1.3
Revision:
6:81047c4b87a8
Parent:
5:ca229d710930
Update the default state of the user button

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MACRUM 0:6d2053b84a92 1 {
MACRUM 0:6d2053b84a92 2 "target_overrides": {
MACRUM 0:6d2053b84a92 3 "*": {
screamer 4:6061130e9a4f 4 "target.components_remove" : ["FLASHIAP"],
screamer 4:6061130e9a4f 5 "platform.stdio-baud-rate" : 115200,
screamer 4:6061130e9a4f 6 "platform.stdio-convert-newlines" : true,
screamer 4:6061130e9a4f 7 "mbed-trace.enable" : null,
screamer 4:6061130e9a4f 8 "nsapi.default-wifi-security" : "WPA_WPA2",
screamer 4:6061130e9a4f 9 "nsapi.default-wifi-ssid" : "\"SSID\"",
screamer 4:6061130e9a4f 10 "nsapi.default-wifi-password" : "\"Password\""
MACRUM 2:a5b5f3df19e8 11 },
MACRUM 0:6d2053b84a92 12 "GR_LYCHEE": {
screamer 4:6061130e9a4f 13 "target.components_add" : ["SD"],
screamer 4:6061130e9a4f 14 "target.components_add" : ["WIFI_ESP32"],
screamer 4:6061130e9a4f 15 "target.network-default-interface-type" : "WIFI",
screamer 4:6061130e9a4f 16 "device-management.flash-start-address" : "0x18000000",
screamer 4:6061130e9a4f 17 "device-management.flash-size" : "(8*1024*1024)",
screamer 4:6061130e9a4f 18 "device-management.sotp-section-1-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
screamer 4:6061130e9a4f 19 "device-management.sotp-section-1-size" : "(4*1024)",
screamer 4:6061130e9a4f 20 "device-management.sotp-section-2-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
screamer 4:6061130e9a4f 21 "device-management.sotp-section-2-size" : "(4*1024)",
screamer 4:6061130e9a4f 22 "update-client.application-details" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)",
screamer 4:6061130e9a4f 23 "update-client.storage-address" : "(64*1024*1024)",
screamer 4:6061130e9a4f 24 "update-client.storage-size" : "(2*1024*1024)",
screamer 4:6061130e9a4f 25 "update-client.storage-locations" : "1",
screamer 5:ca229d710930 26 "target.features_add" : ["BOOTLOADER"],
screamer 4:6061130e9a4f 27 "target.bootloader_img" : "bootloader/mbed-bootloader-GR_LYCHEE.bin",
screamer 4:6061130e9a4f 28 "target.header_offset" : "0x10000",
screamer 4:6061130e9a4f 29 "target.app_offset" : "0x10400",
screamer 4:6061130e9a4f 30 "button-pressed-state" : 0
screamer 5:ca229d710930 31 },
screamer 5:ca229d710930 32 "RZ_A1H": {
screamer 5:ca229d710930 33 "target.components_add" : ["SD"],
screamer 5:ca229d710930 34 "target.macros_add" : ["MBEDTLS_TEST_NULL_ENTROPY", "MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES"],
screamer 5:ca229d710930 35 "target.network-default-interface-type" : "ETHERNET",
screamer 5:ca229d710930 36 "device-management.flash-start-address" : "0x18000000",
screamer 5:ca229d710930 37 "device-management.flash-size" : "(8*1024*1024)",
screamer 5:ca229d710930 38 "device-management.sotp-section-1-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
screamer 5:ca229d710930 39 "device-management.sotp-section-1-size" : "(4*1024)",
screamer 5:ca229d710930 40 "device-management.sotp-section-2-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
screamer 5:ca229d710930 41 "device-management.sotp-section-2-size" : "(4*1024)",
screamer 5:ca229d710930 42 "update-client.application-details" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)",
screamer 5:ca229d710930 43 "update-client.storage-address" : "(64*1024*1024)",
screamer 5:ca229d710930 44 "update-client.storage-size" : "(2*1024*1024)",
screamer 5:ca229d710930 45 "update-client.storage-locations" : "1",
screamer 5:ca229d710930 46 "target.features_add" : ["BOOTLOADER"],
screamer 5:ca229d710930 47 "target.bootloader_img" : "bootloader/mbed-bootloader-RZ_A1H.bin",
screamer 5:ca229d710930 48 "target.header_offset" : "0x10000",
screamer 6:81047c4b87a8 49 "target.app_offset" : "0x10400",
screamer 6:81047c4b87a8 50 "button-pressed-state" : 0
MACRUM 0:6d2053b84a92 51 }
MACRUM 0:6d2053b84a92 52 },
MACRUM 0:6d2053b84a92 53 "config": {
MACRUM 0:6d2053b84a92 54 "format-storage-layer-on-error": {
MACRUM 0:6d2053b84a92 55 "help": "Whether to format the storage layer when it cannot be read - always disable for production devices!",
MACRUM 0:6d2053b84a92 56 "value": 1
MACRUM 0:6d2053b84a92 57 },
MACRUM 0:6d2053b84a92 58 "main-stack-size": {
MACRUM 0:6d2053b84a92 59 "value": 6000
MACRUM 0:6d2053b84a92 60 },
screamer 4:6061130e9a4f 61 "use-button": {
screamer 4:6061130e9a4f 62 "help": "Whether the target has a button",
screamer 4:6061130e9a4f 63 "macro_name": "USE_BUTTON",
screamer 4:6061130e9a4f 64 "value": true
MACRUM 0:6d2053b84a92 65 },
screamer 4:6061130e9a4f 66 "button-pressed-state": {
screamer 4:6061130e9a4f 67 "help": "Value of the button when pressed",
screamer 4:6061130e9a4f 68 "value": 1
MACRUM 0:6d2053b84a92 69 },
screamer 4:6061130e9a4f 70 "no_led": {
screamer 4:6061130e9a4f 71 "help": "This flag disables the heartbeat thread in tests. This is useful for platforms that don't have an LED or the LED is used for other functionality like LED on the SPI clockline etc",
MACRUM 0:6d2053b84a92 72 "value": null
MACRUM 0:6d2053b84a92 73 }
MACRUM 0:6d2053b84a92 74 }
screamer 4:6061130e9a4f 75 }