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:
Tue Feb 19 23:22:35 2019 +0000
Branch:
smcc-2.1.1.3
Revision:
4:6061130e9a4f
Parent:
2:a5b5f3df19e8
Child:
5:ca229d710930
Updated to SMCC 2.1.1.3 and Mbed OS 5.11.4

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.features_add" : ["BOOTLOADER"],
screamer 4:6061130e9a4f 14 "target.components_add" : ["SD"],
screamer 4:6061130e9a4f 15 "target.components_add" : ["WIFI_ESP32"],
screamer 4:6061130e9a4f 16 "target.network-default-interface-type" : "WIFI",
screamer 4:6061130e9a4f 17 "device-management.flash-start-address" : "0x18000000",
screamer 4:6061130e9a4f 18 "device-management.flash-size" : "(8*1024*1024)",
screamer 4:6061130e9a4f 19 "device-management.sotp-section-1-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
screamer 4:6061130e9a4f 20 "device-management.sotp-section-1-size" : "(4*1024)",
screamer 4:6061130e9a4f 21 "device-management.sotp-section-2-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
screamer 4:6061130e9a4f 22 "device-management.sotp-section-2-size" : "(4*1024)",
screamer 4:6061130e9a4f 23 "update-client.application-details" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)",
screamer 4:6061130e9a4f 24 "update-client.storage-address" : "(64*1024*1024)",
screamer 4:6061130e9a4f 25 "update-client.storage-size" : "(2*1024*1024)",
screamer 4:6061130e9a4f 26 "update-client.storage-locations" : "1",
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
MACRUM 0:6d2053b84a92 31 }
MACRUM 0:6d2053b84a92 32 },
MACRUM 0:6d2053b84a92 33 "config": {
MACRUM 0:6d2053b84a92 34 "format-storage-layer-on-error": {
MACRUM 0:6d2053b84a92 35 "help": "Whether to format the storage layer when it cannot be read - always disable for production devices!",
MACRUM 0:6d2053b84a92 36 "value": 1
MACRUM 0:6d2053b84a92 37 },
MACRUM 0:6d2053b84a92 38 "main-stack-size": {
MACRUM 0:6d2053b84a92 39 "value": 6000
MACRUM 0:6d2053b84a92 40 },
screamer 4:6061130e9a4f 41 "use-button": {
screamer 4:6061130e9a4f 42 "help": "Whether the target has a button",
screamer 4:6061130e9a4f 43 "macro_name": "USE_BUTTON",
screamer 4:6061130e9a4f 44 "value": true
MACRUM 0:6d2053b84a92 45 },
screamer 4:6061130e9a4f 46 "button-pressed-state": {
screamer 4:6061130e9a4f 47 "help": "Value of the button when pressed",
screamer 4:6061130e9a4f 48 "value": 1
MACRUM 0:6d2053b84a92 49 },
screamer 4:6061130e9a4f 50 "no_led": {
screamer 4:6061130e9a4f 51 "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 52 "value": null
MACRUM 0:6d2053b84a92 53 }
MACRUM 0:6d2053b84a92 54 }
screamer 4:6061130e9a4f 55 }