Simple Mbed Cloud client application for NuMaker-PFM-M487 and NuMaker-PFM-NUC472 over Ethernet.

This application contains the example codes to:

1) Connect PFM-M487/PFM-NUC472 boards to Pelion

2) Enable Firmware update

For storage, PFM-M487/PFM-NUC472 support both SPI interface SD and built-in SD bus SD.

For connectivity, PFM-M487/PFM-NUC472 support Ethernet (on-board) by default.

This example supports Ethernet and built-in SD by default.

https://os.mbed.com/media/cache/platforms/NuMaker-PFM-M487.png.170x170_q85.png https://os.mbed.com/media/cache/platforms/NuMaker-PFM-NUC472Small.png.170x170_q85.png

Committer:
ccli8
Date:
Mon Oct 08 16:42:08 2018 +0800
Revision:
7:6aee86899520
Parent:
0:83caa8fa1d2c
Update to simple-mbed-cloud-client 1.4.1

1. Update to mbed-os 5.10
2. Remove sd-driver.lib, which is integrated into mbed-os.
3. Remove tools\ originally for packing bootloader and application. It is replaced with
managed bootloader mechanism.
4. Support default block device, which is enabled since mbed-os 5.10.
(1) Support Nuvoton SD card in SD bus mode as default
(2) Support SD card in SPI mode
5. Support default network interface, which is enabled sicne mbed-os 5.10.
(1) Support Ethernet as default
(2) Support WiFi ESP8266
6. Support OTA

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ccli8 7:6aee86899520 1 // ----------------------------------------------------------------------------
ccli8 7:6aee86899520 2 // Copyright 2016-2017 ARM Ltd.
ccli8 7:6aee86899520 3 //
ccli8 7:6aee86899520 4 // SPDX-License-Identifier: Apache-2.0
ccli8 7:6aee86899520 5 //
ccli8 7:6aee86899520 6 // Licensed under the Apache License, Version 2.0 (the "License");
ccli8 7:6aee86899520 7 // you may not use this file except in compliance with the License.
ccli8 7:6aee86899520 8 // You may obtain a copy of the License at
ccli8 7:6aee86899520 9 //
ccli8 7:6aee86899520 10 // http://www.apache.org/licenses/LICENSE-2.0
ccli8 7:6aee86899520 11 //
ccli8 7:6aee86899520 12 // Unless required by applicable law or agreed to in writing, software
ccli8 7:6aee86899520 13 // distributed under the License is distributed on an "AS IS" BASIS,
ccli8 7:6aee86899520 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ccli8 7:6aee86899520 15 // See the License for the specific language governing permissions and
ccli8 7:6aee86899520 16 // limitations under the License.
ccli8 7:6aee86899520 17 // ----------------------------------------------------------------------------
ccli8 7:6aee86899520 18
ccli8 7:6aee86899520 19 // This file is a template and it's intented to be copied to the application
ccli8 7:6aee86899520 20 // Enable this configuration
ccli8 7:6aee86899520 21
ccli8 7:6aee86899520 22 #ifndef MBED_CLOUD_CLIENT_USER_CONFIG_H
ccli8 7:6aee86899520 23 #define MBED_CLOUD_CLIENT_USER_CONFIG_H
ccli8 7:6aee86899520 24
ccli8 7:6aee86899520 25 #ifdef MBED_CONF_APP_ENDPOINT_TYPE
ccli8 7:6aee86899520 26 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE MBED_CONF_APP_ENDPOINT_TYPE
ccli8 7:6aee86899520 27 #else
ccli8 7:6aee86899520 28 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
ccli8 7:6aee86899520 29 #endif
ccli8 7:6aee86899520 30
ccli8 7:6aee86899520 31 // Enable either TCP or UDP, but no both
ccli8 7:6aee86899520 32 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
ccli8 7:6aee86899520 33 // MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP
ccli8 7:6aee86899520 34
ccli8 7:6aee86899520 35 #define MBED_CLOUD_CLIENT_LIFETIME 3600
ccli8 7:6aee86899520 36
ccli8 7:6aee86899520 37 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
ccli8 7:6aee86899520 38 #define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 1024
ccli8 7:6aee86899520 39
ccli8 7:6aee86899520 40 // set flag to enable update support in mbed Cloud client
ccli8 7:6aee86899520 41 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
ccli8 7:6aee86899520 42
ccli8 7:6aee86899520 43 // set download buffer size in bytes (min. 1024 bytes)
ccli8 7:6aee86899520 44
ccli8 7:6aee86899520 45 // Use larger buffers in Linux //
ccli8 7:6aee86899520 46 #ifdef __linux__
ccli8 7:6aee86899520 47 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER (2 * 1024 * 1024)
ccli8 7:6aee86899520 48 #else
ccli8 7:6aee86899520 49 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER 2048
ccli8 7:6aee86899520 50 #endif
ccli8 7:6aee86899520 51
ccli8 7:6aee86899520 52 // Developer flags for Update feature
ccli8 7:6aee86899520 53 #if MBED_CONF_APP_DEVELOPER_MODE == 1
ccli8 7:6aee86899520 54 #define MBED_CLOUD_DEV_UPDATE_CERT
ccli8 7:6aee86899520 55 #define MBED_CLOUD_DEV_UPDATE_ID
ccli8 7:6aee86899520 56 #endif // MBED_CONF_APP_DEVELOPER_MODE
ccli8 7:6aee86899520 57
ccli8 7:6aee86899520 58 #endif // MBED_CLOUD_CLIENT_USER_CONFIG_H
ccli8 7:6aee86899520 59