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 Mar 27 18:38:10 2019 +0000
Revision:
8:5ab220a2ac08
Parent:
5:ca229d710930
Improve inline documentation
Update to Mbed OS 5.11.5 and PDMC 2.2.1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MACRUM 0:6d2053b84a92 1 {
MACRUM 0:6d2053b84a92 2 "macros": [
MACRUM 0:6d2053b84a92 3 "MBEDTLS_USER_CONFIG_FILE=\"bootloader_mbedtls_user_config.h\"",
MACRUM 0:6d2053b84a92 4 "SHOW_PROGRESS_BAR=0",
MACRUM 0:6d2053b84a92 5 "MAX_COPY_RETRIES=1",
MACRUM 0:6d2053b84a92 6 "MAX_BOOT_RETRIES=3",
MACRUM 0:6d2053b84a92 7 "ARM_BOOTLOADER_USE_NVSTORE_ROT=1",
MACRUM 0:6d2053b84a92 8 "ARM_UC_USE_PAL_CRYPTO=0",
MACRUM 0:6d2053b84a92 9 "ARM_UC_USE_PAL_BLOCKDEVICE=1",
MACRUM 0:6d2053b84a92 10 "ARM_UC_PAAL_TRACE_ENABLE=0",
MACRUM 0:6d2053b84a92 11 "ARM_UC_PROFILE_MBED_CLOUD_CLIENT=1",
MACRUM 0:6d2053b84a92 12 "ARM_UC_FEATURE_CRYPTO_PAL=0",
MACRUM 0:6d2053b84a92 13 "ARM_UC_FEATURE_CRYPTO_MBEDTLS=1",
MACRUM 0:6d2053b84a92 14 "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
screamer 4:6061130e9a4f 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)",
MACRUM 0:6d2053b84a92 16 "DISABLE_ERROR_DESCRIPTION=1",
MACRUM 0:6d2053b84a92 17 "Mutex=PlatformMutex"
MACRUM 0:6d2053b84a92 18 ],
MACRUM 0:6d2053b84a92 19 "config": {
MACRUM 0:6d2053b84a92 20 "application-start-address": {
MACRUM 0:6d2053b84a92 21 "help": "Address to the beginning of the active application firmware in flash",
MACRUM 0:6d2053b84a92 22 "value": null
MACRUM 0:6d2053b84a92 23 },
MACRUM 0:6d2053b84a92 24 "application-jump-address": {
MACRUM 0:6d2053b84a92 25 "help": "Jump address for running the active application firmware",
MACRUM 0:6d2053b84a92 26 "value": null
MACRUM 0:6d2053b84a92 27 },
MACRUM 0:6d2053b84a92 28 "max-application-size": {
MACRUM 0:6d2053b84a92 29 "help": "Maximum size of the active application",
MACRUM 0:6d2053b84a92 30 "value": null
MACRUM 0:6d2053b84a92 31 },
MACRUM 0:6d2053b84a92 32 "flash-start-address": {
MACRUM 0:6d2053b84a92 33 "help": "Start address of internal flash. Only used in this config to help the definition of other macros.",
MACRUM 0:6d2053b84a92 34 "value": null
MACRUM 0:6d2053b84a92 35 },
MACRUM 0:6d2053b84a92 36 "flash-size": {
MACRUM 0:6d2053b84a92 37 "help": "Total size of internal flash. Only used in this config to help the definition of other macros.",
MACRUM 0:6d2053b84a92 38 "value": null
MACRUM 0:6d2053b84a92 39 }
MACRUM 0:6d2053b84a92 40 },
MACRUM 0:6d2053b84a92 41 "target_overrides": {
MACRUM 0:6d2053b84a92 42 "*": {
MACRUM 0:6d2053b84a92 43 "target.features_remove" : ["LWIP"],
MACRUM 0:6d2053b84a92 44 "target.features_add" : ["COMMON_PAL"],
screamer 4:6061130e9a4f 45 "target.extra_labels_remove" : ["PSA"],
screamer 4:6061130e9a4f 46 "target.components_remove" : ["FLASHIAP"],
MACRUM 0:6d2053b84a92 47 "platform.stdio-baud-rate" : 115200,
screamer 4:6061130e9a4f 48 "platform.stdio-flush-at-exit" : false
MACRUM 0:6d2053b84a92 49 },
screamer 4:6061130e9a4f 50 "GR_LYCHEE": {
screamer 4:6061130e9a4f 51 "target.components_add" : ["SD"],
screamer 4:6061130e9a4f 52 "sd.SPI_MOSI" : "P5_6",
screamer 4:6061130e9a4f 53 "sd.SPI_MISO" : "P5_7",
screamer 4:6061130e9a4f 54 "sd.SPI_CLK" : "P5_4",
screamer 4:6061130e9a4f 55 "sd.SPI_CS" : "P5_5",
MACRUM 2:a5b5f3df19e8 56 "flash-start-address" : "0x18000000",
MACRUM 2:a5b5f3df19e8 57 "flash-size" : "(8*1024*1024)",
MACRUM 2:a5b5f3df19e8 58 "nvstore.area_1_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
MACRUM 2:a5b5f3df19e8 59 "nvstore.area_1_size" : "(4*1024)",
MACRUM 2:a5b5f3df19e8 60 "nvstore.area_2_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
MACRUM 2:a5b5f3df19e8 61 "nvstore.area_2_size" : "(4*1024)",
screamer 4:6061130e9a4f 62 "update-client.storage-address" : "(64*1024*1024)",
screamer 4:6061130e9a4f 63 "update-client.storage-size" : "(2*1024*1024)",
screamer 4:6061130e9a4f 64 "update-client.storage-locations" : 1,
screamer 4:6061130e9a4f 65 "update-client.firmware-header-version": "2",
MACRUM 0:6d2053b84a92 66 "update-client.application-details": "(MBED_CONF_APP_FLASH_START_ADDRESS + 64*1024)",
MACRUM 0:6d2053b84a92 67 "application-start-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 65*1024)",
screamer 4:6061130e9a4f 68 "max-application-size" : "DEFAULT_MAX_APPLICATION_SIZE"
screamer 5:ca229d710930 69 },
screamer 5:ca229d710930 70 "RZ_A1H": {
screamer 5:ca229d710930 71 "flash-start-address" : "0x18000000",
screamer 5:ca229d710930 72 "flash-size" : "(8*1024*1024)",
screamer 5:ca229d710930 73 "nvstore.area_1_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 2*(4*1024))",
screamer 5:ca229d710930 74 "nvstore.area_1_size" : "(4*1024)",
screamer 5:ca229d710930 75 "nvstore.area_2_address" : "(MBED_CONF_APP_FLASH_START_ADDRESS + MBED_CONF_APP_FLASH_SIZE - 1*(4*1024))",
screamer 5:ca229d710930 76 "nvstore.area_2_size" : "(4*1024)",
screamer 5:ca229d710930 77 "update-client.application-details": "(MBED_CONF_APP_FLASH_START_ADDRESS+64*1024)",
screamer 5:ca229d710930 78 "application-start-address" : "(MBED_CONF_APP_FLASH_START_ADDRESS+65*1024)",
screamer 5:ca229d710930 79 "max-application-size" : "DEFAULT_MAX_APPLICATION_SIZE",
screamer 5:ca229d710930 80 "sd.SPI_MOSI" : "P8_5",
screamer 5:ca229d710930 81 "sd.SPI_MISO" : "P8_6",
screamer 5:ca229d710930 82 "sd.SPI_CLK" : "P8_3",
screamer 5:ca229d710930 83 "sd.SPI_CS" : "P8_4"
MACRUM 0:6d2053b84a92 84 }
MACRUM 0:6d2053b84a92 85 }
MACRUM 0:6d2053b84a92 86 }