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:
cyliang
Date:
Mon Jul 16 10:40:23 2018 +0100
Revision:
2:9396e3065941
Parent:
0:83caa8fa1d2c
Child:
3:9e8abf07add2
Set EMAC as NUC472 default connect

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cyliang 0:83caa8fa1d2c 1 {
cyliang 0:83caa8fa1d2c 2 "macros": [
cyliang 0:83caa8fa1d2c 3 "MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
cyliang 0:83caa8fa1d2c 4 "PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
cyliang 0:83caa8fa1d2c 5 "MBED_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
cyliang 0:83caa8fa1d2c 6 "MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
cyliang 0:83caa8fa1d2c 7 "PAL_DTLS_PEER_MIN_TIMEOUT=5000",
cyliang 0:83caa8fa1d2c 8 "MBED_CONF_APP_MAIN_STACK_SIZE=5000",
cyliang 0:83caa8fa1d2c 9 "ARM_UC_USE_PAL_BLOCKDEVICE=1",
cyliang 0:83caa8fa1d2c 10 "PAL_INT_FLASH_NUM_SECTIONS=2",
cyliang 0:83caa8fa1d2c 11 "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
cyliang 0:83caa8fa1d2c 12 ],
cyliang 0:83caa8fa1d2c 13 "target_overrides": {
cyliang 0:83caa8fa1d2c 14 "*": {
cyliang 0:83caa8fa1d2c 15 "platform.stdio-baud-rate": 115200,
cyliang 0:83caa8fa1d2c 16 "platform.stdio-convert-newlines": true,
cyliang 0:83caa8fa1d2c 17 "mbed-client.event-loop-size": 1024,
cyliang 0:83caa8fa1d2c 18 "mbed-trace.enable": null,
cyliang 0:83caa8fa1d2c 19 "update-client.storage-address" : "(1024*1024*64)",
cyliang 0:83caa8fa1d2c 20 "update-client.storage-size" : "(1024*1024*2)",
cyliang 0:83caa8fa1d2c 21 "update-client.storage-locations": "1"
cyliang 0:83caa8fa1d2c 22 },
cyliang 0:83caa8fa1d2c 23 "NUMAKER_PFM_NUC472": {
cyliang 0:83caa8fa1d2c 24 "update-client.storage-address" : "(1024*1024*800)",
cyliang 0:83caa8fa1d2c 25 "update-client.storage-size" : "(1024*1024*2)",
cyliang 0:83caa8fa1d2c 26 "drivers.uart-serial-rxbuf-size" : 1024,
cyliang 0:83caa8fa1d2c 27
cyliang 0:83caa8fa1d2c 28 "target.macros_add": [
cyliang 0:83caa8fa1d2c 29 "PAL_INT_FLASH_NUM_SECTIONS=2"
cyliang 0:83caa8fa1d2c 30 ],
cyliang 0:83caa8fa1d2c 31 "sotp-section-1-address" : "0x7E000",
cyliang 0:83caa8fa1d2c 32 "sotp-section-1-size" : "0x1000",
cyliang 0:83caa8fa1d2c 33 "sotp-section-2-address" : "0x7F000",
cyliang 0:83caa8fa1d2c 34 "sotp-section-2-size" : "0x1000",
cyliang 0:83caa8fa1d2c 35 "sd.SPI_MOSI": "PF_0",
cyliang 0:83caa8fa1d2c 36 "sd.SPI_MISO": "PD_15",
cyliang 0:83caa8fa1d2c 37 "sd.SPI_CLK": "PD_14",
cyliang 0:83caa8fa1d2c 38 "sd.SPI_CS": "PD_13"
cyliang 0:83caa8fa1d2c 39 },
cyliang 0:83caa8fa1d2c 40 "NUMAKER_PFM_M487": {
cyliang 0:83caa8fa1d2c 41
cyliang 0:83caa8fa1d2c 42 "update-client.storage-address" : "(1024*1024*800)",
cyliang 0:83caa8fa1d2c 43 "update-client.storage-size" : "(1024*1024*2)",
cyliang 0:83caa8fa1d2c 44 "drivers.uart-serial-rxbuf-size" : 1024,
cyliang 0:83caa8fa1d2c 45
cyliang 0:83caa8fa1d2c 46 "target.macros_add": [
cyliang 0:83caa8fa1d2c 47 "PAL_INT_FLASH_NUM_SECTIONS=2"
cyliang 0:83caa8fa1d2c 48 ],
cyliang 0:83caa8fa1d2c 49
cyliang 0:83caa8fa1d2c 50 "sotp-section-1-address" : "0x7E000",
cyliang 0:83caa8fa1d2c 51 "sotp-section-1-size" : "0x1000",
cyliang 0:83caa8fa1d2c 52 "sotp-section-2-address" : "0x7F000",
cyliang 0:83caa8fa1d2c 53 "sotp-section-2-size" : "0x1000",
cyliang 0:83caa8fa1d2c 54 "sd.SPI_MOSI": "D11",
cyliang 0:83caa8fa1d2c 55 "sd.SPI_MISO": "D12",
cyliang 0:83caa8fa1d2c 56 "sd.SPI_CLK": "D13",
cyliang 0:83caa8fa1d2c 57 "sd.SPI_CS": "D10"
cyliang 0:83caa8fa1d2c 58 }
cyliang 0:83caa8fa1d2c 59 },
cyliang 0:83caa8fa1d2c 60 "config": {
cyliang 0:83caa8fa1d2c 61 "format-storage-layer-on-error": {
cyliang 0:83caa8fa1d2c 62 "help": "Whether to format the storage layer when it cannot be read - always disable for production devices!",
cyliang 0:83caa8fa1d2c 63 "value": 1
cyliang 0:83caa8fa1d2c 64 },
cyliang 0:83caa8fa1d2c 65 "network-interface": {
cyliang 0:83caa8fa1d2c 66 "help": "Options are ETHERNET, WIFI_ESP8266",
cyliang 0:83caa8fa1d2c 67 "value": "ETHERNET"
cyliang 0:83caa8fa1d2c 68 },
cyliang 0:83caa8fa1d2c 69 "wifi-ssid": {
cyliang 0:83caa8fa1d2c 70 "help": "WiFi SSID",
cyliang 0:83caa8fa1d2c 71 "value": "\"SSID\""
cyliang 0:83caa8fa1d2c 72 },
cyliang 0:83caa8fa1d2c 73 "wifi-password": {
cyliang 0:83caa8fa1d2c 74 "help": "WiFi Password",
cyliang 0:83caa8fa1d2c 75 "value": "\"Password\""
cyliang 0:83caa8fa1d2c 76 },
cyliang 0:83caa8fa1d2c 77 "wifi-tx": {
cyliang 0:83caa8fa1d2c 78 "help": "TX pin for serial connection to external device",
cyliang 0:83caa8fa1d2c 79 "value": "D1"
cyliang 0:83caa8fa1d2c 80 },
cyliang 0:83caa8fa1d2c 81 "wifi-rx": {
cyliang 0:83caa8fa1d2c 82 "help": "RX pin for serial connection to external device",
cyliang 0:83caa8fa1d2c 83 "value": "D0"
cyliang 0:83caa8fa1d2c 84 },
cyliang 0:83caa8fa1d2c 85 "developer-mode": {
cyliang 0:83caa8fa1d2c 86 "help": "Enable Developer mode to skip Factory enrollment",
cyliang 0:83caa8fa1d2c 87 "value": 1
cyliang 0:83caa8fa1d2c 88 },
cyliang 0:83caa8fa1d2c 89 "sotp-section-1-address": {
cyliang 0:83caa8fa1d2c 90 "help": "Flash sector address for SOTP sector 1",
cyliang 0:83caa8fa1d2c 91 "macro_name": "PAL_INTERNAL_FLASH_SECTION_1_ADDRESS",
cyliang 0:83caa8fa1d2c 92 "value": null
cyliang 0:83caa8fa1d2c 93 },
cyliang 0:83caa8fa1d2c 94 "sotp-section-1-size": {
cyliang 0:83caa8fa1d2c 95 "help": "Flash sector size for SOTP sector 1",
cyliang 0:83caa8fa1d2c 96 "macro_name": "PAL_INTERNAL_FLASH_SECTION_1_SIZE",
cyliang 0:83caa8fa1d2c 97 "value": null
cyliang 0:83caa8fa1d2c 98 },
cyliang 0:83caa8fa1d2c 99 "sotp-section-2-address": {
cyliang 0:83caa8fa1d2c 100 "help": "Flash sector address for SOTP sector 2",
cyliang 0:83caa8fa1d2c 101 "macro_name": "PAL_INTERNAL_FLASH_SECTION_2_ADDRESS",
cyliang 0:83caa8fa1d2c 102 "value": null
cyliang 0:83caa8fa1d2c 103 },
cyliang 0:83caa8fa1d2c 104 "sotp-section-2-size": {
cyliang 0:83caa8fa1d2c 105 "help": "Flash sector size for SOTP sector 2",
cyliang 0:83caa8fa1d2c 106 "macro_name": "PAL_INTERNAL_FLASH_SECTION_2_SIZE",
cyliang 0:83caa8fa1d2c 107 "value": null
cyliang 0:83caa8fa1d2c 108 }
cyliang 0:83caa8fa1d2c 109 }
cyliang 2:9396e3065941 110 }